Page 1 of 1

sys.py?

Posted: Wed Jun 11, 2003 1:59 am
by nay
hi

i have a script that runs in the commandline that needs the normal python sys module.

i can specify the path of the module in blender to get it to run but i need a copy of the normal sys.py as the blender built in modified version has pieces (argv, sys?) removed.

sys.py is not in the python lib, it may be built in to a binary or something - it's not in the source. Does anyone have an idea on where to get a copy of the normal sys.py script from?

sys.py doesn't exist!

Posted: Wed Jun 11, 2003 9:15 am
by effeuno
Hi, I'm sorry but you cannot find sys.py because it doesn't exist: it is a platform dependent module written (I suppose) in C or C++ and compiled into python.

About your problem: what is the platform you're working on?
On Win it is possibile to import the sys module; you can try:

Code: Select all

import sys
print dir(sys)
I think it also works on Linux boxes and I know it doesn't work on Mac OSX (I'm an iBook owner and I've seen the python support on this platform is incomplete).

Hope is enough; bye,
F1

Posted: Thu Jun 12, 2003 11:56 am
by nay
thanks for the tip :)

i think that all i need from sys might be argv. any idea on how to get that code out of the sys module? i have a copy of sys.py from blender that i could link the script to after adding argv to it.