467,075 Members | 980 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,075 developers. It's quick & easy.

trouble importing modules

I come from a Perl and C background and have been given an application
written in Python to maintain and I know very little about Python.
I'm having trouble at run time with importing modules. Specifically,
in several places time.strptime() is being used and Freeze is being
used to produce binaries for each platform where this application
runs. _strptime.py is also being supplied with the binaries.

The first problem I encountered coming from _strptime.py was:

ImportError: No module named calendar

_strptime.py imports calendar, but my thought was that since freeze
isn't being run against _strptime.py directly, the calendar module may
not be getting built into the resulting binary. So, I added "import
calendar" to the file I'm running freeze against. This fixed
(probably not in the proper way) the above error, but now I'm getting
from calendar.py:

ImportError: No module named datetime

So, my question is how can I ensure that all modules that
_strptime.py, calendar.py, etc. rely are built in the resulting
binaries without having to import everything explicitly in my code?

I'm using Python 2.3.4.

Thanks.

--
Brandon
Jul 21 '05 #1
  • viewed: 909
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Frans Englich | last post: by
12 posts views Thread by qwweeeit@yahoo.it | last post: by
3 posts views Thread by Charles Krug | last post: by
reply views Thread by Michael Williams | last post: by
14 posts views Thread by T. Crane | last post: by
reply views Thread by Martin P. Hellwig | last post: by
7 posts views Thread by Hussein B | last post: by
4 posts views Thread by boblatest@googlemail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.