Re: [Tutor] decorators (the "at" sign)?

2010-10-27 Thread Siren Saren
Alex, Many people have trouble wrapping their minds around decorators.  I couldn't find a decent explanation either until reading an allegedly 'advanced' python book (b/c 'advanced' is in the title, I guess). An easy explanation might be sufficient, if you don't intend to use them yourself.  A

Re: [Tutor] Problem Passing VARs to Python from PHP & capturing return string

2010-10-27 Thread Dave Angel
On 2:59 PM, Roy Hinkelman wrote: I am posting here as well as a PHP list since I am now getting an odd python error. Rance: Thanks for the note. I get the same error with system or exec or passthru Now, this is very strange. I made the command line string more explicit, and now it recognizes

Re: [Tutor] Which string operation is best to extract text from database string?

2010-10-27 Thread Emile van Sebille
On 10/27/2010 9:45 AM Sean Carolan said... Forgive me for the newbie question; I'm sure there must be an easy way to do this in python: I have a database string that I'm grabbing from a file with readlines(): db.url=jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server.comp

[Tutor] Python xlwt unicoderror

2010-10-27 Thread Susana Iraiis Delgado Rodriguez
I'm starting to use xlwt to create excel files, my excel sheet is designed to get information from a python module. The data came from a raster file, the problem is that some kind of sign or character doesn't allow the file to be written. This is my script: import sys, os, time, socket, codecs fro

[Tutor] os.listdir for symbolic links?

2010-10-27 Thread Sean Carolan
Is there an easy way to find the target of a symbolic link on a Linux system with python? I'm looking for something like the output of the bash command: "ls -l" ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http:/

Re: [Tutor] os.listdir for symbolic links?

2010-10-27 Thread Lie Ryan
On 10/28/10 06:57, Sean Carolan wrote: > Is there an easy way to find the target of a symbolic link on a Linux > system with python? I'm looking for something like the output of the > bash command: "ls -l" you're looking for >>> os.path.realpath('/bin/uncompress') '/bin/gunzip'

Re: [Tutor] decorators (the "at" sign)?

2010-10-27 Thread Alex Hall
Thanks to all for the explanations. I think I understand how this works, basically. I doubt I will use the concept anytime soon, but I think I get it enough to follow what is happening in the source code of the application I am examining. On 10/27/10, Siren Saren wrote: > Alex, > > Many people ha

Re: [Tutor] The Format Specification Mini-Language of Python 3.1

2010-10-27 Thread Richard D. Moores
On Wed, Oct 27, 2010 at 09:29, Richard D. Moores wrote: > > In addition, if you are interested in doing some simple web scraping with > 3.1, highlighted lines 6, 25, 26 in my code show what worked for me with > what at first was very hard to understand unti