Re: Python arrays and sting formatting options

2008-09-30 Thread Marc 'BlackJack' Rintsch
On Tue, 30 Sep 2008 00:04:18 +0200, Ivan Reborin 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 .. > u

Re: str() should convert ANY object to a string without EXCEPTIONS !

2008-09-30 Thread Gabriel Genellina
En Sun, 28 Sep 2008 07:01:12 -0300, Olivier Lauzanne <[EMAIL PROTECTED]> escribió: On Sep 28, 11:21 am, est <[EMAIL PROTECTED]> wrote: Can anyone tell me how to customize a default encoding, let's say 'ansi' which handles range(256) ? I assume you are using python2.5 Edit the file /usr/lib/

I built a nice html templater!

2008-09-30 Thread Derick van Niekerk
Ok - so it's not really an awesome achievement and only handles basic templating needs (no loops and other programming constructs) but maybe someone will find it useful. It replaces any xml block where the id attribute is specified with contents provided - a description is provided in the comments

Re: urllib2 and exceptions

2008-09-30 Thread Gabriel Genellina
En Sun, 28 Sep 2008 22:44:20 -0300, robean <[EMAIL PROTECTED]> escribió: Many thanks for your reply. I was simply under the impression that 'import urllib2' would take care of the namespace issue and simply import everything in urlib2, making it unnecessary to have to reference HTTPError and URL

Re: Using the 'with' statement with cStringIO objects

2008-09-30 Thread Gabriel Genellina
En Sat, 27 Sep 2008 19:28:49 -0300, peppergrower <[EMAIL PROTECTED]> escribió: When I got that particular error, I suspected that it had something to do with the relative newness of the 'with' statement. If this is something that should be considered for addition in the future, is there somew

Re: Python arrays and sting formatting options

2008-09-30 Thread Aidan
Ivan Reborin wrote: Hello everyone, I was wondering if anyone here has a moment of time to help me with 2 things that have been bugging me. 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"

Re: What is not objects in Python?

2008-09-30 Thread Gabriel Genellina
En Tue, 30 Sep 2008 01:03:07 -0300, namekuseijin <[EMAIL PROTECTED]> escribió: On 28 set, 15:29, process <[EMAIL PROTECTED]> wrote: Why isn't len implemented as a str.len and list.len method instead of a len(list) function? Because postfix notation sucks. The natural way of spelling is adj

Re: Python is slow?

2008-09-30 Thread r0g
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, r0g wrote: > >> You can only distribute modifications to gnuplot itself as >> patches, but you can distribute it freely ... > > This must be some new definition of "freely" of which I'm unaware. As in beer. -- http://mail.python.org/ma

Re: Comparing float and decimal

2008-09-30 Thread Terry Reedy
Gabriel Genellina wrote: En Thu, 25 Sep 2008 08:02:49 -0300, Mark Dickinson <[EMAIL PROTECTED]> escribió: On Sep 23, 1:58 pm, Robert Lehmann <[EMAIL PROTECTED]> wrote: I don't see why transitivity should apply to Python objects in general. Hmmm. Lack of transitivity does produce some, um, in

Re: Python is slow?

2008-09-30 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, r0g wrote: > Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, r0g wrote: >> >>> You can only distribute modifications to gnuplot itself as >>> patches, but you can distribute it freely ... >> >> This must be some new definition of "freely" of which

Re: Python script for tracert

2008-09-30 Thread Tino Wildenhain
cindy jones wrote: 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. I believe "tracert" is a really ugly 8.3 abbrevivation of traceroute ;) W

Re: Python is slow?

2008-09-30 Thread Steven D'Aprano
On Tue, 30 Sep 2008 14:50:26 +1300, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, r0g wrote: > >> You can only distribute modifications to gnuplot itself as patches, but >> you can distribute it freely ... > > This must be some new definition of "freely" of which I'm unaware. You

How best to pass arbitrary parameters from one function to another

2008-09-30 Thread John O'Hagan
Hi Pythonistas, I'm looking for the best way to pass an arbitrary number and type of variables created by one function to another. They can't be global because they may have different values each time they are used in the second function. So far I'm trying to do something like this: def proce

Re: Python is slow?

2008-09-30 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Tue, 30 Sep 2008 14:50:26 +1300, Lawrence D'Oliveiro wrote: > > > In message <[EMAIL PROTECTED]>, r0g wrote: > > > >> You can only distribute modifications to gnuplot itself as > >> patches, but you can distribute it freely ... […] > Where's the

Python-URL! - weekly Python news and links (Sep 30)

2008-09-30 Thread Gabriel Genellina
QOTW: "AFAICT, _everybody_ is bad at programming C++. One begins to suspect it's not the fault of the programmers." - Grant Edwards Mixing integer, float, Decimal and Fraction objects when comparing may yield unexpected results: http://groups.google.com/group/comp.lang.pyth

Welcome to US Computer Jobs

2008-09-30 Thread aathi
Welcome to US Computer Jobs Windows System Engineer Phone and Inperson Interview http://geocities.com/anandrisks/ http://friendfinder.com/go/g959922 http://amigos.com/go/g959922 -- http://mail.python.org/mailman/listinfo/python-list

Welcome to US Computer Jobs

2008-09-30 Thread aathi
Welcome to US Computer Jobs Windows System Engineer Phone and Inperson Interview http://geocities.com/anandrisks/ http://friendfinder.com/go/g959922 http://amigos.com/go/g959922 -- http://mail.python.org/mailman/listinfo/python-list

can someone explain why this happens- newbie question

2008-09-30 Thread garywood
Hi can someone tell me why it prints the high score table multiple times? #high scores program scores =[] choice = None while choice != 0: print """high Score Table 0 - exit 1 - show Scores 2 - add a score 3 - delete a score 4 - sort scores """

Re: Problems compiling on CentOS Python 2.5

2008-09-30 Thread alexomoto
On Sep 23, 10:37 am, "F." <[EMAIL PROTECTED]> wrote: > Hello, > I have problems makingpythonon CentOS 5. > Seems that can not find something. I can not find the problem. > Where is the problem? > > > case $MAKEFLAGS in \ > >         *-s*)  CC='gcc -pthread' LDSHARED='gcc -pthread -shared' > > OPT=

Re: How best to pass arbitrary parameters from one function to another

2008-09-30 Thread Bruno Desthuilliers
John O'Hagan a écrit : Hi Pythonistas, I'm looking for the best way to pass an arbitrary number and type of variables created by one function to another. > They can't be global because they may have different values each time they are used in the second function. So far I'm trying to do som

Re: How best to pass arbitrary parameters from one function to another

2008-09-30 Thread Steven D'Aprano
On Tue, 30 Sep 2008 08:58:15 +, John O'Hagan wrote: > Hi Pythonistas, > > I'm looking for the best way to pass an arbitrary number and type of > variables created by one function to another. They can't be global > because they may have different values each time they are used in the > second

Re: can someone explain why this happens- newbie question

2008-09-30 Thread Almar Klein
change: for score in scores: print scores to: for score in scores: print score that should do the trick :) Almar 2008/9/30 garywood <[EMAIL PROTECTED]> > Hi > can someone tell me why it prints the high score table multiple times? > > #high scores program > scores =[] > choice = None > >

Re: python & sms

2008-09-30 Thread M�ta-MCI (MVP)
Hi! You can manage Skype from Python('s scripts), for use the functionalities of Skype to send SMS. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-30 Thread Bruno Desthuilliers
Lawrence D'Oliveiro a écrit : In message <[EMAIL PROTECTED]>, James Mills wrote: On Fri, Sep 26, 2008 at 8:20 AM, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: Object orientation IS procedural. Correction: OOP is Imperative. No, "procedural". Nope, "imperative" !-) The functional unit

Re: Python is slow?

2008-09-30 Thread Steven D'Aprano
On Tue, 30 Sep 2008 19:04:41 +1000, Ben Finney wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> On Tue, 30 Sep 2008 14:50:26 +1300, Lawrence D'Oliveiro wrote: >> >> > In message <[EMAIL PROTECTED]>, r0g wrote: >> > >> >> You can only distribute modifications to gnuplot itself as patche

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

2008-09-30 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.0.29, with the following changes. Thanks to those mentioned for helping out! - datetime implementation (Karel Heyse, Pavel Vinogradov, FFAO, David Marek) - ConfigParser implementation (suggested by Albert Hofkamp) - staticmethod and property decorator supp

Weirdness comparing strings

2008-09-30 Thread Mr . SpOOn
Hi, I have this piece of code: class Note(): ... ... def has_the_same_name(self, note): return self == note def __str__(self): return self.note_name + accidentals[self.accidentals] __repr__ = __str__ if __name__ == '__main__': n = Note('B')

Re: Weirdness comparing strings

2008-09-30 Thread Almar Klein
Hi, Better post complete code. I don't see where self.note_name is defined, and what are these accidentals? you write: def has_the_same_name(self, note): return self == note but this does not implicitly convert self to a string. You'll have to do in explicitly: use "return str(self) == note"

Re: Weirdness comparing strings

2008-09-30 Thread Ken Seehart
Instance comparison is not necessarily the same as string comparison. Neither __str__ nor __repr__ are implicitly used at all for comparison. In fact, by default a pair of instances are not equal unless they are the same object. To define comparison to mean something, you need to define __cm

Tix Combo box problem - remains in editable mode only

2008-09-30 Thread dudeja . rajat
Hi I'm facing a problem with the tix combo box in a way that my combo box is always in an editable mode after I have cleared subwidgets Entry and Listbox from it. My setup is like this : CheckButton1 : If this is unset, the combo box should get disabled, the entries in it should get cleared (

Re: Weirdness comparing strings

2008-09-30 Thread Mr . SpOOn
On Tue, Sep 30, 2008 at 12:55 PM, Ken Seehart <[EMAIL PROTECTED]> wrote: > Instance comparison is not necessarily the same as string comparison. > Neither __str__ nor __repr__ are implicitly used at all for comparison. Ok, I see. > In fact, by default a pair of instances are not equal unless the

Re: what does "python -i" use as input stream (stdin)?

2008-09-30 Thread Almar Klein
Wow, it's that easy... thanks! 2008/9/29 Gabriel Genellina <[EMAIL PROTECTED]> > En Fri, 26 Sep 2008 04:29:42 -0300, Almar Klein <[EMAIL PROTECTED]> > escribió: > > I would still like to hear if anyone knows how I can change the input >> stream >> that >> is used when running "python -i", but I

Re: What is not objects in Python?

2008-09-30 Thread Steve Holden
Terry Reedy wrote: > Steven D'Aprano wrote: >> On Mon, 29 Sep 2008 05:41:02 -0700, George Sakkis wrote: >> >>> For example I would be much less >>> opposed to len() being defined as, say, |x| if "|...|" was a valid >>> operator. >> >> Arghh! No!!! |x| should be abs(x), not len(x). Just ask mathemat

Re: Comparing float and decimal

2008-09-30 Thread Mark Dickinson
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: (0) Do nothing besides documenting the problem some

Advice for a replacement for plone.

2008-09-30 Thread Ken Seehart
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 web development it is too monolithic. Is there anyth

Re: Tix Combo box problem - remains in editable mode only

2008-09-30 Thread dudeja . rajat
On Tue, Sep 30, 2008 at 11:57 AM, <[EMAIL PROTECTED]> wrote: > Hi > > I'm facing a problem with the tix combo box in a way that my combo box is > always in an editable mode after I have cleared subwidgets Entry and Listbox > from it. > > > My setup is like this : > > CheckButton1 : > > If this is

Re: What is not objects in Python?

2008-09-30 Thread Lie Ryan
On Mon, 2008-09-29 at 21:03 -0700, namekuseijin wrote: > On 28 set, 15:29, process <[EMAIL PROTECTED]> wrote: > > I have heard some criticism about Python, that it is not fully object- > > oriented. > > So what? > > > Why isn't len implemented as a str.len and list.len method instead of > > a len

Re: Newbie question...

2008-09-30 Thread Ken Seehart
Ken D'Ambrosio wrote: First, apologies for such a newbie question; if there's a better forum (I've poked around, some) feel free to point it out to me. Anyway, a mere 25-odd years after first hearing about OOP, I've finally decided to go to it, by way of Python. But this puzzles me: import

Re: Python is slow?

2008-09-30 Thread Ben Finney
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 not > > enough to make the work free. The freedom to help people

Re: writing dll in python?

2008-09-30 Thread Scott David Daniels
Terry Reedy wrote: Start with the Python tutorial, perhaps parts of the reference manual, and definitely peruse the first chapters in the library manual on built-in functions and classes. Check out http://wiki.python.org/moin/BeginnersGuide to see a range of ways to learn Python, most

Re: Python is slow?

2008-09-30 Thread Paul Boddie
On 30 Sep, 14:19, Ben Finney <[EMAIL PROTECTED]> wrote: > > This is where the useful "your freedom to swing your fist ends at the > tip of the other man's nose" applies: As soon as the act you wish to > perform is restricting the freedom of another, you're not > contemplating an act of freedom, but

Re: What is not objects in Python?

2008-09-30 Thread Steve Holden
Steven D'Aprano wrote: > On Mon, 29 Sep 2008 21:03:07 -0700, namekuseijin wrote: > >>> Why isn't len implemented as a str.len and list.len method instead of a >>> len(list) function? >> Because postfix notation sucks. The natural way of spelling is >> adjective+noun and verb+predicate. > > "Natu

Re: How best to pass arbitrary parameters from one function to another

2008-09-30 Thread John O'Hagan
On Tue Sep 30 11:32:41 CEST 2008, Steven D'Aprano >On Tue, 30 Sep 2008 08:58:15 +, John O'Hagan wrote: > >> Hi Pythonistas, >> >> I'm looking for the best way to pass an arbitrary number and type of >> variables created by one function to another. They can't be global >> because they may ha

Re: Weirdness comparing strings

2008-09-30 Thread Scott David Daniels
Mr.SpOOn wrote: Hi, I have this piece of code: class Note(): Unless you _need_ old-style, use new style. ... def has_the_same_name(self, note): return self == note Define equality (__eq__) if you want to compare for equality. def __str__(self): return self

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >