The purpose is rather irrelevant. The modules could be used for an assortment
of tasks.
By conditionals I mean if the name of a module contains a substring, such as
"asdf" (i.e. "asdf" in module) or matches a pattern of
some sort, for example, all modules which match the regex "module[\d]+\.py"
What is the best way to import all modules in a directory (and possibly a
subdirectory/subdirectories), possibly including
conditionals, such as regexes?
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Guettler, your solution was very impractical besides being ignorant of
my problem. Thanks for trying nonetheless.
Andrew Clover, that is exactly what I was looking for. A few examples would
have been nice, but I think I can manage from here.
Thanks you.
--
http://mail.python.org/mail
I need to import modules with user-defined file extensions that differ from
'.py', and also (if possible) redirect the bytecode
output of the file to a file of a user-defined extension.
I've already read PEP 302 (http://www.python.org/peps/pep-0302.html), but I
didn't fully understand it. Would
Thank you [EMAIL PROTECTED] <[EMAIL PROTECTED]>, George Sakkis <[EMAIL
PROTECTED]> and Aries Sun <[EMAIL PROTECTED]> for your
code contributions. I haven't tested them yet, but they look alright and enough
for me to work with.
Thanks to everyone else for your comments.
W. Brunswick.
--
http
Is there any way to [efficiently] iterate through a sequence of characters to
find N [or more] consecutive equivalent characters?
So, for example, the string "taaypiqee88adbbba" would return 1 if the number
(of consequtive characters) supplied in the parameters
of the function call was 2 or 3,
Why not just update the local dictionary?
class Grouping:
def __init__(self,x,y,z):
self.__dict__.update(locals())
--
http://mail.python.org/mailman/listinfo/python-list