Re: rlcompleter and wxPython, problems ...

2008-09-30 Thread Stef Mientki
Gabriel Genellina wrote: En Tue, 30 Sep 2008 16:06:07 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: Gabriel Genellina wrote: En Sun, 28 Sep 2008 19:25:30 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: I'm trying to implement autocompletion into my editor. But I find some weird behav

Backup a directory

2008-09-30 Thread dudeja . rajat
Hello, I'm looking for a script that creates a backup of a directory but keeps only one backup. I've tried using all the os modules commands but could not create one. Does any one has any such custom script or function? Thanks and regards, rajat -- http://mail.python.org/mailman/listinfo/pyth

Re: Would this be called a bug in inspect ?

2008-09-30 Thread Terry Reedy
Stef Mientki wrote: print getmembers ( wx ) crashes but not always: >>> print getmembers (wx) [('ACCEL_ALT', 1), ('ACCEL_CMD', 2), ('ACCEL_CTRL', 2), ('ACCEL_NORMAL', 0), ('ACCEL_SHIFT', 4), ('ADJUST_MINSIZE', 0), ( I suspect that wx has an erratic bug, which their tests do not catch. So

QSessionManager example request

2008-09-30 Thread Oguz Yarimtepe
Hi all, I am trying to write an application that will test the sleep function of the laptop. I am using pyqt for this. I need to continue to run my gui after the laptop wakes up from sleep mode so that i may continue some counters and repeat the sleep command again. I think i may use QSession

Re: pylab without X11

2008-09-30 Thread marc
This may help you ... or not You may have to change your backend : p13 of the matplotlib user guide: backends p17 how to change the backend in the matplotlibrc An example of matplotlibrc ( backend choice is at the beginning ): http://matplotlib.sourceforge.net/matplotlibrc You may choose PS or

Re: Would this be called a bug in inspect ?

2008-09-30 Thread Stef Mientki
Terry Reedy wrote: Stef Mientki wrote: print getmembers ( wx ) crashes but not always: >>> print getmembers (wx) [('ACCEL_ALT', 1), ('ACCEL_CMD', 2), ('ACCEL_CTRL', 2), ('ACCEL_NORMAL', 0), ('ACCEL_SHIFT', 4), ('ADJUST_MINSIZE', 0), ( I suspect that wx has an erratic bug, which their tes

Matplotlib Polar Plot Clockwise

2008-09-30 Thread afrogazer
I have been playing with this for a couple days now and there doesn't seem to be any easy way to fix this except manipulating the data, which is undesirable. It would be some much better if there was a setting in matplotlibrc to choose to plot clockwise or counter- clockwise and the position on 0°

Re: pylab without X11

2008-09-30 Thread marc
This may help ... or not ( 2nd part ) try not to do pylab.figure() in your script: pylab.plot, or pylab.imshow or whatever you want to use then savefig("myFigure.png")for example do not use show() in my case ( with the WXAgg backend ), it works, it generates the png file Marc Willem-

md5 hash problems

2008-09-30 Thread Michele
Hi there, why is this code generating a problem? >>> input = open('foo.img','rb').read().decode('ISO-8859-1') >>> import md5 >>> md5.new(input).hexdigest() Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position 6: ordi

Re: Advice for a replacement for plone.

2008-09-30 Thread Nick Craig-Wood
Ken Seehart <[EMAIL PROTECTED]> wrote: > I want a new python based CMS. ... One that won't keep me up all night > > I've been fooling around with zope and plone, and I like plone for some > things, such as a repository for online project documentation. However > for general-purpose we

problem with "ImportError: No module named..." and sockets

2008-09-30 Thread Daniel
Hello, I'm trying to build a very simple IPC system. What I have done is create Data Transfer Objects (DTO) for each item I'd like to send across the wire. I am serializing these using cPickle. I've also tried using pickle (instead of cPickle), but I get the same response. Below is the code.

Re: md5 hash problems

2008-09-30 Thread Chris Rebert
On Tue, Sep 30, 2008 at 2:25 PM, Michele <[EMAIL PROTECTED]> wrote: > Hi there, > why is this code generating a problem? > input = open('foo.img','rb').read().decode('ISO-8859-1') import md5 md5.new(input).hexdigest() > Traceback (most recent call last): > File "", line 1, in > Uni

Re: Python script for tracert

2008-09-30 Thread Gabriel Genellina
En Tue, 30 Sep 2008 03:53:21 -0300, cindy jones <[EMAIL PROTECTED]> escribió: Hello.. I'm trying to do a scripting for tracert in windows using python... I'm using popen(), but it displays only after the tracert is completed. i want the results to be displayed for every route. can anyone h

Re: Backup a directory

2008-09-30 Thread Chris Rebert
On Tue, Sep 30, 2008 at 1:21 PM, <[EMAIL PROTECTED]> wrote: > Hello, > > > I'm looking for a script that creates a backup of a directory but keeps only > one backup. > I've tried using all the os modules commands but could not create one. > > > Does any one has any such custom script or function?

Re: problem with "ImportError: No module named..." and sockets

2008-09-30 Thread Gabriel Genellina
En Tue, 30 Sep 2008 18:38:19 -0300, Daniel <[EMAIL PROTECTED]> escribió: [BEGIN CODE] #!/usr/bin/python import SocketServer import os, sys newpath = os.path.normpath( os.path.join( __file__, "../../.." )) sys.path.insert(0, newpath) from pop.command.UpdateCommand import * import cPickle Tra

Visit this sites please

2008-09-30 Thread mayariasxf
http://forums.vogue.com.au/member.php?u=91686 tube8 http://forums.vogue.com.au/member.php?u=91688 redtube http://forums.vogue.com.au/member.php?u=91689 pornhub http://forums.vogue.com.au/member.php?u=91690 yobt http://www.dynamicdrive.com/forums/member.php?u=33924 tube8 http://www.dynamicdrive.com/

Visit this sites please

2008-09-30 Thread mayariasxf
http://forums.vogue.com.au/member.php?u=91686 tube8 http://forums.vogue.com.au/member.php?u=91688 redtube http://forums.vogue.com.au/member.php?u=91689 pornhub http://forums.vogue.com.au/member.php?u=91690 yobt http://www.dynamicdrive.com/forums/member.php?u=33924 tube8 http://www.dynamicdrive.com/

Re: problem with "ImportError: No module named..." and sockets

2008-09-30 Thread Daniel
On Sep 30, 4:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 30 Sep 2008 18:38:19 -0300, Daniel <[EMAIL PROTECTED]>   > escribió: > > > > > [BEGIN CODE] > > #!/usr/bin/python > > import SocketServer > > import os, sys > > newpath = os.path.normpath( os.path.join( __file__, "../../..

Re: Python is slow?

2008-09-30 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I simply don't think that having to run some variation on > > patch -i patchfile.patch > > is a requirement so onerous that it makes the gnuplot licence > non-free. Perhaps I'm just more tolerant of eccentricities than you > :) The distinction here

Re: Python is slow?

2008-09-30 Thread Ben Finney
Terry Reedy <[EMAIL PROTECTED]> writes: > Steven D'Aprano wrote: > > We agree that the restriction is artificial, and I think > > irrational (although I'd be interested in hearing the gnuplot > > developers' reasoning before making a final judgment). > > I believe it is a matter of preserving cla

Wait or not?

2008-09-30 Thread Eric
I've been wanting to learn Python for a while now but I can't decide on whether to wait for Python 3's final release and learn it or just go ahead and learn 2.x. Would it be hard to make the transition being a noob? -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait or not?

2008-09-30 Thread Matimus
On Sep 30, 4:20 pm, Eric <[EMAIL PROTECTED]> wrote: > I've been wanting to learn Python for a while now but I can't decide > on whether to wait for Python 3's final release and learn it or just > go ahead and learn 2.x. Would it be hard to make the transition being > a noob? It shouldn't be a hard

Re: Time.sleep(0.0125) not available within Linux

2008-09-30 Thread Michael Torrie
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Grant > Edwards wrote: > >> On 2008-09-23, Blubaugh, David A. <[EMAIL PROTECTED]> wrote: >> >>> I was wondering if anyone has come across the issue of not being allowed >>> to have the following within a Python script operating under Lin

Re: Python arrays and sting formatting options

2008-09-30 Thread Steven D'Aprano
On Tue, 30 Sep 2008 10:57:19 -0500, Grant Edwards wrote: >>> How would the python equivalent go ? > > You would drag yourself out of the 1960s, install numpy, and then do > something like this: I think that was thoughtlessly rude to somebody who is asking a perfectly reasonable question. --

Re: Python arrays and sting formatting options

2008-09-30 Thread Steven D'Aprano
On Tue, 30 Sep 2008 14:34:31 +, Marc 'BlackJack' Rintsch wrote: > On Tue, 30 Sep 2008 15:42:58 +0200, Ivan Reborin wrote: > >> On 30 Sep 2008 07:07:52 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> >> wrote: >>>= >>>from __future__ import with_statement from functools import partial >>

Re: problem with "ImportError: No module named..." and sockets

2008-09-30 Thread Gabriel Genellina
En Tue, 30 Sep 2008 19:44:51 -0300, Daniel <[EMAIL PROTECTED]> escribió: On Sep 30, 4:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Tue, 30 Sep 2008 18:38:19 -0300, Daniel <[EMAIL PROTECTED]>   escribió: > [BEGIN CODE] > #!/usr/bin/python > import SocketServer > import os, sys > n

Re: Python is slow?

2008-09-30 Thread Steven D'Aprano
On Wed, 01 Oct 2008 09:06:08 +1000, Ben Finney wrote: > Terry Reedy <[EMAIL PROTECTED]> writes: > >> Steven D'Aprano wrote: >> > We agree that the restriction is artificial, and I think irrational >> > (although I'd be interested in hearing the gnuplot developers' >> > reasoning before making a f

Re: How can I customize builtin module search path to prefix/lib to prefix/lib64?

2008-09-30 Thread js
In addition to that, .pth cannot prepend search path. All thing it can do is appending to it. In my case, I have to put lib64 before lib/. On 9/26/08, js <[EMAIL PROTECTED]> wrote: > For 64bit python, there's no need to look at lib/lib-dynload because > libraries for 64bit should be in > lib64/lib

Re: Python arrays and sting formatting options

2008-09-30 Thread Gabriel Genellina
En Mon, 29 Sep 2008 19:04:18 -0300, Ivan Reborin <[EMAIL PROTECTED]> escribió: 1. Multi dimensional arrays - how do you load them in python For example, if I had: --- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 --- with "i" being the row number, "j" the column number, and "k" the ..

Re: Time.sleep(0.0125) not available within Linux

2008-09-30 Thread Grant Edwards
On 2008-09-30, Michael Torrie <[EMAIL PROTECTED]> wrote: >> Just a thought, your minimum sleep time is probably limited by >> the resolution of the system "HZ" clock. Type >> >> less /proc/config.gz >> >> and search for the value of the "CONFIG_HZ" setting. On the >> Athlon 64 machine I'm us

Re: Python arrays and sting formatting options

2008-09-30 Thread Grant Edwards
On 2008-09-30, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 30 Sep 2008 10:57:19 -0500, Grant Edwards wrote: > How would the python equivalent go ? >> >> You would drag yourself out of the 1960s, install numpy, and >> then do something like this: > > I think that was thoughtlessly rud

Re: Python is slow?

2008-09-30 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Wed, 01 Oct 2008 09:06:08 +1000, Ben Finney wrote: > > > Note that I consider a work free even if it fails to grant “the > > right to distribute misrepresentations of the author's words”, > > because that act is an exercise of undue power over anot

__buitins__ key added during eval()

2008-09-30 Thread William Purcell
I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python from adding the __builtins__ key to mydict when I use it with eval? Other wise I have to __delitem__('__builtins__') everytime I use eval? >>> mydict = {'a':2,'b':3} >>> eval('a*b',mydict) 6 >>> mydict {'a': 2, '__builtins__'

Re: __buitins__ key added during eval()

2008-09-30 Thread Gary M. Josack
William Purcell wrote: I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python from adding the __builtins__ key to mydict when I use it with eval? Other wise I have to __delitem__('__builtins__') everytime I use eval? >>> mydict = {'a':2,'b':3} >>> eval('a*b',mydict) 6 >>> my

EARN $$$ IN EVERY MONTH

2008-09-30 Thread chinu
hai, i am srinu from india. i am sending a blog url for yours use. click on the blog and get more information to choose yours job. the blog url is: http://earnmonthlyincome.blogspot.com/ goodluck -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait or not?

2008-09-30 Thread Asun Friere
On Oct 1, 9:20 am, Eric <[EMAIL PROTECTED]> wrote: > I've been wanting to learn Python for a while now but I can't decide > on whether to wait for Python 3's final release and learn it or just > go ahead and learn 2.x. Would it be hard to make the transition being > a noob? If you only want to lea

Output of pexpect

2008-09-30 Thread Anh Khuong
Hi all, I am using pexpect and I want to send output of pexpet to both stdout and log file concurrently. Anybody know a solution for it please let me know. Thanks -- http://mail.python.org/mailman/listinfo/python-list

How to emit UTF-8 from console mode?

2008-09-30 Thread Siegfried Heintze
The following perl program works when I run it from urxvt-X console on cygwin-x windows LC_CTYPE=en_US.UTF-8 urxvt-X.exe& perl -wle "binmode STDOUT, q[:utf8]; print chr() for 0x410 .. 0x430;" This little one liner prints the Russian alphabet in Cryllic. With some slight modification it will als

Re: Output of pexpect

2008-09-30 Thread Karthik Gurusamy
On Sep 30, 8:48 pm, Anh Khuong <[EMAIL PROTECTED]> wrote: > Hi all, > > I am using pexpect and I want to send output of pexpet to both stdout and log > file concurrently. > Anybody know a solution for it please let me know. spawn class takes a 'logfile' parameter: __init__(self, command, args=[],

Re: Would this be called a bug in inspect ?

2008-09-30 Thread Terry Reedy
Stef Mientki wrote: But the real point is, should a module like inspect not be insensitive to these kind of errors ? In my opinion, no. In any case, the doc says "inspect.getmembers(object[, predicate]) Return all the members of an object in a list of (name, value) pairs sorted by name. "

Re: writing dll in python?

2008-09-30 Thread Larry Bates
nishalrs wrote: Hello All, My main motivation is to build a collection of useful mathematical models (that I have developed over the years) to design ultrasonic sensors. This should be some sort of a library that should be able to be used for desktop/web application development, to run in variet

Re: Python script for tracert

2008-09-30 Thread cindy jones
Thank you so much Gabriel.. It works On Wed, Oct 1, 2008 at 3:25 AM, Gabriel Genellina <[EMAIL PROTECTED]>wrote: > En Tue, 30 Sep 2008 03:53:21 -0300, cindy jones <[EMAIL PROTECTED]> > escribió: > > > Hello.. I'm trying to do a scripting for tracert in windows using >> python... >> I'm using pop

Re: How to emit UTF-8 from console mode?

2008-09-30 Thread Martin v. Löwis
> LC_CTYPE=en_US.UTF-8 urxvt-X.exe& > perl -wle "binmode STDOUT, q[:utf8]; print chr() for 0x410 .. 0x430;" > Can someone help me translate it into python? LC_CTYPE=en_US.UTF-8 urxvt-X.exe& python -c 'for i in range(0x410, 0x431):print unichr(i),' > I would not expect it to work > from cmd.exe

Re: How to emit UTF-8 from console mode?

2008-09-30 Thread Mark Tolonen
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] LC_CTYPE=en_US.UTF-8 urxvt-X.exe& perl -wle "binmode STDOUT, q[:utf8]; print chr() for 0x410 .. 0x430;" Can someone help me translate it into python? LC_CTYPE=en_US.UTF-8 urxvt-X.exe& python -c 'for i in range(

<    1   2