How to import a module with spaces in the name

  • Thread starter =?ISO-8859-1?Q?Gregory_Pi=F1ero?=
  • Start date
?

=?ISO-8859-1?Q?Gregory_Pi=F1ero?=

Let's say I have a module named "Excellent Module.py"

How would I import that into a script? I'm guessing it will involve
the imp module somehow
(http://www.python.org/doc/2.4.2/lib/module-imp.html) but I didn't
figure it out.

----

And let's go ahead and pretend I have a good reason for doing this and
that I already know that spaces in module filenames should be avoided
at all costs!

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,285
Messages
2,571,415
Members
48,107
Latest member
jigyasauniversity

Latest Threads

Top