python - IPython - running a script with %run command - saved to which folder? -
i'm in ipython , want run simple python script i've saved in file called "test.py".
i'd use %run test.py
command execute inside ipython, don't know folder need save test.py.
also, how can change default folder else, example c:\users\user\foldername ?
i tried .ipython folder (original installation folder) that's not working.
i found answer:
import os filepath = 'c:\\users\\user\\foldername' os.chdir(filepath) %run test.py
Comments
Post a Comment