Re: Making a shorter shebang

2006-10-14 Thread veracon
Thanks, at least now I know I wasn't doing something wrong. Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, veracon wrote: > > > Actually, it appears to still be using the default binary > > (/usr/bin/python). Can I be sure it's actually

Re: Making a shorter shebang

2006-10-14 Thread veracon
Actually, it appears to still be using the default binary (/usr/bin/python). Can I be sure it's actually reading the .profile file? I'm executing through regular CGI in Apache. veracon wrote: > Thanks a lot! > > Jerry wrote: > > /usr/bin/env just searches your PATH va

Re: Making a shorter shebang

2006-10-14 Thread veracon
rything else. > > example in .profile: > > PATH=/home//python2.5:$PATH > export PATH > > -- > Jerry > > On Oct 14, 10:37 am, "veracon" <[EMAIL PROTECTED]> wrote: > > Long story short, in order to use Python 2.5, I've compiled it in my > > own accoun

Making a shorter shebang

2006-10-14 Thread veracon
Long story short, in order to use Python 2.5, I've compiled it in my own account on my hosting. It works fantastic as /home/my_username/python2.5, but the shebang is a bit long. Is there a way to shorten it (environment variables?) or, even better, make /usr/bin/env python point to it? Thanks in a

Hierarchy - how?

2006-04-30 Thread veracon
I'd like to know how to make the following string: food fruit red cherry yellow banana meat pork foo bar baz qux Result in a dictionary like this: {'food': {'fruit': {'red': 'cherry', 'yellow': 'banana'}, 'meat': 'pork'}, 'foo': {'bar': 'baz', 'qux': {}}} Or something like that

Parsing XML/XSLT

2006-04-23 Thread veracon
Hello, I'm looking to use XML and XSLT for templates in a system I'm writing, however I'm not really sure which parser is the "best". Basically, which library has the most features, and which is the most supported? A guide I saw mentioned importing xml.xslt, however it appears the xml module/pack

Re: re.sub problem

2006-03-31 Thread veracon
Thanks a lot! Compiling with re.DOTALL did fix my problem for the most part; there still are a few problems with my code, but I think I can fix those myself. Again, thanks! > Okay I just woke up and haven't had enough coffee so if I'm off here > please forgive me. Are you saying that if there is

Re: re.sub problem

2006-03-31 Thread veracon
Actually, it happens in general when there is more than one linebreak between the open and close statements; not only when there are empty lines. -- http://mail.python.org/mailman/listinfo/python-list

re.sub problem

2006-03-31 Thread veracon
I'm trying to make a (tiny) template system (Cheetah and like have far more than what I need), but I've run into a problem. To simplify everything, I've decided to make for loops matching the indentation level of the open and close statements; it appears to work fine, but apparently it chokes once

Find directory name of file?

2006-01-29 Thread veracon
I'm pretty new at Python, so I have no idea how to do this: How do I find the name of the directory that contains the application currently being executed (e.g. if the file is /home/user/file.py, I want to get the /home/user part)? Thanks! -- http://mail.python.org/mailman/listinfo/python-list