Re: Importing Modules

2005-11-02 Thread Walter Brunswick
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"

Importing Modules

2005-11-02 Thread Walter Brunswick
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

2005-07-25 Thread Walter Brunswick
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

Importing User-defined Modules

2005-07-24 Thread Walter Brunswick
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

Re: Consecutive Character Sequences

2005-07-14 Thread Walter Brunswick
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

Consecutive Character Sequences

2005-07-13 Thread Walter Brunswick
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,

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-02 Thread Walter Brunswick
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