Re: no pass-values calling?

2008-01-16 Thread Ben Finney
Christian Heimes <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > The term "reference" is fine, since that's exactly how it works. > > One gets at an object via some reference, be it a name or some > > access into a container object. When an object has no more > > references to itself, it becom

Re: itertools.groupby

2008-01-16 Thread Paul Rubin
Tobiah <[EMAIL PROTECTED]> writes: > I tried doing this with a simple example, but noticed > that [].sort(func) passes two arguments to func, whereas > the function expected by groupby() uses only one argument. Use: [].sort(key=func) -- http://mail.python.org/mailman/listinfo/python-list

Re: import from question

2008-01-16 Thread Ben Finney
Tobiah <[EMAIL PROTECTED]> writes: > This is a little surprising. So "from mod import *" really copies > all of the scalars into new variables in the local namespace. No. Nothing is copied. All the objects (remembering that in Python, *everything* is an object) created by the code in module 'mod'

Generic string import like in strptime?

2008-01-16 Thread Andre
Hi there Is there a function like strptime, which takes a string and converts it into an array depending on a format string I provide. Like: >>> a = '3456\tblub-blib.0.9' >>> b = '%d\t%s-%s.%f' >>> c = mysticalfunction(a,b) >>> print c [3456,'blub','blib',0.9] Many thanks Andre -- http://mai

Re: where do my python files go in linux?

2008-01-16 Thread Jorgen Bodde
Hi All, Sorry for the late reply back, I had a busy weekend ... it seems there is no clear way to do it and maybe that is why I was / am so confused. Eventually I searched for *.py files, and like I said most apps seem to install in /usr/share/{app} I believe that location is for data only that i

ANN: CaltrainPy 0.2

2008-01-16 Thread Heikki Toivonen
CaltrainPy is a Caltrain (http://caltrain.com/) schedule program and library written in Python. It uses Tkinter for GUI. What is new in version 0.2? - AM/PM indicators - train types - can be used as a module to parse Caltrain schedule - MIT License - setup.py Parsing of Caltrain schedule require

anti-spam policy for c.l.py?

2008-01-16 Thread _wolf
this list has been receiving increasing amounts of nasty OT spam messages for some time. are there any plans to prevent such messages from appearing on the list or to purge them retrospectively? _wolf -- http://mail.python.org/mailman/listinfo/python-list

Re: searching an XML doc

2008-01-16 Thread grflanagan
On Jan 15, 9:33 pm, Gowri <[EMAIL PROTECTED]> wrote: > Hello, > > I've been reading about ElementTreee and ElementPath so I could use > them to find the right elements in the DOM. Unfortunately neither of > these seem to offer XPath like capabilities where I can find elements > based on tag, attrib

Re: searching an XML doc

2008-01-16 Thread Gowri
Hi Gerard, I don't know what to say :) thank you so much for taking time to post all of this. truly appreciate it :) -- http://mail.python.org/mailman/listinfo/python-list

using pyopengl 3.0.0b1 with py2exe

2008-01-16 Thread Sébastien Ramage
Hi ! How can I make an exe that use the new pyopengl 3.0.0b1 ??? I use py2exe 0.6.6 with the 3.0.0a6 version I have make it working by copying the egg and by forcing loading it at the start of the app but it doesn't work with this version py2exe correctly detect it and include it in the app but

Shed Skin (restricted) Python-to-C++ Compiler 0.0.26

2008-01-16 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.0.26, with the following goodies: -Almost complete support for os.path (bootstrapped using Shed Skin) -Support for collections.defaultdict (completing collections) -Much improved support for the os module (though many methods remain) -Support for 5 of 7 la

Re: no pass-values calling?

2008-01-16 Thread Steven D'Aprano
On Wed, 16 Jan 2008 17:46:39 +1100, Ben Finney wrote: > Christian Heimes <[EMAIL PROTECTED]> writes: > >> Dennis Lee Bieber wrote: >> >Since all "variable" names in Python are references to objects, >> > anything accessed using a name is accessed by reference. >> >> Anybody using the terms v

Re: anti-spam policy for c.l.py?

2008-01-16 Thread Bruno Desthuilliers
_wolf a écrit : > this list has been receiving increasing amounts of nasty OT spam > messages for some time. are there any plans to prevent such messages > from appearing on the list or to purge them retrospectively? Apart from checking posts headers and complaining about the relevant ISPs, there

Re: no pass-values calling?

2008-01-16 Thread Bruno Desthuilliers
J. Peng a écrit : > On Jan 16, 2008 2:30 PM, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Wed, 16 Jan 2008 13:59:03 +0800, J. Peng wrote: >> >>> Hi, >>> >>> How to modify the array passed to the function? I tried something like >>> this: >>> >> a >>> [1, 2, 3] >> def mytest(x): >>> ..

Re: anti-spam policy for c.l.py?

2008-01-16 Thread Jeroen Ruigrok van der Werven
-On [20080116 12:51], Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: >Apart from checking posts headers and complaining about the relevant >ISPs, there's not much you can do AFAIK. This is usenet, not a mailing-list. It is both actually. python-list@python.org is linked to comp.lang

Re: no pass-values calling?

2008-01-16 Thread Torsten Bronger
Hallöchen! J. Peng writes: > On Jan 16, 2008 2:30 PM, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Wed, 16 Jan 2008 13:59:03 +0800, J. Peng wrote: >> >>> How to modify the array passed to the function? I tried >>> something like this: >>> >> a >>> [1, 2, 3] >> def mytest(x): >>> ...

Re: no pass-values calling?

2008-01-16 Thread Neil Cerutti
On Jan 15, 2008 10:09 PM, J. Peng <[EMAIL PROTECTED]> wrote: > Hello, > > I saw this statement in Core Python Programming book, > > All arguments of function calls are made by reference, meaning that > any changes to these parameters within the function > affect the original objects in the calling

Re: Python too slow?

2008-01-16 Thread Paul Boddie
On 16 Jan, 02:17, "Jaimy Azle" <[EMAIL PROTECTED]> wrote: > > Wow, serious... what you've done was really, really cool... :) In practice, not that cool. ;-) > I was expect there are nobody willing to do to have python runs Java > Language (such as PyPy) over CPython. Perhaps your javaclass does n

Re: Generic string import like in strptime?

2008-01-16 Thread Neil Cerutti
On Jan 16, 2008 3:34 AM, Andre <[EMAIL PROTECTED]> wrote: > Hi there > > Is there a function like strptime, which takes a string and converts it > into an array depending on a format string I provide. Like: > >>> a = '3456\tblub-blib.0.9' > >>> b = '%d\t%s-%s.%f' > >>> c = mysticalfunction(a,b) > >

Re: Basic inheritance question

2008-01-16 Thread Lie
On Jan 15, 9:00 pm, Bruno Desthuilliers wrote: > Lie a écrit : > > > > > On Jan 7, 2:46 am, Bruno Desthuilliers > > <[EMAIL PROTECTED]> wrote: > >> Lie a écrit : > > >>> On Jan 5, 5:40 pm, [EMAIL PROTECTED] wrote: > Jeroen Ruigrok van der Werven wrote: > > Shouldn't this be: > > self.

Re: no pass-values calling?

2008-01-16 Thread cokofreedom
On Jan 16, 1:21 pm, "Neil Cerutti" <[EMAIL PROTECTED]> wrote: > On Jan 15, 2008 10:09 PM, J. Peng <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I saw this statement in Core Python Programming book, > > > All arguments of function calls are made by reference, meaning that > > any changes to these pa

Re: no pass-values calling?

2008-01-16 Thread Neil Cerutti
On Jan 16, 2008 7:58 AM, <[EMAIL PROTECTED]> wrote: > On Jan 16, 1:21 pm, "Neil Cerutti" <[EMAIL PROTECTED]> wrote: > > In the following function, a is rebound with an assignment statement, > > while b is mutated, i.e., changed, with an assignment statement. > > > > def f(a, b): > > a = 12 > >

Re: Why this apparent assymetry in set operations?

2008-01-16 Thread Colin J. Williams
Steven D'Aprano wrote: > On Tue, 15 Jan 2008 11:25:25 -0500, Colin J. Williams wrote: > >> I'm sorry, there appears to be a bug: # tSet.py >> import sets >> s1= sets.Set([1, 2, 3]) >> s1.union_update([3, 4,5]) >> print(s1) >> s2= sets.Set([6, 7, 8]) >> s1 |+ s2 # This fails: >> exceptions

plz help how to print python variable using os.system()

2008-01-16 Thread jitender001001
hi all i m new to python and i have a problem of printing python variable using os.system() in bash !/usr/bin/env python var = "/home/anonymous" os.system("echo $var) it is not working.. i want to print string using os.system() plz help -- http://mail.

Unknown cause to error (new to python)

2008-01-16 Thread Brandon Perry
Hi, I am having to compile a standalone version of python for the web server I use (they don't allow access to /usr/bin/python). I posted earlier about a GLib error, but I have fixed that now. I am very close to getting this to work, but I am getting some weird errors. File "/home/vminds/public_ht

Re: plz help how to print python variable using os.system()

2008-01-16 Thread Lutz Horn
Hi, On Wed, 16 Jan 2008 05:29:08 -0800 (PST), [EMAIL PROTECTED] said: > var = "/home/anonymous" > os.system("echo $var) os.system("echo %s" % var) Lutz -- GnuPG Key: 1024D/6EBDA359 1999-09-20 Key fingerprint = 438D 31FC 9300 CED0 1CDE A19D CD0F 9CA2 6EBD A359 http://dev-random.

Re: no pass-values calling?

2008-01-16 Thread cokofreedom
> > No, my hypothesis is that Python's assignment statement semantics are > the tricky part--once you understand them, the utter simplicity of > Python's argument passing semantics will be evident. Indeed, I find the simple nature of it and the fact things tend not to change is extremely useful. I

Re: Interesting Thread Gotcha

2008-01-16 Thread Duncan Booth
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > It would have been nice, however, to have gotten something like: > > TypeError - This routine needs a tuple. > > instead of the silent in line calling of the routine in question, > while failing actually to start a new thread. Given that the sta

Re: Unknown cause to error (new to python)

2008-01-16 Thread Diez B. Roggisch
Brandon Perry wrote: > Hi, I am having to compile a standalone version of python for the web > server I use (they don't allow access to /usr/bin/python). I posted > earlier about a GLib error, but I have fixed that now. I am very close > to getting this to work, but I am getting some weird errors.

Re: Interesting Thread Gotcha

2008-01-16 Thread Bjoern Schliessmann
Hendrik van Rooyen wrote: > Absolutely! - well spotted! This is no threading problem at all; not even a syntax problem. If you don't know exactly what start_new_thread and kbd_driver functions do it's impossible to tell if your code does what is intended. > It would have been nice, however, to ha

Re: anti-spam policy for c.l.py?

2008-01-16 Thread Bruno Desthuilliers
Jeroen Ruigrok van der Werven a écrit : > -On [20080116 12:51], Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: >> Apart from checking posts headers and complaining about the relevant >> ISPs, there's not much you can do AFAIK. This is usenet, not a mailing-list. > > I

list classes in package

2008-01-16 Thread Dmitry
Hi All, I've trying to develop one Python application, and neet to solve one problem. I need to list all classes defined in one package (not module!). Could anybody please show me more convinient (correct) way to implement this? Thanks, Dmitry -- http://mail.python.org/mailman/listinfo/python-l

Re: Unknown cause to error (new to python)

2008-01-16 Thread Bruno Desthuilliers
Brandon Perry a écrit : > Hi, I am having to compile a standalone version of python for the web > server I use (they don't allow access to /usr/bin/python). I posted > earlier about a GLib error, but I have fixed that now. I am very close > to getting this to work, but I am getting some weird error

Re: Basic inheritance question

2008-01-16 Thread Bjoern Schliessmann
Lie wrote: > [EMAIL PROTECTED]> wrote: >> I used to systematically use it - like I've always systematically >> used 'this' in C++  and Java. > > And that is what reduces readability. IMHO not, IOPHO not. This is the nth time (n >> 1) this discussion comes up here. If I have learned one thing fr

Re: UTF-8 in basic CGI mode

2008-01-16 Thread Sion Arrowsmith
coldpizza <[EMAIL PROTECTED]> wrote: >I am using this 'word' variable like this: > >print u'' % (word) > >and apparently this causes exceptions with non-ASCII strings. > >I've also tried this: >print u'' % >(word.encode('utf8')) >but I still get the same UnicodeDecodeError.. Your 'word' i

Re: Python help for a C++ programmer

2008-01-16 Thread Lutz Horn
Hi, On Wed, 16 Jan 2008 06:23:10 -0800 (PST), "mlimber" <[EMAIL PROTECTED]> said: > I'm writing a text processing program to process some survey results. > I'm familiar with C++ and could write it in that, but I thought I'd > try out Python. I've got a handle on the file I/O and regular > expressi

Re: Python help for a C++ programmer

2008-01-16 Thread Neil Cerutti
On Jan 16, 2008 9:23 AM, mlimber <[EMAIL PROTECTED]> wrote: > I'm writing a text processing program to process some survey results. > I'm familiar with C++ and could write it in that, but I thought I'd > try out Python. I've got a handle on the file I/O and regular > expression processing, but I'm

Python help for a C++ programmer

2008-01-16 Thread mlimber
I'm writing a text processing program to process some survey results. I'm familiar with C++ and could write it in that, but I thought I'd try out Python. I've got a handle on the file I/O and regular expression processing, but I'm wondering about building my array of classes (I'd probably use a str

Re: Python help for a C++ programmer

2008-01-16 Thread Tim Chase
> I want something like (C++ code): > > struct Response > { >std::string name; >int age; >int iData[ 10 ]; >std::string sData; > }; > > // Prototype > void Process( const std::vector& ); > > int main() > { >std::vector responses; > >while( /* not end of file */ )

Paramiko/SSH blues....

2008-01-16 Thread Tarun Kapoor
I am using paramiko to do an SFTP file transfer... I was able to connect to the remote server using an SFTP client I have just to make sure that username and password are working.. But when i try to connect using this script it fails **hostname, username and password are declared. #

Re: Basic inheritance question

2008-01-16 Thread Bruno Desthuilliers
Lie a écrit : > On Jan 15, 9:00 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Lie a écrit : >> >> >> >>> On Jan 7, 2:46 am, Bruno Desthuilliers >>> <[EMAIL PROTECTED]> wrote: Lie a écrit : (snip) > No, seriously it isn't Java habits only, most other languages wouldn't > need ex

MSI read support in msilib?

2008-01-16 Thread Floris Bruynooghe
Hi The introduction from the msilib documentation in python 2.5 claims it supports reading an msi. However on the Record class there is only a GetFieldCount() method and some Set*() methods. I was expecting to see GetString() and GetInteger() methods to be able to read the values. Maybe I'm mis

Re: list classes in package

2008-01-16 Thread Diez B. Roggisch
Dmitry wrote: > Hi All, > > I've trying to develop one Python application, and > neet to solve one problem. I need to list all classes defined in one > package (not module!). > > Could anybody please show me more convinient (correct) way to > implement this? Look at the module inspect and it's

paramiko

2008-01-16 Thread Tarun Kapoor
I am using paramiko to do an SFTP file transfer... I was able to connect to the remote server using an SFTP client I have just to make sure that username and password are working.. This is the code. # now, connect and use paramiko Transport to negotiate SSH2 across the connection soc

Re: no pass-values calling?

2008-01-16 Thread Mel
J. Peng wrote: > Sounds strange. > In perl we can modify the variable's value like this way: > > $ perl -le ' >> $x=123; >> sub test { >> $x=456; >> } >> test; >> print $x ' > 456 Not all that strange. The Python equivalent is x=123 sub test() global x x=456 test() print x Pytho

Re: Python help for a C++ programmer

2008-01-16 Thread Bruno Desthuilliers
mlimber a écrit : > I'm writing a text processing program to process some survey results. > I'm familiar with C++ and could write it in that, but I thought I'd > try out Python. I've got a handle on the file I/O and regular > expression processing, FWIW, and depending on your text format, there ma

Re: Interesting Thread Gotcha

2008-01-16 Thread Diez B. Roggisch
Hendrik van Rooyen wrote: > "Dan" wrote: > > >> >>> keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) >> >> Needs to be >> >>> keyboard_thread = thread.start_new_thread(kbd_driver, (port_q,kbd_q)) >> >> Commas are important! >> >> -Dan > > Absolutely! - well spotted! > >

Re: error/warning color customization in interactive console?

2008-01-16 Thread Ian Clark
On 2008-01-16, yhvh <[EMAIL PROTECTED]> wrote: > Is it possible to output error messages in a different color? > I'm using Terminal on Gnome. >>> print "\033[1;31mHello\033[0m There!" Some reading: http://en.wikipedia.org/wiki/ANSI_escape_code http://www.ioncannon.net/ruby/101/fun-with-ansi-escap

Re: Generic string import like in strptime?

2008-01-16 Thread Paul Hankin
On Jan 16, 8:34 am, Andre <[EMAIL PROTECTED]> wrote: > Hi there > > Is there a function like strptime, which takes a string and converts it > into an array depending on a format string I provide. Like:>>> a = > '3456\tblub-blib.0.9' > >>> b = '%d\t%s-%s.%f' > >>> c = mysticalfunction(a,b) > >>> pr

Re: list classes in package

2008-01-16 Thread Guilherme Polo
2008/1/16, Diez B. Roggisch <[EMAIL PROTECTED]>: > Dmitry wrote: > > > Hi All, > > > > I've trying to develop one Python application, and > > neet to solve one problem. I need to list all classes defined in one > > package (not module!). > > > > Could anybody please show me more convinient (correct

Re: Unknown cause to error (new to python)

2008-01-16 Thread Brandon Perry
Sorry, this is all I can get. :-( This isn't my webserver, so the only error logs I get are what they give me. I guess I will just have to keep working at it. Thanks for looking at it though, Brandon On Wed, 2008-01-16 at 15:12 +0100, Bruno Desthuilliers wrote: > Brandon Perry a écrit : > > Hi,

Internet

2008-01-16 Thread i . shoba3
Internet You are using internet http://padmagirl.blogspot.com % -- http://mail.python.org/mailman/listinfo/python-list

Re: Python too slow?

2008-01-16 Thread Ed Jensen
[EMAIL PROTECTED] wrote: > A lecturer gave me the perfect answer to the question of speed. > > "You have two choices when it comes to programming. Fast code, or fast > coders." "You're either with us, or against us." George W. Bush My understanding is that while CPython performance won't

Re: Unknown cause to error (new to python)

2008-01-16 Thread Bruno Desthuilliers
Brandon Perry a écrit : (top-post corrected) >> >> On Wed, 2008-01-16 at 15:12 +0100, Bruno Desthuilliers wrote: >>> Brandon Perry a écrit : (snip context) but I am getting some weird errors. File "/home/vminds/public_html/torrents/python/lib/python2.2/socket.py", line 41, in ?

Re: Generic string import like in strptime?

2008-01-16 Thread Andre' John
Nice. Thanks a lot. Andre On Wed, 16 Jan 2008, Paul Hankin wrote: > On Jan 16, 8:34 am, Andre <[EMAIL PROTECTED]> wrote: > > Hi there > > > > Is there a function like strptime, which takes a string and converts it > > into an array depending on a format string I provide. Like:>>> a = > > '3456

Re: paramiko

2008-01-16 Thread Guilherme Polo
2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > I am using paramiko to do an SFTP file transfer… I was able to connect to > the remote server using an SFTP client I have just to make sure that > username and password are working.. This is the code. > > > > # now, connect and use paramiko

Re: Python too slow?

2008-01-16 Thread cokofreedom
On Jan 16, 5:52 pm, Ed Jensen <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > A lecturer gave me the perfect answer to the question of speed. > > > "You have two choices when it comes to programming. Fast code, or fast > > coders." > > "You're either with us, or against us." > > Georg

Re: paramiko

2008-01-16 Thread Tarun Kapoor
# now, connect and use paramiko Transport to negotiate SSH2 across the connection sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((hostname, port)) t = paramiko.Transport(sock) t.start_client() key = t.get_remote_server_key() event = threading.Eve

read_nonblocking error in pxssh

2008-01-16 Thread jrpfinch
I'm attempting to use the pxssh to execute commands on a remote machine and do stuff with the output. Both machines are running SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0 and Intel Solaris 9. I am hitting a problem with read_nonblocking in the pexpect module as follows: >>> import pxssh

Re: anti-spam policy for c.l.py?

2008-01-16 Thread _wolf
On Jan 16, 3:11 pm, Bruno Desthuilliers wrote: > Jeroen Ruigrok van der Werven a écrit : > > > -On [20080116 12:51], Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: > >> Apart from checking posts headers and complaining about the relevant > >> ISPs, there's

Re: paramiko

2008-01-16 Thread Guilherme Polo
2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > # now, connect and use paramiko Transport to negotiate SSH2 across > the connection > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > sock.connect((hostname, port)) > > t = paramiko.Transport(sock) > t.start_client() >

Re: paramiko

2008-01-16 Thread Tarun Kapoor
On Jan 16, 11:38 am, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > # now, connect and use paramiko Transport to negotiate SSH2 across > > the connection > > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > sock.connect((

Re: Interesting Thread Gotcha

2008-01-16 Thread Dan
On Jan 16, 11:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Dan" wrote: > > >> >>> keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) > > >> Needs to be > >> >>> keyboard_thread = thread.start_new_thread(kbd_driver, (port_q,kbd_q)) > > >> C

Re: paramiko

2008-01-16 Thread Guilherme Polo
2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > On Jan 16, 11:38 am, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > > > > > # now, connect and use paramiko Transport to negotiate SSH2 across > > > the connection > > > sock = socket.sock

Help with python shell

2008-01-16 Thread cbmeeks
I just upgraded my Python install up to version 2.5.1 (from 2.4.x) using source code and compiling. Everything went fine until I enter the command line mode and press any arrow keys. When I press UP arrow, I was getting my previous command as always but now I get: ^[[A What can I do to fix thi

Re: Interesting Thread Gotcha

2008-01-16 Thread Diez B. Roggisch
Dan schrieb: > On Jan 16, 11:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Hendrik van Rooyen wrote: >>> "Dan" wrote: >>> keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) Needs to be >>> keyboard_thread = thread.start_new_thread(kbd_driver, (port_q,kbd_q)

Re: Help with python shell

2008-01-16 Thread Diez B. Roggisch
cbmeeks schrieb: > I just upgraded my Python install up to version 2.5.1 (from 2.4.x) > using source code and compiling. > > Everything went fine until I enter the command line mode and press any > arrow keys. > > When I press UP arrow, I was getting my previous command as always but > now I get:

Current Special Vicoden

2008-01-16 Thread hetileva69812
Living in Pain. We can help Pain Meds Online discoveyamazing.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting Thread Gotcha

2008-01-16 Thread Dan
On Jan 16, 1:33 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Dan schrieb: > > > > > On Jan 16, 11:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> Hendrik van Rooyen wrote: > >>> "Dan" wrote: > >>> keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) > Need

Re: A question about event handlers with wxPython

2008-01-16 Thread Erik Lind
"Mike Driscoll" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Jan 15, 2:20 pm, "Erik Lind" <[EMAIL PROTECTED]> wrote: >> That all looks cool. I will experiment more. I'm a bit slow on this as >> only >> two weeks old so far. >> >> Thanks for the patience > > No problem. I'm pr

Re: MSI read support in msilib?

2008-01-16 Thread Martin v. Löwis
> The introduction from the msilib documentation in python 2.5 claims it > supports reading an msi. However on the Record class there is only a > GetFieldCount() method and some Set*() methods. I was expecting to > see GetString() and GetInteger() methods to be able to read the > values. > > May

Re: A question about event handlers with wxPython

2008-01-16 Thread Mike Driscoll
On Jan 16, 12:45 pm, "Erik Lind" <[EMAIL PROTECTED]> wrote: > "Mike Driscoll" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > On Jan 15, 2:20 pm, "Erik Lind" <[EMAIL PROTECTED]> wrote: > >> That all looks cool. I will experiment more. I'm a bit slow on this as > >> only > >> t

Creating unique combinations from lists

2008-01-16 Thread breal
I have three lists... for instance a = ['big', 'small', 'medium']; b = ['old', 'new']; c = ['blue', 'green']; I want to take those and end up with all of the combinations they create like the following lists ['big', 'old', 'blue'] ['small', 'old', 'blue'] ['medium', 'old', 'blue'] ['big', 'old',

Re: Interesting Thread Gotcha

2008-01-16 Thread Diez B. Roggisch
Dan schrieb: > On Jan 16, 1:33 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Dan schrieb: >> >> >> >>> On Jan 16, 11:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: Hendrik van Rooyen wrote: > "Dan" wrote: > keyboard_thread = thread.start_new_thread(kbd_driver (port_q,

Re: Help with python shell

2008-01-16 Thread cbmeeks
On Jan 16, 1:33 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > cbmeeks schrieb: > > > I just upgraded my Python install up to version 2.5.1 (from 2.4.x) > > using source code and compiling. > > > Everything went fine until I enter the command line mode and press any > > arrow keys. > > > When

RE: Creating unique combinations from lists

2008-01-16 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of breal > Sent: Wednesday, January 16, 2008 2:15 PM > To: python-list@python.org > Subject: Creating unique combinations from lists > > I have three lists... for instance > > a = ['big', 'small

handlers.SocketHandler and exceptions

2008-01-16 Thread writeson
Hi all, On our Linux systems at work I've written a Twisted logging server that receives log messages from multiple servers/processes to post them to a log file, essentially serializing all the process log messages. This works well, that is until I tried this test code: try: t = 10 / 0 except

Re: paramiko

2008-01-16 Thread Tarun Kapoor
On Jan 16, 12:22 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > On Jan 16, 11:38 am, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > # now, connect and use paramiko Transport to ne

Re: Help with python shell

2008-01-16 Thread Diez B. Roggisch
cbmeeks schrieb: > On Jan 16, 1:33 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> cbmeeks schrieb: >> >>> I just upgraded my Python install up to version 2.5.1 (from 2.4.x) >>> using source code and compiling. >>> Everything went fine until I enter the command line mode and press any >>> arro

Re: Creating unique combinations from lists

2008-01-16 Thread breal
On Jan 16, 11:33 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of breal > > Sent: Wednesday, January 16, 2008 2:15 PM > > To: [EMAIL PROTECTED] > > Subject: Creating unique combinations fro

ANN: Wing IDE 3.0.3 released

2008-01-16 Thread Wingware
Hi, We're happy to announce version 3.0.3 of Wing IDE, an advanced development environment for the Python programming language. It is available from: http://wingware.com/downloads This release focuses on fixing some usability issues found in Wing 3.0.2, including fixes for input handling in Debu

Re: Help with python shell

2008-01-16 Thread cbmeeks
On Jan 16, 2:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > cbmeeks schrieb: > > > > > On Jan 16, 1:33 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> cbmeeks schrieb: > > >>> I just upgraded my Python install up to version 2.5.1 (from 2.4.x) > >>> using source code and compiling. >

Re: Creating unique combinations from lists

2008-01-16 Thread Martin v. Löwis
> I could do nested for ... in loops, but was looking for a Pythonic way > to do this. Ideas? I find nested for loops very Pythonic. Explicit is better than implicit, and simple is better than complex. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: paramiko

2008-01-16 Thread Guilherme Polo
2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > On Jan 16, 12:22 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > > > > > On Jan 16, 11:38 am, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: >

Re: itertools.groupby

2008-01-16 Thread Tobiah
Paul Rubin wrote: > Tobiah <[EMAIL PROTECTED]> writes: >> I tried doing this with a simple example, but noticed >> that [].sort(func) passes two arguments to func, whereas >> the function expected by groupby() uses only one argument. > > Use: [].sort(key=func) Oh cool. Thanks. Only in 2.4+ it s

Re: Help wanted with GTK+ program

2008-01-16 Thread DBenjamin
On Jan 8, 5:49 pm, [EMAIL PROTECTED] wrote: > I'm working on a simple GTK+ wrapper around the flash Pandora Radio > player (Pandora.com). > > It's very basic right now but I've got it almost working. > I'm using gtkmozembed to fetch and use the player and dbus to detect > multimedia keys. > The onl

Re: Perl Template Toolkit: Now in spicy new Python flavor

2008-01-16 Thread [EMAIL PROTECTED]
On Jan 15, 1:45 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > I'd like to inform the Python community that the powerful and popular > > > Template Toolkit system, previously available only in its original > > > Perl implementation, is now also available in a beta P

Re: import from question

2008-01-16 Thread Terry Reedy
"Ben Finney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Tobiah <[EMAIL PROTECTED]> writes: | | > This is a little surprising. So "from mod import *" really copies | > all of the scalars into new variables in the local namespace. 'Scalar' is not a Python term. Neither is 'obje

Re: searching an XML doc

2008-01-16 Thread Stefan Behnel
grflanagan wrote: > On Jan 15, 9:33 pm, Gowri <[EMAIL PROTECTED]> wrote: >> I've been reading about ElementTreee and ElementPath so I could use >> them to find the right elements in the DOM. Unfortunately neither of >> these seem to offer XPath like capabilities where I can find elements >> based o

Re: import from question

2008-01-16 Thread Tobiah
Ben Finney wrote: > Tobiah <[EMAIL PROTECTED]> writes: > >> This is a little surprising. So "from mod import *" really copies >> all of the scalars into new variables in the local namespace. > > No. Nothing is copied. All the objects (remembering that in Python, > *everything* is an object) creat

Re: paramiko

2008-01-16 Thread Tarun Kapoor
On Jan 16, 1:56 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > On Jan 16, 12:22 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > On Jan 16, 11:38 am, "Guilherme Polo" <[EMAIL PROTEC

Re: module naming conventions

2008-01-16 Thread Terry Reedy
"Tobiah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | | > Release your package as free software on the Cheeseshop | > http://cheeseshop.python.org/>. If the name you want is already | > taken, pick one that will help users distinguish yours from the | > existing one. | > | | I li

Re: paramiko

2008-01-16 Thread Guilherme Polo
2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > On Jan 16, 1:56 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > > > > > > > > > On Jan 16, 12:22 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > > > > 2008/1/16, Tarun Kapoor <[EMAIL PROTECTED]>: > >

Re: Creating unique combinations from lists

2008-01-16 Thread Tim Chase
> a = ['big', 'small', 'medium']; > b = ['old', 'new']; > c = ['blue', 'green']; > > I want to take those and end up with all of the combinations they > create like the following lists > ['big', 'old', 'blue'] > ['small', 'old', 'blue'] > ['medium', 'old', 'blue'] > ['big', 'old', 'green'] > ['sma

Re: error/warning color customization in interactive console?

2008-01-16 Thread Zentrader
On Jan 15, 5:44 pm, yhvh <[EMAIL PROTECTED]> wrote: > Is it possible to output error messages in a different color? > I'm using Terminal on Gnome. For the few times that I want to do this, this simple form works with xterm. for j in range(1,10): os.system("tput setaf "+str(j)) print "test fo

Re: Creating unique combinations from lists

2008-01-16 Thread Matimus
On Jan 16, 11:15 am, breal <[EMAIL PROTECTED]> wrote: > I have three lists... for instance > > a = ['big', 'small', 'medium']; > b = ['old', 'new']; > c = ['blue', 'green']; > > I want to take those and end up with all of the combinations they > create like the following lists > ['big', 'old', 'blu

Re: import from question

2008-01-16 Thread Ben Finney
Tobiah <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > Tobiah <[EMAIL PROTECTED]> writes: > > > >> This is a little surprising. So "from mod import *" really copies > >> all of the scalars into new variables in the local namespace. > > > > No. Nothing is copied. All the objects (remembering th

Re: Creating unique combinations from lists

2008-01-16 Thread Steven D'Aprano
On Wed, 16 Jan 2008 11:15:16 -0800, breal wrote: > I could do nested for ... in loops, but was looking for a Pythonic way > to do this. Ideas? What makes you think nested loops aren't Pythonic? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating unique combinations from lists

2008-01-16 Thread Tim Chase
>> I could do nested for ... in loops, but was looking for a Pythonic way >> to do this. Ideas? > > What makes you think nested loops aren't Pythonic? On their own, nested loops aren't a bad thing. I suspect they become un-Pythonic when they make code look ugly and show a broken model of the

Re: Creating unique combinations from lists

2008-01-16 Thread [EMAIL PROTECTED]
> > for a in range(5): ... >for z in range(5): means the inner loop runs 5**26 times so perhaps it's not only unpythonic but also uncomputable... -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >