[PythonCE] RE: shutil import failure
r_deeley at yahoo.com
Mon May 10 12:53:19 EDT 2004
A postscript to all this: I followed one of the links in your
other mail and downloaded a 2.3 version. It's directory structure
is a little different from the 2.2 version I had. For example, the
2.3 version has a DLLs directory that 2.2 does not. (It also has
a _tkinter package). (It does not have a shutil.dll, though - so
the reference to that is still not solved)
It seems, by following the links, that the version at debris.demon.nl
is likely to be the 2.3 successor to 2.2 at murkworks, although both
seem to have the same origins (murkworks appears down at this writing)
Is that a correct interpretation ?
It would be handy if the mailing list had a link to a one page summary
of what is where and the status of the releases (as a bonus it may cut
down on email traffic too because if 2.3 is the true successor, then
no need to try to fix 2.2).
--- Richard Deeley <r_deeley at yahoo.com> wrote:
> OK. Some general thoughts on all this and some attempts at trying
> to rationalize the problem a little more. Thanks for taking a look
> at it.
> Recall that it will work (ie not require a dll), if I provide the
> shutil.py in the working directory. Then I get a .pyc and the program
> runs OK.
> But if I move the file that now works to the lib area, it will fail
> again. Put it back in the user area, it works.
> I don't know enough about how the python loading works, but it seems
> to imply that somewhere there is a list of dependencies/rules that it
> is checking. This list differs between the lib than the user area.
> Presumably it applies rules to the user area first, then to the
> lib area if nothing found in user area.
> >From what I can see there are only 2 pyd files and 2 dll files in the
> distribution. The main dll of interest is python22.dll. By its name
> I would presume that everything that needs dll support is in there.
> I would further guess that everything in the dll is available for any
> invocation of python. I guess I am a little surprised by the reference
> to shutil.dll, because I don't see any module specific dll's in my
> distribution at all. Yet aside from shutil, things seem to be working
> just fine.
> But if you just want shutil to work, put the shutil.py with your code and
> let it compile that. So at the very least, we have a workaround for it.
> (at least I seem to, does this work for anyone else ?). So why does it
> require a dll in the first place ? (or conversely, why don't I have
> any more than 2 dlls in my release).
> Anyway, good to have had some input on all this. Hopefully the issue
> will disappear on a future release.
> --- Isr Gish <isrgish at fastem.com> wrote:
> > Hi Richard.
> > Richard Deeley wrote:
> > >OK, The DOS console I have doesn't seem to support cut and
> > >paste, so I will type it in here with as best as I can...
> > >
> > >Traceback:
> > >
> > >shell.py 553 in RunCode imp.load_module("__main__", file, fname, imp_params)
> > >File (mine.py) line 2 in ?
> > > from (anotherofmine.py) import *
> > >File (anotherofmine.py), line 6 in ?
> > > import shutil
> > >NameError: Can't find file for module shutil
> > >(filename shutil.dll)
> > >
> > what I do see is that this is not a Import Error which is usually raised when you import a
> > module thats not there. That seems to say that the problem is not with the actuall import but
> > rather with some name in the imported file. The error message also seems to point to that by
> > saying "Can't find *file* for module shutil (filename shutil.dll)"
> > Which seems to say that file shutil.dll is missing.
> > I would advise you to post this problem on the tutor list (tutor at python.org). You may need to
> > sign up for it. Which can be done at http://mail.python.org/mailman/listinfo/tutor
> > >
> > >Version is 2.2+ (#0 Jan 20 2002, 13:30:34) [MSC 32 bit (ARM)] on Pocket PC
> > >
> > >(seems a little ancient seeing as I only downloaded it fairly recently)
> > There is a newer version at:
> > http://www.voidspace.org.uk/coollinks/python_links.shtml
> > Scrooldown to the header named "PocketPC Programming"
> > and there you will see a link named "http--debris.demon.nl-PythonCE-2.3"
> > >
> > >Let me know if you need anything else on this...
> > >
> > >
> > >Richard.
> > >
> > All the best,
> > Isr
> > _______________________________________________
> > PythonCE mailing list
> > PythonCE at python.org
> > http://mail.python.org/mailman/listinfo/pythonce
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> PythonCE mailing list
> PythonCE at python.org
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
More information about the PythonCE