Re: Importing Modules
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", which could be "module5.py" or "module11199.py" or "module345.py". -- http://mail.python.org/mailman/listinfo/python-list
Importing Modules
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
Re: Importing User-defined Modules
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/mailman/listinfo/python-list
Importing User-defined Modules
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 someone [who understands it] please be able to give me a synopsis of it, along with a few explanatory examples, or some other alternatives, if any? -- http://mail.python.org/mailman/listinfo/python-list
Re: Consecutive Character Sequences
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://mail.python.org/mailman/listinfo/python-list
Consecutive Character Sequences
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, because "a", "e", 8, and "b" is repeated 2 or 3 times. Thanks for any assistance. W. Brunswick. -- http://mail.python.org/mailman/listinfo/python-list
Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code
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