Re: [Tutor] Trouble getting os.execl() command to work

2007-02-10 Thread Luke Paireepinart
See my comments in-line with the rest of the e-mail. Richard Querin wrote: > import os > import string > > # get a list of the files in the current working directory > > filelist = os.listdir(os.getcwd()) Ok we have a list of all the files > > # run through the list and convert all of them to lower

[Tutor] Trouble getting os.execl() command to work

2007-02-10 Thread Richard Querin
I'm having a slight problem here. I've got a script (shown below) which is run from the command line. I am converting the filenames to lowercase and then, for each .cr2 file, I'm building a command line and running it. Seems pretty simple. I print the resulting command line and it looks fine, but

Re: [Tutor] Converting Filenames to Lower case

2007-02-10 Thread Kent Johnson
Richard Querin wrote: > Hi, I'm interested in a writing a quick python script for use on the > command line. I'm at the linux terminal inside a directory with a bunch > of files. The files have mixed case (some are .JPG and some are .jpg, > etc..) I'd like to be able to run a python script that

[Tutor] Converting Filenames to Lower case

2007-02-10 Thread Richard Querin
Hi, I'm interested in a writing a quick python script for use on the command line. I'm at the linux terminal inside a directory with a bunch of files. The files have mixed case (some are .JPG and some are .jpg, etc..) I'd like to be able to run a python script that will take all the files in the d

[Tutor] Geolocating objects

2007-02-10 Thread anil maran
Hello i m trying to use python to find the proximity of a person using lat long gps and zipcodes. I m using python. please point me to resources for this thanks a lot Anil - Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.__

Re: [Tutor] Creating an Identifier or Object Name from a String?

2007-02-10 Thread Daniel Yoo
>> I thought when I read the 2002 thread with the subject (Creating an >> Identifier or Object Name from a String?), that I had found a solution >> to my problem. Wait. But what was the solution you ended with? If the conclusion of that thread was to use eval(), then that was the wrong lesso

Re: [Tutor] Creating an Identifier or Object Name from a String?

2007-02-10 Thread Luke Paireepinart
Hazlett, Les wrote: > > Hi, > > I read the information at > http://mail.python.org/mailman/listinfo/tutor but am still not sure > how to properly send a question. Will I get an email response without > joining the list? > You will get an e-mail response from me because I am using the reply-all

[Tutor] Creating an Identifier or Object Name from a String?

2007-02-10 Thread Hazlett, Les
Hi, I read the information at http://mail.python.org/mailman/listinfo/tutor but am still not sure how to properly send a question. Will I get an email response without joining the list? Thanks for any help. Les I thought when I read the 2002 thread with the subject (Creating an Identifier

[Tutor] MSI Installers for python

2007-02-10 Thread demonic . software
Hello, I was wondering if anyone can offer any examples, pointers, tutorials, or howtos on developing an MSI installer file for windows using Python. I found the msilib reference in the Python 2.5 documents, but I am not familiar with this area and I am trying find any examples (code wise)

Re: [Tutor] class methods as argument

2007-02-10 Thread Kent Johnson
thomas coopman wrote: > On Sat, 10 Feb 2007 09:04:15 -0500 > Kent Johnson <[EMAIL PROTECTED]> wrote: >> If you do want to keep FooList then you should call >> SortedList.__init__() to set the compare function. >> SortedList.__init__ is an unbound function so you call it like this: >>SortedLis

Re: [Tutor] class methods as argument

2007-02-10 Thread thomas coopman
On Sat, 10 Feb 2007 09:04:15 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > thomas coopman wrote: > > > > also, > > Is it better to use super in FooList? and how should I use it then? > > Actually I would say that FooList is not pulling its weight. > SortedList already allows specialization by

Re: [Tutor] class methods as argument

2007-02-10 Thread Kent Johnson
thomas coopman wrote: > Thank you for the explanation of bound and unbound methods. > I understand that it is more common to use a bound method, but I don't > think that I can use this because at the time I save the method, I don't > know anything about the instances. That would be an appropriate

Re: [Tutor] class methods as argument

2007-02-10 Thread thomas coopman
On Sat, 10 Feb 2007 07:55:54 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > thomas coopman wrote: > > Hi, > > > > I want to do something like this, don't know how to properly > > explain it, so I just give you some example code > > > class Foo(object): > def method(self, arg): >

Re: [Tutor] Identity operator (basic types)

2007-02-10 Thread Kent Johnson
Cecilia Alm wrote: > Why does the identity operator return "True" in the below cases, that is > when assigning the same value to basic variable types (float, integer, > string, bool..)? Are these rcopied by reference (shallow)? If so why? Assignment in Python is always by reference. Variables i

Re: [Tutor] class methods as argument

2007-02-10 Thread Andrei
Hi Thomas, thomas coopman wrote: > I want to execute the class method given as argument, > but this obvious doesn't work, but I don't know how to > get it work, Pass the method reference of the class as argument, like this: >>> class A(object): ... def __init__(self, x): self.x = x ...

Re: [Tutor] class methods as argument

2007-02-10 Thread Kent Johnson
thomas coopman wrote: > Hi, > > I want to do something like this, don't know how to properly explain it, > so I just give you some example code > class Foo(object): def method(self, arg): print arg > def doSomething(object, func): object.func("test") >

Re: [Tutor] class methods as argument

2007-02-10 Thread thomas coopman
On Sat, 10 Feb 2007 22:10:52 +1000 Jonathan McManus <[EMAIL PROTECTED]> wrote: > It's pretty easy to make this work, actually. The issue is in the > "doSomething" method. > > > >>>class Foo(object): > > >>> def method(self, arg): > > >>> print arg > > > > >>>def doSomething(object, func)

[Tutor] class methods as argument

2007-02-10 Thread thomas coopman
Hi, I want to do something like this, don't know how to properly explain it, so I just give you some example code >>>class Foo(object): >>> def method(self, arg): >>> print arg >>>def doSomething(object, func): >>> object.func("test") >>>object = Foo() >>>doSomething(object,