0
Answered

Running python code in SSH

atonaltensor 4 years ago in iPad updated by Alexander Blach (Developer) 2 months ago 3

Hello, 

Maybe I am being dense, but I cannot see how I could execute/run python code I've written in my SSH terminal window. 


Example: I'm editing a file called "main.py" in Textastic with "print("Hello World!"). I want to be able to open the SSH terminal (into my local server) and be able to type "python main.py" to see "Hello World!" printed inside the SSH terminal window. 

How do I achieve this without having to manually copy and paste code?

Answer

Answer
Answered

Hello,

I would do it like this:

  • create the python file(s) in Textastic in a folder within "Local Files" or "iCloud"
  • use the file transfer screen to upload the files to your server using an SFTP connection
  • use the SSH terminal to run the python file on your server using the same connection
  • when you now make changes to the python files on your iPad, you can use the "Quick Upload" feature of Textastic to upload your file with two taps or a keyboard shortcut (Cmd-Option-Up)

Please have a look at these topics in the manual for details:

Uploading and Downloading Files: https://www.textasticapp.com/v10/manual/remote_servers/uploading_downloading.html

Quickly Upload/Download: https://www.textasticapp.com/v10/manual/remote_servers/quick_upload_download.html

GOOD, I'M SATISFIED

thank you for the help!

Satisfaction mark by atonaltensor 4 years ago
Answer
Answered

Hello,

I would do it like this:

  • create the python file(s) in Textastic in a folder within "Local Files" or "iCloud"
  • use the file transfer screen to upload the files to your server using an SFTP connection
  • use the SSH terminal to run the python file on your server using the same connection
  • when you now make changes to the python files on your iPad, you can use the "Quick Upload" feature of Textastic to upload your file with two taps or a keyboard shortcut (Cmd-Option-Up)

Please have a look at these topics in the manual for details:

Uploading and Downloading Files: https://www.textasticapp.com/v10/manual/remote_servers/uploading_downloading.html

Quickly Upload/Download: https://www.textasticapp.com/v10/manual/remote_servers/quick_upload_download.html

mine is not working, it just loads for so long… help