Extending the readline module?

2008-01-16 Thread Casey Rodarmor
Hi everyone, I'm writing a little curses-mode utility for renaming files using regexes, and I want to use GNU readline to get user input. However, it looks like the readline module doesn't support all of readline's functionality. I've looked around, and it looks like the best thing to do would be

Re: Parsing links within a html file.

2008-01-16 Thread Hai Vu
On Jan 14, 9:59 am, Shriphani <[EMAIL PROTECTED]> wrote: > Hello, > I have a html file over here by the name guide_ind.html and it > contains links to other html files like guides.html#outline . How do I > point BeautifulSoup (I want to use this module) to > guides.html#outline ? > Thanks > Shripha

Re: assigning values in python and perl

2008-01-16 Thread J. Peng
On Jan 17, 2008 2:55 PM, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > > @$ref = (4, 5, 6) intentionally assigns to the same list pointed to by > the reference. That would be spelled as x[:] = [4, 5, 6] in Python. > What Python does in your example is assign the same as Perl's $ref = > [4, 5, 6]. So

Re: assigning values in python and perl

2008-01-16 Thread Hrvoje Niksic
"J. Peng" <[EMAIL PROTECTED]> writes: > $ cat t1.py > def test(x): > x = [4,5,6] > > a=[1,2,3] > test(a) > print a > > $ python t1.py > [1, 2, 3] > > $ cat t1.pl > sub test { > my $ref = shift; > @$ref = (4,5,6); > } @$ref = (4, 5, 6) intentionally assigns to the same list pointed to

Re: assigning values in python and perl

2008-01-16 Thread Christian Heimes
George Sakkis wrote: > Posting a counter-example where the difference is clearly shown would > be more vastly useful than referring to a list of long obscure usenet > posts with practically no examples. C/C++ are not even mentioned in > that page. I am not claiming you are wrong, I just don't find

Re: assigning values in python and perl

2008-01-16 Thread George Sakkis
On Jan 17, 1:03 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > Python's parameter passing is like passing a pointer in C/C++. > > [snip] > > It's not (I repeat NOT) like passing a pointer in C. Please > readhttp://effbot.org/zone/call-by-object.htm > > Christian Posti

Re: assigning values in python and perl

2008-01-16 Thread Paddy
On Jan 17, 3:34 am, "J. Peng" <[EMAIL PROTECTED]> wrote: > I just thought python's way of assigning value to a variable is really > different to other language like C,perl. :) > > Below two ways (python and perl) are called "pass by reference", but > they get different results. > Yes I'm reading 'C

Re: assigning values in python and perl

2008-01-16 Thread J. Peng
On Jan 17, 2008 1:54 PM, Mel <[EMAIL PROTECTED]> wrote: > > test(a) (along with def test(x)) takes the object named 'a' in the > current namespace and binds it with the name 'x' in function test's > local namespace. So, inside test, the name 'x' starts by referring to >the list that contains [

Re: assigning values in python and perl

2008-01-16 Thread J. Peng
On Jan 17, 2008 2:03 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > Python's parameter passing is like passing a pointer in C/C++. > [snip] > > It's not (I repeat NOT) like passing a pointer in C. Please read > http://effbot.org/zone/call-by-object.htm > Yes I agree. No

Re: assigning values in python and perl

2008-01-16 Thread Christian Heimes
George Sakkis wrote: > Python's parameter passing is like passing a pointer in C/C++. [snip] It's not (I repeat NOT) like passing a pointer in C. Please read http://effbot.org/zone/call-by-object.htm Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: assigning values in python and perl

2008-01-16 Thread Mel
J. Peng wrote: > May I ask, python's pass-by-reference is passing the object's > reference to functions, but perl, or C's pass-by-reference is passing > the variable itself's reference to functions. So althought they're all > called pass-by-reference,but will get different results.Is it? > > On Ja

Re: next line (data parsing)

2008-01-16 Thread George Sakkis
On Jan 17, 12:42 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jan 17, 12:01 am, Scott David Daniels <[EMAIL PROTECTED]> > wrote: > > > > > [EMAIL PROTECTED] wrote: > > > Hi there, > > > I'm struggling to find a sensible way to process a large chuck of > > > data--line by line, but also having

Re: next line (data parsing)

2008-01-16 Thread George Sakkis
On Jan 17, 12:01 am, Scott David Daniels <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi there, > > I'm struggling to find a sensible way to process a large chuck of > > data--line by line, but also having the ability to move to subsequent > > 'next' lines within a for loop. I was hopi

Re: assigning values in python and perl

2008-01-16 Thread George Sakkis
On Jan 16, 10:34 pm, "J. Peng" <[EMAIL PROTECTED]> wrote: > I just thought python's way of assigning value to a variable is really > different to other language like C,perl. :) > > Below two ways (python and perl) are called "pass by reference", but > they get different results. > > (snipped) Pyt

Re: Creating unique combinations from lists

2008-01-16 Thread Martin v. Löwis
> The main emphasis was to show that there was a pattern unfolding that > should have been translated into more pythonic code than just > hard-coding nested loops. Practicality beats purity. That you would solve a more general problem in a more general way doesn't mean that you shouldn't solve the

Thinking of your next holiday

2008-01-16 Thread magicalnepal
Are you planning for vacation, holiday? We would like you to spare your valuable time! Visit our website www.magical-nepal.com for information on Nepal, Tibet and Bhutan. Thanking you in advance visiting and look forward to assist you. Regards, Rath Nepal Tours and Travels P O Box 10691, 2nd Flo

Re: Hebrew in idle ans eclipse (Windows)

2008-01-16 Thread Martin v. Löwis
> What do I need to do run my app like IDLE does? Can you please show the fragment of your program that prints these strings? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: -fno-strict-aliasing turned off when cross compiling

2008-01-16 Thread Martin v. Löwis
> Does anyone have an idea why -fno-strict-aliasing is turned off when > cross compiling? Because detection of -fno-strict-aliasing is made through running the compiler output (AC_TRY_RUN, see configure.in instead). For cross-compilation, running the program isn't actually possible, so a default m

Re: next line (data parsing)

2008-01-16 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Hi there, > I'm struggling to find a sensible way to process a large chuck of > data--line by line, but also having the ability to move to subsequent > 'next' lines within a for loop. I was hoping someone would be willing > to share some insights to help point me in the r

Re: assigning values in python and perl

2008-01-16 Thread Steven D'Aprano
On Thu, 17 Jan 2008 11:40:59 +0800, J. Peng wrote: > May I ask, python's pass-by-reference is passing the object's reference > to functions, but perl, or C's pass-by-reference is passing the variable > itself's reference to functions. So althought they're all called > pass-by-reference,but will ge

Re: assigning values in python and perl

2008-01-16 Thread J. Peng
May I ask, python's pass-by-reference is passing the object's reference to functions, but perl, or C's pass-by-reference is passing the variable itself's reference to functions. So althought they're all called pass-by-reference,but will get different results.Is it? On Jan 17, 2008 11:34 AM, J. Pen

assigning values in python and perl

2008-01-16 Thread J. Peng
I just thought python's way of assigning value to a variable is really different to other language like C,perl. :) Below two ways (python and perl) are called "pass by reference", but they get different results. Yes I'm reading 'Core python programming', I know what happened, but just a little con

examples of logger using smtp

2008-01-16 Thread DwBear75
I am hoping to find some simple examples of how to create a logger instance using smtphandler. I don't want to create a separate ini file. I just want to sent the smtphost, from, to right in the code when I instantiate the logger. I can't seem to find simple code on how to do this. Any pointers ? -

Re: handlers.SocketHandler and exceptions

2008-01-16 Thread Mark Tolonen
"writeson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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

Re: import from question

2008-01-16 Thread Steven D'Aprano
On Wed, 16 Jan 2008 15:31:54 -0800, Tobiah wrote: >> Again, those aren't copies. There is only one instance of each value, >> referenced by multiple names. > > > Ok, I get it. I was locally importing a pointer to an integer Really? What language were you using? Python doesn't have pointers.

Re: next line (data parsing)

2008-01-16 Thread Paul McGuire
On Jan 16, 6:54 pm, [EMAIL PROTECTED] wrote: > Hi there, > I'm struggling to find a sensible way to process a large chuck of > data--line by line, but also having the ability to move to subsequent > 'next' lines within a for loop. I was hoping someone would be willing > to share some insights to he

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

2008-01-16 Thread Dustan
On Jan 16, 11:31 am, _wolf <[EMAIL PROTECTED]> wrote: > On Jan 16, 3:11 pm, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > > Jeroen Ruigrok van der Werven a écrit : > > > > -On [20080116 12:51], Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: > > &

next line (data parsing)

2008-01-16 Thread robleachza
Hi there, I'm struggling to find a sensible way to process a large chuck of data--line by line, but also having the ability to move to subsequent 'next' lines within a for loop. I was hoping someone would be willing to share some insights to help point me in the right direction. This is not a file,

Re: Python too slow?

2008-01-16 Thread Jaimy Azle
"Paul Boddie" <[EMAIL PROTECTED]> wrote: > I think the benefits of running Java on CPython are significantly less > than those had by running Python on the Java VM (or another VM). > Firstly, who wants to write statically typed code which then runs on a > virtual machine that can't take advantage

Re: ElementTree and namespaces in the header only

2008-01-16 Thread Peter Bengtsson
On Jan 15, 5:22 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Peter Bengtsson wrote: > > root = Element('feed', xmlns='http://www.w3.org/2005/Atom') > > root.set('xmlns:se', NS_URL) > > entry = SubElement(root, 'entry') > > SubElement(root, 'title').text = 'Title' > > SubElement(entry, SEN('catego

Re: Re: scope question in a switch mixin

2008-01-16 Thread browerg
John, Thanks for writing, and I'm sorry it's taken so long to get back to you. Python is fun for me -- dinner guests and my boss got in the way. >> The code ... is the result of noodling around with switches as a learning >> tool. I've played with python for a few years, but I'm self-taught, so

Re: import from question

2008-01-16 Thread Tobiah
> Again, those aren't copies. There is only one instance of each value, > referenced by multiple names. Ok, I get it. I was locally importing a pointer to an integer which is really the same object as the module name points to, but the assignment changes that. The confusion for me centered aro

Re: read_nonblocking error in pxssh

2008-01-16 Thread Sean DiZazzo
Just glanced at the docs, but it might be worth a shot... try: > >>> import pxssh > >>> s=pxssh.pxssh() > >>> s.login("myhost","root","mypass", auto_prompt_reset=False) Maybe??? Otherwise, I have used and modified this script with great success: (ssh_session.py) http://www.koders.com/python/f

Re: Creating unique combinations from lists

2008-01-16 Thread Tim Chase
>> 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... only if you're impatient ;) yes, it was a contrived pessimal example. It could be range(2) to generate boolean

Hebrew in idle ans eclipse (Windows)

2008-01-16 Thread iu2
Hi all, I'll realy appreciate your help in this: I read data from a database containg Hebrew words. When the application is run from IDLE a word looks like this, for example: \xe8\xe9\xe5 But when I run the same application from eclipse or the Windows shell I get the 'e's replaced with '8's: \x8

-fno-strict-aliasing turned off when cross compiling

2008-01-16 Thread Squat'n Dive
Does anyone have an idea why -fno-strict-aliasing is turned off when cross compiling? in configure generated for 2.4.4: case $GCC in yes) # Python violates C99 rules, by casting between incompatible # pointer types. GCC may generate bad code as a result of that, # so use -fno-strict-a

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

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 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: 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 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: 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 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: 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: 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 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: 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: 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 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: 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: 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: 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: 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: 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: 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. >

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: 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

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: 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

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: 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

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: 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,

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: 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

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 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: 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

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: 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:

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)

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: 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

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 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: 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: 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

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: 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

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 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: 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: 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: 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

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: 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,

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: 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: 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: 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: 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: 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

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: 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

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: 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

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: 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 */ )

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

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

  1   2   >