sys.py?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

nay
Posts: 39
Joined: Thu Jan 29, 2004 1:56 am
Location: sydney, australia
Contact:

sys.py?

Postby nay » Wed Jun 11, 2003 1:59 am

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?

effeuno
Posts: 4
Joined: Thu Oct 17, 2002 11:58 pm
Location: Piacenza (IT)

sys.py doesn't exist!

Postby effeuno » Wed Jun 11, 2003 9:15 am

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

nay
Posts: 39
Joined: Thu Jan 29, 2004 1:56 am
Location: sydney, australia
Contact:

Postby nay » Thu Jun 12, 2003 11:56 am

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.


Return to “Python”

Who is online

Users browsing this forum: No registered users and 2 guests