I am about to start programming python with jython on WinXP (Later Win7). After I tried out the out of the box interpreter in the comand line, I want to try out programming standalone modules.
My questions are:
Where do I have to put the .py files?
How to run them?
How to import scripts which are not in the same directory like the 'main' script? (Import scripts/classes/functions from an relative/absolute path) I plan to have something like a workspace folder (e.g. 'C:\pythonWorkspace') where I build my own python script library for importing them in several projects.
Edit: Added used OS: WinXP/Win7
the relative/absolute path should in PYTHONPATH,sample code:
import os,sys
#change to your path
sys.path.append(os.path.join(os.path.dirname(__file__),'lib'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With