Re: [Tutor] Regular Expression help - parsing AppleScript Lists as Strings

2007-11-01 Thread Andrew Wu
Ah - thanks for the correction! I missed the extra grouping and the extra spacing ... doh! Sorry about the HTML-formatted e-mail ... Thanks also for the pyparsing variant as well - I didn't know the module existed before! Andrew On 11/1/07, Kent Johnson <[EMAIL PROTECTED]> wrot

[Tutor] Regular Expression help - parsing AppleScript Lists as Strings

2007-10-31 Thread Andrew Wu
Hi, I'm writing utilities to handle return values from AppleScript in python and one of the steps is recognizing when a returned value from an AppleScript execution (via popen and osascript) represents a list (in AppleScript) or not. For the most part I think I have the correct matching pattern,

Re: [Tutor] Help with packages and namespaces please

2007-10-17 Thread Andrew Wu
Thanks again for your help. I guess I should ask a more basic question about hierarchical directory structures and packages. If I have a bunch of files in a flat (single) directory structure that I want to reorganize into a hierarchical directory structure, do I necessarily have to turn them into

Re: [Tutor] Help with packages and namespaces please

2007-10-15 Thread Andrew Wu
After a more careful perusing and sifting of your response, I discovered this helped my understanding a lot better: > > You can bring names into the package namespace, but the actual code will > still run in the module where it is defined. For example, in > PrintMe/PrintBase/__init__.py you can s

Re: [Tutor] Help with packages and namespaces please

2007-10-15 Thread Andrew Wu
comments inline ... On 10/13/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > > Andrew Wu wrote: > > > Let's say I have these files in one directory: > > > > PrintBase.py > > PrintHello.py > > PrintBye.py > > > I'd like to reorganize the file

[Tutor] Help with packages and namespaces please

2007-10-12 Thread Andrew Wu
Hi all, I'm new to the list and relatively new to python, and very new to the use and creation of packages. Let's say I have these files in one directory: PrintBase.py PrintHello.py PrintBye.py PrintBase defines a very simple base class PrintBase, whose __init__ method initializes a member to a