473,395 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Mysterious non-module A.sys

I have a package A containing a null __init__.py and a simple module B.py

C:\code>cat A\B.py
import sys
print __file__
print sys.modules.keys()

C:\code>python -c"import A.B"
A\B.py
['copy_reg', 'A.B', 'locale', '__main__', 'site', '__builtin__', 'encodings',
'os.path', 'A.sys', 'encodings.codecs', 'ntpath', 'UserDict',
'encodings.exceptions', 'nt', 'A', 'stat', 'zipimport', 'warnings',
'encodings.types', '_codecs', 'encodings.cp1252', 'sys', 'codecs', 'types',
'_locale', 'signal', 'linecache', 'encodings.aliases', 'exceptions', 'os']

C:\code>

where does A.sys come from? I tried an experiment and it seems that it's the
import statement in B.py so if I changed that to import sys,socket I also get
A.socket so I assume it's the import within import that causes these strange
modules to appear.

Strangely, attempts to import A.sys fail and its value in sys.modules is None.
What is the entry for?
--
Robin Becker

Jan 10 '06 #1
0 847

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: johnnyboy10017 | last post by:
I am having a hell of a time with what I think is a very simple query: It won't actually insert a new record into the specified table, but returns no error, in fact it returns "1" (or true) that...
4
by: Viorel | last post by:
For me is a little bit mysterious how work encoding and decoding functions, what is underneath of their calling? Encoding1.GetBytes(string1); in particularly ASCII.GetBytes(string1) ...
0
by: SteveS | last post by:
Can anyone help with a mysterious problem that has arisen since 'upgrading' from 8 to 9.2.0.4? The situation is this: Queries that worked fine under 8 are now producing *really* strange...
28
by: Glenn Alcott | last post by:
On a page I am working on which has three graphic buttons, there is a small line between two of the buttons which links to the same page as one of the buttons. I have no idea how this line got in...
3
by: Alfonzo Morra | last post by:
Hi, I recently started using VC7.1 (upgraded from VC6). I've noticed that when stepping through code, some of the values of my variables make no sese at all. For instance, I had some code like...
1
by: Bruce W.1 | last post by:
BACKGROUND My ASP.NET app has been running (or rather available) on a server for about 4 months now. The server is at http://www.webhost4life.com/ They don't add cookies to any of the sites...
11
by: John M. Gabriele | last post by:
Consider the following: #!/usr/bin/python #----------------------------------------------------------------- class Grand_parent( object ): def speak( self ): print 'Grand_parent.speak()'...
33
by: Martin Jørgensen | last post by:
Hi, In continuation of the thread I made "perhaps a stack problem? Long calculations - strange error?", I think I now got a "stable" error, meaning that the error always seem to come here now...
9
by: Gerry | last post by:
I'm using pyExcelerator and xlrd to read and write data from and to two spreadsheets. I created the "read" spreadsheet by importing a text file - and I had no unicode aspirations. When I read...
7
by: Jess | last post by:
Hello, In the appendix of Accelerated C++, there is a declaration statement const char * const * const * cp; The author says the specifiers are "const char" and the declarator is "* const *...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.