This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: import on cElementTree on Windows
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, thomasbhickey
Priority: normal Keywords:

Created on 2006-08-09 21:13 by thomasbhickey, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
testElementTree.py thomasbhickey, 2006-08-09 21:13 Python script importing cElementTree
Messages (4)
msg29490 - (view) Author: Thomas B Hickey (thomasbhickey) Date: 2006-08-09 21:13
run this one-line file on Windows 2000:

import xml.etree.cElementTree

It generates the message:
usage: copy.py inputFile outputFile

If you give it a couple of file names it at least reads
in the first.

--Th
msg29491 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-10 07:37
Logged In: YES 
user_id=849994

Could you provide more information? The string "usage:
copy.py" exists nowhere in the Python source distribution,
so I think it must be something on your end.
msg29492 - (view) Author: Thomas B Hickey (thomasbhickey) Date: 2006-08-10 12:58
Logged In: YES 
user_id=274109

OK, the text is coming from a script 'copy.py' that is in
the same directory as the file with the import of
xml.etree.cElementTree.

If I delete my copy.py (and it's associated copy.pyc) then I
don't see the message.

I just installed 2.5b3 and still get the same behavior. 
Somehow the import seems to be running my copy.pyc script.

--Th
msg29493 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-10 13:02
Logged In: YES 
user_id=849994

This is because the ElementTree package imports the copy
module (which is a Python standard module). It's the same
effect as having an "os.py" file in the current directory
and doing "import os".
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43802
2006-08-09 21:13:38thomasbhickeycreate