472,122 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to import filenames with special characters?

How would I import a python file whose name contains characters like .'s or
!'s?

Is there really _no_ way to do that? I have to use plain jane letters and
numbers for everything?
Jun 27 '08 #1
1 3539
inhahe wrote:
How would I import a python file whose name contains characters like .'s or
!'s?

Is there really _no_ way to do that? I have to use plain jane letters and
numbers for everything?
The import statement can't help you, but take a look at the __import__
builtin function and the standard module named "imp".

Gary Herron
*
*
>
--
http://mail.python.org/mailman/listinfo/python-list
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Manlio Perillo | last post: by
9 posts views Thread by ajikoe | last post: by
2 posts views Thread by Taras_96 | last post: by
1 post views Thread by mohanng | last post: by

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.