944,023 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 1943
  • Python RSS
Jun 10th, 2007
0

Where's Nemo?

Expand Post »
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:

python Syntax (Toggle Plain Text)
  1. >>> import sys
  2. >>>

Cheers
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Zorbie is offline Offline
6 posts
since May 2007
Jun 10th, 2007
0

Re: Where's Nemo?

Python Syntax (Toggle Plain Text)
  1. >>> import sys
  2. >>>
Hmm, it seems to work. What did you expect to happen?
Reputation Points: 19
Solved Threads: 58
Junior Poster
mawe is offline Offline
133 posts
since Sep 2005
Jun 10th, 2007
0

Re: Where's Nemo?

Hi,

Yes mawe you're right, I've tried it as well and it seems to be performing.
Python Syntax (Toggle Plain Text)
  1. [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 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...but I know now for sure that his machine is working all right!

fredzik.
Reputation Points: 10
Solved Threads: 5
Junior Poster in Training
fredzik is offline Offline
55 posts
since Feb 2007
Jun 10th, 2007
0

Re: Where's Nemo?

Hi,

The "Message" box is going funny again. The code should have come out exactly as theirs did...so here it is again:
Python Syntax (Toggle Plain Text)
  1. >>> import sys
  2. >>>

Bye.

fredzik.
Reputation Points: 10
Solved Threads: 5
Junior Poster in Training
fredzik is offline Offline
55 posts
since Feb 2007
Jun 10th, 2007
0

Re: Where's Nemo?

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Zorbie is offline Offline
6 posts
since May 2007
Jun 10th, 2007
0

Re: Where's Nemo?

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.
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Jun 15th, 2007
0

Re: Where's Nemo?

>>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.
Reputation Points: 19
Solved Threads: 34
Posting Whiz in Training
katharnakh is offline Offline
237 posts
since Jan 2006
Jun 15th, 2007
0

Re: Where's Nemo?

sysmodule.h in C:\Python25\include
Reputation Points: 10
Solved Threads: 7
Light Poster
StrikerX11 is offline Offline
27 posts
since Jun 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: python mysql doesnt work?plz help
Next Thread in Python Forum Timeline: My prime Number generator





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC