Forum Archive

Pythonista - run script using editor module?

JadedTuna

Hey all! I wanna ask, is there a way to run some script in Pythonista using editor module? Or somehow else, not using RUN button? Thanks.

EDIT:
Basically, I have a simple console on my comp, using which I want to control Pythonista. In Pythonista I have a client, which receives data from computer. And I want to somehow run scripts in Pythonista, without stopping my client (ex send run somescript.py from comp), some equalent to os.system("python somescript.py"). Sorry for my bad english.

omz

You could use the built-in execfile() function for this.

JadedTuna

Wow, thanks a lot!