[Tutor] Using a calling program to change Python script arguments
crawlzone at gmail.com
Sat Sep 1 02:23:55 CEST 2012
On 08/31/2012 04:58 PM, Alan Gauld wrote:
> Creating a module is just a matter of creating a standard python file
> <--------start of myvar.py ----->
> #! /bin/python # you don't even really need a shebang for modules!
> myVar = 66
> <-------- end of myvar.py ------>
> import myvar
> print myvar.myVal
> And so long as the location of the module is in your sys.path
> (or in the PYHONPATH environment variable) python will find it.
Yep. I got my 'pymodules' directory created, and I will append it to the
sys.path list a run time. So far it appears to work in testing
mode....next we'll see what happens in real life!
More information about the Tutor