I read somewhere about somebody importing the sys.py module. I can't find the bugger on my system! I have python 2.5.1 installed on this Waxows XP machine. I did a search for sys.py in the c:\python25 folder and sys.py isn't there! Isn't it supposed to be installed by default? If not, how do I install it?

When I import sys from the command line, I get:

>>> import sys
>>>

Cheers

>>> import sys
>>>

Hmm, it seems to work. What did you expect to happen? :)

Hi,

Yes mawe you're right, I've tried it as well and it seems to be performing.

[list=1]<LI class=li1>>>> import sys
[*]>>>
[/list]

"Sys.py" is definitely there without a doubt! What the mystery is, is why would someone want to import it?

I too found this same thing happening to me when I first started using Python and I was mystfied that something AMAZING:icon_eek: didn't happen when I first imported it, and wondered for a long time that maybe I was doing something wrong and that had I ruined Python:icon_cry:...but I know now for sure that his machine is working all right!:)

fredzik.

Hi,

The "Message" box is going funny again. The code should have come out exactly as theirs did...so here it is again:

>>> import sys
>>>

Bye.:)

fredzik.

Yes, I've come to realize that it's working, I was just looking for a module named sys.py. It must be part of some other module file, but I don't know which one; maybe os.py?

Not all modules are modulename.py files. Some of them are .pyc (Python bytecode) or .pyd (Python dll) )files. My best guess is that the module sys is written in C and is part of the Python24.dll/Python25.dll. If you run the Windows version of Python, this file is installed in the Windows\system32 folder.

>>My best guess is that the module sys is written in C

It is written in C(according to phrase in Dive Into Python).

kath.

sysmodule.h in C:\Python25\include

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.