469,908 Members | 2,219 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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 2765
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
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.