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(

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: 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: 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: 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: 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=[],

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

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

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

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

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

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

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

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: 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__, "../../..

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

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

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

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

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

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

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

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

Re: rlcompleter and wxPython, problems ...

2008-09-30 Thread Gabriel Genellina
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 behavior, or at least I don't

Re: Would this be called a bug in inspect ?

2008-09-30 Thread Stef Mientki
Gabriel Genellina wrote: En Tue, 30 Sep 2008 14:57:55 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: I'm not familiar with inspect, but I get an error (see below) in getmembers ( wx ) Of course this is bug in wx . Yes. But would you also call this a bug in inspect ? (inspect crashes

Re: XMLRPC - C Client / Python Server

2008-09-30 Thread Michael Torrie
[EMAIL PROTECTED] wrote: > I have implemented a simple Python XMLRPC server and need to call it > from a C/C++ client. What is the simplest way to do this? I need to > pass numerical arrays from C/C++ to Python. Which do you need, C or C++? They are two different languages with different possibil

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Michael Torrie
Blubaugh, David A. wrote: > Thank You!! > > I am still new to Python!! > > David Blubaugh As you've already noticed, plenty of folks here on the list are ready help you out with issues the crop up as you learn python. So keep on asking questions as you need assistance. In the future, please

Re: [Tutor] Replacing cmd.exe with custom .py application

2008-09-30 Thread Jean-Paul Calderone
On Tue, 30 Sep 2008 19:30:55 + (UTC), Lie Ryan <[EMAIL PROTECTED]> wrote: On Tue, 30 Sep 2008 15:09:06 -0400, Ezra Taylor wrote: Is there something similar to /dev/null on Windows? I think it's called nul REM This is a batch file (.bat) echo "This won't show" > NUL I'm not sure how to

Re: [Tutor] Replacing cmd.exe with custom .py application

2008-09-30 Thread Lie Ryan
On Tue, 30 Sep 2008 15:09:06 -0400, Ezra Taylor wrote: > Is there something similar to /dev/null on Windows? I think it's called nul REM This is a batch file (.bat) echo "This won't show" > NUL I'm not sure how to use it in python though. -- http://mail.python.org/mailman/listinfo/python-list

Re: Would this be called a bug in inspect ?

2008-09-30 Thread Gabriel Genellina
En Tue, 30 Sep 2008 14:57:55 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: I'm not familiar with inspect, but I get an error (see below) in getmembers ( wx ) Of course this is bug in wx . Yes. But would you also call this a bug in inspect ? (inspect crashes and doesn't continue with

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Terry Reedy
Blubaugh, David A. wrote: To All, I have been attempting to execute the following program within the Python environment: Myprogram.exe, which means this is an executable file!! I would usually execute this program (with the appropriate arguments) by going to following directory within MS-DOS

Re: What is not objects in Python?

2008-09-30 Thread Gabriel Genellina
En Tue, 30 Sep 2008 08:07:18 -0300, Steve Holden <[EMAIL PROTECTED]> escribió: Terry Reedy wrote: Steven D'Aprano wrote: Arghh! No!!! |x| should be abs(x), not len(x). Just ask mathematicians and physicists. It should be both, just as + is addition for numbers and concatenation for sequenc

Re: [Tutor] Replacing cmd.exe with custom .py application

2008-09-30 Thread Ezra Taylor
Is there something similar to /dev/null on Windows? On Tue, Sep 30, 2008 at 2:13 PM, Ezra Taylor <[EMAIL PROTECTED]> wrote: > Joseph: > Check out subprocess. The subprocess module is on python > 2.4. Also, use subprocess.call("your command",shell=True) > > On Linux/Unix, the process

Change environment after setreuid

2008-09-30 Thread Mitko Haralanov
I have a program (which normally runs as root) which can start child processes as different users. Effectively, my program is a modified version of popen2's Popen3 class where the child process (after the fork) does: os.setregid (gid, gid) os.setreuid (uid, uid) session_pid = os.setsid () This al

Re: Comparing float and decimal

2008-09-30 Thread Terry Reedy
Mark Dickinson wrote: On Sep 30, 9:21 am, Terry Reedy <[EMAIL PROTECTED]> wrote: If no one beats me to it, I will probably file a bug report or two, but I am still thinking about what to say and to suggest. I can't see many good options here. Some possibilities: Thanks for responding. Agre

Re: rlcompleter and wxPython, problems ...

2008-09-30 Thread Stef Mientki
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 behavior, or at least I don't have the faintest idea why this behavior occures, and even more important how to

pylab without X11

2008-09-30 Thread Willem-Jan Vriend
I want to use pylab (matplotlib) on a machine without X11. I'm trying to generate onthefly graphics for an apache2 web service, so they do not have to be displayed on this machine ! When i do pylab.figure() I get the error TclError: couldn't connect to display ":0.0" I tried setting the

Re: r""

2008-09-30 Thread Lie Ryan
On Tue, 30 Sep 2008 10:50:01 -0700, Kyle Hayes wrote: >> Please describe the actual problem you're trying to solve. In what way >> do slashes need to be "fixed," and why? > > Well, I have decided to build a tool to help us sync files in UNC paths. > I am just building the modules and classes righ

Re: IDLE doesn't run on OSX 10.3.9

2008-09-30 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: Just installed Python 2.5.2 on a PowerPC G4 running OSX 10.3.9 and when clicking on the IDLE icon in the MacPython 2.5 folder nothing happens, program doesn't execute... I've uninstalled, reinstalled over again... I friend of mine just installed the same 2.5.2 download

RE: OS.SYSTEM ERROR !!!

2008-09-30 Thread Blubaugh, David A.
Yes, I new it was a directory issue. I am new to Python. Thank You David Blubaugh -Original Message- From: Martin Walsh [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 1:42 PM To: python-list@python.org Subject: Re: OS.SYSTEM ERROR !!! Blubaugh, David A. wrote: > To Al

RE: OS.SYSTEM ERROR !!!

2008-09-30 Thread Blubaugh, David A.
Thank You!! I am still new to Python!! David Blubaugh -Original Message- From: Christian Heimes [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 2:08 PM To: python-list@python.org Subject: Re: OS.SYSTEM ERROR !!! Blubaugh, David A. wrote: > To All, > > > I have been

Re: Python is slow?

2008-09-30 Thread Terry Reedy
Steven D'Aprano wrote: On Tue, 30 Sep 2008 22:19:57 +1000, Ben Finney wrote: I do, because a natural, beneficial act (modify the work and redistribute it) that has no technical reason to restrict, is artifically restricted. We agree that the restriction is artificial, and I think irrational

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Christian Heimes
[EMAIL PROTECTED] wrote: I would add the following line right before your call to os.system: os.chdir(r'C:\myprogramfolder\run') I wouldn't. os.chdir() tends to introduce all sorts of trouble. It's a quick n'dirty hack for a small script but no solution for a large program or library. Chri

Re: Python is slow?

2008-09-30 Thread José Matos
On Tuesday 30 September 2008 16:04:35 George Sakkis wrote: > What you're missing is that for Free Software (TM) zealots it's a > matter of philosophical principle, totally unrelated to how easy is to > overcome the restriction. There is not a "practicality beats purity" > clause in the FSF Bible.

Re: [Tutor] Replacing cmd.exe with custom .py application

2008-09-30 Thread Ezra Taylor
Joseph: Check out subprocess. The subprocess module is on python 2.4. Also, use subprocess.call("your command",shell=True) On Linux/Unix, the process is below import subprocess ret = subprocess.call("dir",shell=True,stdout=open('/dev/null','w'),stderr=subprocess.STDOUT) print re

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Martin Walsh
Blubaugh, David A. wrote: > To All, > > I have been attempting to execute the following program within the > Python environment: > > However, when I would try to execute the following lines of source code > within a python script file: > > import os > > os.system(r"C:\myprogramfolder\run\Mypr

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Christian Heimes
Blubaugh, David A. wrote: To All, I have been attempting to execute the following program within the Python environment: Myprogram.exe, which means this is an executable file!! I would usually execute this program (with the appropriate arguments) by going to following directory within MS-DOS

IDLE doesn't run on OSX 10.3.9

2008-09-30 Thread thomascribbs
Just installed Python 2.5.2 on a PowerPC G4 running OSX 10.3.9 and when clicking on the IDLE icon in the MacPython 2.5 folder nothing happens, program doesn't execute... I've uninstalled, reinstalled over again... I friend of mine just installed the same 2.5.2 download from the Python.org websit

Re: r""

2008-09-30 Thread Carsten Haese
Kyle Hayes wrote: >> Please describe the actual problem you're trying to solve. In what way >> do slashes need to be "fixed," and why? > > Well, I have decided to build a tool to help us sync files in UNC > paths. I am just building the modules and classes right now so I > haven't developed the fr

Would this be called a bug in inspect ?

2008-09-30 Thread Stef Mientki
hello, I'm not familiar with inspect, but I get an error (see below) in getmembers ( wx ) Of course this is bug in wx . But would you also call this a bug in inspect ? (inspect crashes and doesn't continue with th rest of the code, nor it returns the already gathered data) thanks, Stef >>

Problems with encoding/decoding locales

2008-09-30 Thread Michele
Hi there, I'm using a python script in conjunction with a JPype, to run java classes. So, here's the code: from jpype import * import os import random import math import sys input = open('foo.img','rb').read().decode('ISO-8859-1') square = java.encoding(input) output = java.decoding() fd = ope

Re: r""

2008-09-30 Thread Mark Thomas
On Sep 30, 1:17 pm, Kyle Hayes <[EMAIL PROTECTED]> wrote: > Is there a way to use the 'r' in front of a variable instead of > directly in front of a string? Or do I need to use a function to get > all of the slashes automatically fixed? Is this what you're talking about? str = "foo/bar" re =

Re: r""

2008-09-30 Thread Kyle Hayes
> Please describe the actual problem you're trying to solve. In what way > do slashes need to be "fixed," and why? Well, I have decided to build a tool to help us sync files in UNC paths. I am just building the modules and classes right now so I haven't developed the frontend yet. I am assuming wh

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread giltay
On Sep 30, 1:21 pm, "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: > I would usually execute this program (with the appropriate arguments) by > going to following directory within MS-DOS (Windows XP): > > C:\myprogramfolder\run> Myprogram.exe 1 1 acc 0 [snip] > import os > > os.system(r"C:\myprogr

Re: OS.SYSTEM ERROR !!!

2008-09-30 Thread Carsten Haese
Blubaugh, David A. wrote: > To All, > > > I have been attempting to execute the following program within the > Python environment: > > Myprogram.exe, which means this is an executable file!! > > I would usually execute this program (with the appropriate arguments) by > going to following direc

Re: r""

2008-09-30 Thread Carsten Haese
Kyle Hayes wrote: > Is there a way to use the 'r' in front of a variable instead of > directly in front of a string? Or do I need to use a function to get > all of the slashes automatically fixed? Please describe the actual problem you're trying to solve. In what way do slashes need to be "fixed,"

OS.SYSTEM ERROR !!!

2008-09-30 Thread Blubaugh, David A.
To All, I have been attempting to execute the following program within the Python environment: Myprogram.exe, which means this is an executable file!! I would usually execute this program (with the appropriate arguments) by going to following directory within MS-DOS (Windows XP): C:\myprogram

r""

2008-09-30 Thread Kyle Hayes
Is there a way to use the 'r' in front of a variable instead of directly in front of a string? Or do I need to use a function to get all of the slashes automatically fixed? /thanks -Kyle -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find out the version of a certain installed package

2008-09-30 Thread Christophe
great! thanks for you fast response. Christophe On Tue, Sep 30, 2008 at 6:30 PM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2008-09-30 18:17, Christophe wrote: > > Hi, > > > > In a projecet I'm making using pycrypto, I need to find out the > > current installed version of pycrypto. After look

Re: Python arrays and sting formatting options

2008-09-30 Thread Grant Edwards
On 2008-09-30, Ivan Reborin <[EMAIL PROTECTED]> wrote: > But as I said, got a job that't got to be done, so I'm trying > to figure out how to do array operations as easily as possible > in python, which are necessary for all my calculations. numpy -- Grant Edwards grante

Re: XMLRPC - C Client / Python Server

2008-09-30 Thread Chris Rebert
On Tue, Sep 30, 2008 at 8:05 AM, <[EMAIL PROTECTED]> wrote: > I have implemented a simple Python XMLRPC server and need to call it > from a C/C++ client. What is the simplest way to do this? I need to > pass numerical arrays from C/C++ to Python. If you just googled for "xmlrpc c", you would've f

Re: how to find out the version of a certain installed package

2008-09-30 Thread M.-A. Lemburg
On 2008-09-30 18:17, Christophe wrote: > Hi, > > In a projecet I'm making using pycrypto, I need to find out the > current installed version of pycrypto. After looking around, I found > out that "pkg_resources.requires("pycrypto") will give me a string > containing the version number, but is this

how to find out the version of a certain installed package

2008-09-30 Thread Christophe
Hi, In a projecet I'm making using pycrypto, I need to find out the current installed version of pycrypto. After looking around, I found out that "pkg_resources.requires("pycrypto") will give me a string containing the version number, but is this the only way to do it or are there other ways? tha

Re: Python arrays and sting formatting options

2008-09-30 Thread Ivan Reborin
On 30 Sep 2008 15:31:59 GMT, Peter Pearson <[EMAIL PROTECTED]> wrote: > >Since you're coming from the FORTRAN world (thank you for >that stroll down Memory Lane), you might be doing scientific >computations, and so might be interested in the SciPy >package (Google scipy), which gives you arrays an

Re: Python arrays and sting formatting options

2008-09-30 Thread Marc 'BlackJack' Rintsch
On Tue, 30 Sep 2008 10:57:19 -0500, Grant Edwards wrote: > On 2008-09-30, Peter Pearson <[EMAIL PROTECTED]> wrote: >> On Tue, 30 Sep 2008 00:04:18 +0200, Ivan Rebori wrote: >>> >>> 1. Multi dimensional arrays - how do you load them in python For >>> example, if I had: >>> --- >>> 1 2 3 >>> 4 5

Re: How to add CC and BCC while sending mails using python

2008-09-30 Thread Bernhard Walle
Hi, * cindy jones [2008-09-30 19:57]: > > Can someone tel me how to add cc's and bcc's while sending mails using > python Following (tested) snippet should help: -- 8< -- from smtplib import SMTP from email.mime.image import MIMEImage from email.mime.t

Re: Python arrays and sting formatting options

2008-09-30 Thread Grant Edwards
On 2008-09-30, Peter Pearson <[EMAIL PROTECTED]> wrote: > On Tue, 30 Sep 2008 00:04:18 +0200, Ivan Rebori wrote: >> >> 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 >> --- >> wi

Re: Python arrays and sting formatting options

2008-09-30 Thread Peter Pearson
On Tue, 30 Sep 2008 00:04:18 +0200, Ivan Rebori wrote: > > 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 .. > uh

Re: Shed Skin (restricted) Python-to-C++ compiler 0.0.29

2008-09-30 Thread George Sakkis
On Sep 30, 6:19 am, "Mark Dufour" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have just released Shed Skin 0.0.29, with the following changes. Not to sound negative, but what's with the 0.0.x version numbers ? Maybe it's just me, but seeing a zero major/minor version give me the impression of expe

Re: Finding subsets for a robust regression

2008-09-30 Thread tkpmep
Thank you everyone, for your input. The help is much appreciated. Thomas Philips -- http://mail.python.org/mailman/listinfo/python-list

XMLRPC - C Client / Python Server

2008-09-30 Thread care02
I have implemented a simple Python XMLRPC server and need to call it from a C/C++ client. What is the simplest way to do this? I need to pass numerical arrays from C/C++ to Python. Yours, Carl -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow?

2008-09-30 Thread George Sakkis
On Sep 30, 9:43 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Tue, 30 Sep 2008 22:19:57 +1000, Ben Finney wrote: > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > >> On Tue, 30 Sep 2008 19:04:41 +1000, Ben Finney wrote: > >> > You're not free to modify gnuplot and redist

Re: Python arrays and sting formatting options

2008-09-30 Thread Marc 'BlackJack' Rintsch
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 >>from itertools import islice >>from pprint import pprint >> >> >>def read_gro

Replacing cmd.exe with custom .py application

2008-09-30 Thread A. Joseph
Instead of going to the command line all the time, I want to create a small customized cmd.exe of my own, how can I get the return value from os.system() because I was thinking I can do soothing with os.system(), In case my question is not clear, just like an IDE that plugged in another .exe appl

How to add CC and BCC while sending mails using python

2008-09-30 Thread cindy jones
Hello all, Can someone tel me how to add cc's and bcc's while sending mails using python Thank you all -- http://mail.python.org/mailman/listinfo/python-list

Re: Python arrays and sting formatting options

2008-09-30 Thread Ivan Reborin
On 30 Sep 2008 07:07:52 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: Hello Marc, thanks for answering (on both subjects). I understand now the logic which lays behind what you were explaining in the other one. It cleared things quite a bit. >Well, I don't know if this qualifies as equ

Re: Python is slow?

2008-09-30 Thread Steven D'Aprano
On Tue, 30 Sep 2008 22:19:57 +1000, Ben Finney wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> On Tue, 30 Sep 2008 19:04:41 +1000, Ben Finney wrote: >> > You're not free to modify gnuplot and redistribute the result. >> > >> > That you're free to distribute patches is nice, but it's no

ElementTree Help With DTD

2008-09-30 Thread Heston James - Cold Beans
Afternoon All, I have used elementtree for a little while now parsing simple XML documents and found it pretty intuitive. Today is the first time I've used the library to create an XML file though. I have a simple script which looks like this: # Save the configuration to

Re: Python style: exceptions vs. sys.exit()

2008-09-30 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Mon, 29 Sep 2008 18:27:22 +0200, Bruno Desthuilliers wrote: Lawrence D'Oliveiro a écrit : In message <[EMAIL PROTECTED]>, Ross Ridge wrote: You need either use trial and error to find out, or look at the source. So what's wrong with using the source as documenta

  1   2   >