Re: Boilerplate in rich comparison methods

2007-01-12 Thread George Sakkis
Steven D'Aprano wrote: > I'm writing a class that implements rich comparisons, and I find myself > writing a lot of very similar code. If the calculation is short and > simple, I do something like this: > > > class Parrot: > def __eq__(self, other): > return self.plumage() == other.plu

Re: MP3 decoder module?

2007-01-12 Thread Paul Rubin
Terry Carroll <[EMAIL PROTECTED]> writes: > As I read the Pymedia docs, you can use it to decode frames from an > MP3, and operate on the decoded sound data. > > See http://pymedia.org/tut/dump_wav.html for a discussion. Hmm, thanks, it looks like there's more there than I thought at first, tough

Re: Boilerplate in rich comparison methods

2007-01-12 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > class Parrot: > def __eq__(self, other): > return self.plumage() == other.plumage() > def __ne__(self, other): > return self.plumage() != other.plumage() > def __lt__(self, other): > return self.plumage() < other.plum

Boilerplate in rich comparison methods

2007-01-12 Thread Steven D'Aprano
I'm writing a class that implements rich comparisons, and I find myself writing a lot of very similar code. If the calculation is short and simple, I do something like this: class Parrot: def __eq__(self, other): return self.plumage() == other.plumage() def __ne__(self, other):

Re: Maths error

2007-01-12 Thread Hendrik van Rooyen
"Nick Maclaren" <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: > |> > |> I would have thought that this sort of thing was a natural consequence > |> of rounding errors - if I round (or worse truncate) a binary, I can be off > |> by

Re: General Question About Python

2007-01-12 Thread Hendrik van Rooyen
"Torabisu" <[EMAIL PROTECTED]> wrote: > > billie wrote: > > Torabisu wrote: > > > > > Its quite weird, we're looking for Python skills but are battling to > > > find at the moment... Normally Python on its own will probably not > > > land you a job, but the last two companies I've worked for a

How can I integrate RPC with WSGI ???

2007-01-12 Thread வினோத்
How can I integrate RPC with WSGI ??? is any methods for it?? -- http://mail.python.org/mailman/listinfo/python-list

Re: More M2Crypto issues. Not big ones, though.

2007-01-12 Thread John Nagle
Heikki Toivonen wrote: > John Nagle wrote: > >> A list of small problems and bugs in the current M2Crypto: >>I need to look at SSL certificates in some detail, so this >>is all about the access functions for certificates. > > > Thanks, got the reports, will check them out. > > >>3. /M2Cry

Re: how to clean sys.path

2007-01-12 Thread Tim Roberts
"siggi" <[EMAIL PROTECTED]> wrote: > >or in plain DOS: > >C:\Documents and Settings\User\My Documents\My Python files >C:\Documents and Settings\User\My Documents\Python25\Lib\idlelib >C:\Documents and Settings\User\My Documents\Python25\python25.zip >C:\Documents and Settings\User\My Documents\Pyt

Re: Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-12 Thread John Nagle
Heikki Toivonen wrote: > John Nagle wrote: > >>def connect(self, addr): >>self.socket.connect(addr) >>self.addr = addr >>self.socket.settimeout(None) # Back to normal timeout (NEW) > > > I am not sure if this is always appropriate. In fact, doesn't this just > eliminate the timeout c

Weekly Python Patch/Bug Summary

2007-01-12 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 421 open ( +3) / 3530 closed ( +8) / 3951 total (+11) Bugs: 963 open ( +4) / 6426 closed (+21) / 7389 total (+25) RFE : 255 open ( +5) / 246 closed ( +1) / 501 total ( +6) New / Reopened Patches __ The Unico

Re: Tools Designing large/complicated applications

2007-01-12 Thread Dan Sommers
On Sat, 13 Jan 2007 00:00:20 +0100, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Carl J. Van Arsdall a écrit : >> For those of you that work on larger applications but still code in >> python... do your development teams use any tools to facilitate the >> design? > Yes : coffee, beer, pizzas

Re: What is a perl hash in python

2007-01-12 Thread sturlamolden
Karyn Williams wrote: > I am new to Pyton. I am trying to modify and understand a script someone > else wrote. I am trying to make sense of the following code snippet. I know > line 7 would be best coded with regex. I first would like to understand > what was coded originally. thelistOut looks lik

Re: Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-12 Thread Heikki Toivonen
John Nagle wrote: > def connect(self, addr): > self.socket.connect(addr) > self.addr = addr > self.socket.settimeout(None) # Back to normal timeout (NEW) I am not sure if this is always appropriate. In fact, doesn't this just eliminate the timeout completely from this connection? In y

Re: More M2Crypto issues. Not big ones, though.

2007-01-12 Thread Heikki Toivonen
John Nagle wrote: > A list of small problems and bugs in the current M2Crypto: > I need to look at SSL certificates in some detail, so this > is all about the access functions for certificates. Thanks, got the reports, will check them out. > 3. /M2Crypto/SSL/Connection.py:147: > Depreca

Re: modules...n methods

2007-01-12 Thread Bjoern Schliessmann
belinda thom wrote: > This becomes a lot easier if you use IPython (which embellishes > the python shell in many useful ways). For instance, I did a "dir > (__builtins__)" to find out what some of the builtin functions > were. Sure. > HTH I'm sorry, it doesn't help me. And *please* don't send

AlphaBeta Search

2007-01-12 Thread Chris
I know this probably seems trivial, but I can't seem to find the bug in my alphabeta search implementation. I'm testing it with the game of tic-tac-toe. If the first player plays in a corner, the correct move is to play in the center, but for some reason my code thinks the center and remaining cor

Re: MP3 decoder module?

2007-01-12 Thread Terry Carroll
Paul Rubin wrote: > Anyone know of a reasonable mp3 decoder library I can call from > Python? Some Googling didn't find anything too promising. It found > Pymedia (which plays mp3's through a sound system) But I want to > actually decode the mp3 frames and crunch on the audio samples. As I

Re: Rational Numbers

2007-01-12 Thread Steven D'Aprano
On Fri, 12 Jan 2007 17:15:56 +, Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > Facundo Batista <[EMAIL PROTECTED]> writes: > |> Noud Aldenhoven wrote: > |> > |> > There are a (small) couple of other issues where rational numbers could > be > |> > handy. That's because rational numb

Re: Rational Numbers

2007-01-12 Thread Steven D'Aprano
On Fri, 12 Jan 2007 20:07:04 +, Simon Brunning wrote: > On 1/12/07, Thomas Ploch <[EMAIL PROTECTED]> wrote: >> Do not forget: >> >> - Time >> - Personal Data (like birthdays, age) > > The datetime module has perfectly good classes for holding date and > time values, and age sounds like an int

Re: MP3 decoder module?

2007-01-12 Thread Paul Rubin
Paul Rubin writes: > Basically I want to write a program that takes an mp3 audio file and > finds the silent frames, with the idea of chopping the file into > segments at those points automatically, or compressing the silences > out of spoken audio to make it play faster

MP3 decoder module?

2007-01-12 Thread Paul Rubin
Anyone know of a reasonable mp3 decoder library I can call from Python? Some Googling didn't find anything too promising. It found Pymedia (which plays mp3's through a sound system) and any number of utilities that parse ID3 tags and other metadata. But I want to actually decode the mp3 frames a

Re: Is it possible to get whole commandline include redirection.., etc

2007-01-12 Thread Steven W. Orr
On Friday, Jan 12th 2007 at 15:11 -0800, quoth [EMAIL PROTECTED]: =>Can I get whole commandline not only argument list. => =>1. When I command like this =>$ a.py > filename =>2. sys.argv is returns only argument list =>['a.py'] => =>Is there a way to find out 'redirection' information. As

Re: How to respond to a confirmation prompt automatically

2007-01-12 Thread Coby
Thanks Rob. Rob Wolfe wrote: > "Coby" <[EMAIL PROTECTED]> writes: > > > Just to give you some background about my problem: > > > > I execute os.system(command), where command is a string. > > > > On the command line in windows, I get: > > > > "Continue, and unload these objects? [no]" > > > > I n

Is it possible to get whole commandline include redirection.., etc

2007-01-12 Thread postindex
Can I get whole commandline not only argument list. 1. When I command like this $ a.py > filename 2. sys.argv is returns only argument list ['a.py'] Is there a way to find out 'redirection' information. thank you for reading this -- http://mail.python.org/mailman/listinfo/python-list

More M2Crypto issues. Not big ones, though.

2007-01-12 Thread John Nagle
A list of small problems and bugs in the current M2Crypto: I need to look at SSL certificates in some detail, so this is all about the access functions for certificates. Bugs: 1. Off by one error at "X509.get_ext_count()". Reports eight extensions on a certificate that only ha

ANN: Python training course, Feb 7-10, San Francisco

2007-01-12 Thread wesley chun
apologies to all... this is the Intro course, not Advanced as the orig subject line stated, and it takes place Feb 7-9, 2007. On 1/12/07, wesley chun wrote: > FINAL REMINDER... we still have some seats left! > > What: (Intensive) Intro to Python > When: February 7-9, 2007 > Where: San Francis

Re: globals accros modules

2007-01-12 Thread Bruno Desthuilliers
Stef Mientki a écrit : > Bruno Desthuilliers wrote: > >> Stef Mientki a écrit : >> >>> Bruno Desthuilliers wrote: >>> stef a écrit : >> >> (snip) >> > but tell them that they are going to loose all their globals ??? It's a feature. Globals are definitively a BadThing(tm). >>> >>

Re: ANN: Advanced Python training course, Nov 8-10, San Francisco

2007-01-12 Thread wesley chun
FINAL REMINDER... we still have some seats left! What: (Intensive) Intro to Python When: February 7-9, 2007 Where: San Francisco (SFO/San Bruno), CA, USA Web:http://cyberwebconsulting.com (click "Python Training" link) Need to get up-to-speed with Python as quickly as possible? Come join

Re: How to respond to a confirmation prompt automatically

2007-01-12 Thread Rob Wolfe
"Coby" <[EMAIL PROTECTED]> writes: > Just to give you some background about my problem: > > I execute os.system(command), where command is a string. > > On the command line in windows, I get: > > "Continue, and unload these objects? [no]" > > I need to respond 'y' to continue, but I am uncertain o

Re: Portable Python - free portable development environment !

2007-01-12 Thread skip
perica> but this is first release and I have big plans ;) Including maybe other platforms than Windows? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Tools Designing large/complicated applications

2007-01-12 Thread Bruno Desthuilliers
Carl J. Van Arsdall a écrit : > For those of you that work on larger applications but still code in > python... do your development teams use any tools to facilitate the > design? Yes : coffee, beer, pizzas, cigarettes, paper napkins, pen, and a good wiki. > (i'm not asking about editors here,

Re: ArchGenXML please help

2007-01-12 Thread Bruno Desthuilliers
tonydevlin a écrit : > > > Bruno Desthuilliers wrote: > >>tonydevlin a écrit : >> >>>I am creating a workflow in plone using argouml and archgenxml. I have >>>been >>>following the steps on the site:- >>>http://plone.org/documentation/tutorial/anonymously-adding-custom-content-types-with-argoum

Re: Portable Python - free portable development environment !

2007-01-12 Thread Stef Mientki
[EMAIL PROTECTED] wrote: > Right now there is not a big difference with Movable Python. > - Smaller size but less libraries in default package > - Portable Python comes with django > - Uses SciTE not SPE > > but this is first release and I have big plans ;) > any plans for a something like the En

Re: What is a perl hash in python

2007-01-12 Thread Bruno Desthuilliers
Karyn Williams a écrit : > I am new to Pyton. I am trying to modify and understand a script someone > else wrote. I am trying to make sense of the following code snippet. I know > line 7 would be best coded with regex. I first would like to understand > what was coded originally. thelistOut looks l

Re: Portable Python - free portable development environment !

2007-01-12 Thread perica . zivkovic
Right now there is not a big difference with Movable Python. - Smaller size but less libraries in default package - Portable Python comes with django - Uses SciTE not SPE but this is first release and I have big plans ;) grtz Perica Steve Holden wrote: > [EMAIL PROTECTED] wrote: > > Hi there, >

Re: module file

2007-01-12 Thread Rob Wolfe
Imbaud Pierre <[EMAIL PROTECTED]> writes: > I am willing to retrieve the file an imported module came from; > module.__file__, or inspect.getfile(module) only gives me the > relative file name. How do I determine the path? >>> import os >>> os.path.abspath(module.__file__) -- HTH, Rob -- http:

Re: Regex Question

2007-01-12 Thread James Stroud
Bill Mill wrote: > Hello all, > > I've got a test script: > > start python code = > > tests2 = ["item1: alpha; item2: beta. item3 - gamma--", > "item1: alpha; item3 - gamma--"] > > def test_re(regex): >r = re.compile(regex, re.MULTILINE) >for test in tests2: >res = r.se

WMI Python, writing remotely and retrieving env variables values

2007-01-12 Thread Thierry Lam
I'm using the WMI library for python and I was able to connect to another computer on the network with the following line: c = wmi.WMI(computer="the-network-computer", user="hello", password="hello") Is there a way to write information to a file on that computer? How do I read environment variab

Re: What is a perl hash in python

2007-01-12 Thread BartlebyScrivener
Karyn Williams wrote: > > For future reference, why is direct use of the string module frowned upon, > and what does one use instead ? > Karyn, http://docs.python.org/lib/node42.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a perl hash in python

2007-01-12 Thread Karyn Williams
At 06:54 PM 1/12/07 GMT, you wrote: >On Fri, 12 Jan 2007 09:15:44 -0800, Karyn Williams <[EMAIL PROTECTED]> >declaimed the following in comp.lang.python: > >> I am new to Pyton. I am trying to modify and understand a script someone >> else wrote. I am trying to make sense of the following code snip

Re: modules...n methods

2007-01-12 Thread belinda thom
On Jan 12, 2007, at 8:56 AM, Bjoern Schliessmann wrote: > lee wrote: > >> whats the way to read the sourcecode of methods > > Easy. Look up the .py file and open it in an editor of your choice. > Those files are, for example, in "/usr/lib/python". > >> and built in functions? This becomes a lot

Re: Parallel Python

2007-01-12 Thread mheslep
Konrad Hinsen wrote: Perhaps we should start a > special interest group? Not so much in order to work on a single > project; I believe that at the current state of parallel computing we > still need many different approaches to be tried. But an exchange of > experience could well be useful fo

Re: parsing a file name

2007-01-12 Thread Roberto Bonvallet
CSUIDL PROGRAMMEr wrote: > I have a filename > cairo-2.3.4.src.rpm > Is there any way i can only get 2.3.4 from this file name >>> a = "cairo-2.3.4.src.rpm" >>> import re >>> re.compile(r"\d+([.]\d+)*").search(a).group(0) '2.3.4' >>> a.split("-")[-1][:-len(".src.rpm")] '2.3.4' >>> ".".join(

Re: dynamic argument name for functions

2007-01-12 Thread mark
On 1/12/07, Carsten Haese <[EMAIL PROTECTED]> wrote: On Fri, 2007-01-12 at 20:22 +, Simon Brunning wrote: > On 1/12/07, mark <[EMAIL PROTECTED]> wrote: > > I want to pass a value to an argument of a function. The argument name is > > dynamic and is stored in a > > variable. How do I call th

Re: Newbie imap lib question

2007-01-12 Thread Roel Schroeven
jrpfinch schreef: > I have three messages in my inbox. Why does messageCount = > gServer.select('INBOX') not just return OK and 3. See below for > examples - seems to be completely random how many threes it returns. > The documentation for imaplib seems sparse. Does anybody have any good > links

Re: dynamic argument name for functions

2007-01-12 Thread Carsten Haese
On Fri, 2007-01-12 at 20:22 +, Simon Brunning wrote: > On 1/12/07, mark <[EMAIL PROTECTED]> wrote: > > I want to pass a value to an argument of a function. The argument name is > > dynamic and is stored in a > > variable. How do I call the function using with arg_name and value as the > > para

Re: dynamic argument name for functions

2007-01-12 Thread Simon Brunning
On 1/12/07, mark <[EMAIL PROTECTED]> wrote: > I want to pass a value to an argument of a function. The argument name is > dynamic and is stored in a > variable. How do I call the function using with arg_name and value as the > parameters. > thanks > mark > > For ex: > def function(arg1='None',

Re: dynamic argument name for functions

2007-01-12 Thread Carsten Haese
On Fri, 2007-01-12 at 12:17 -0800, mark wrote: > I want to pass a value to an argument of a function. The argument name > is dynamic and is stored in a > variable. How do I call the function using with arg_name and value as > the parameters. > thanks > mark > > For ex: > def function(arg1='None',

dynamic argument name for functions

2007-01-12 Thread mark
I want to pass a value to an argument of a function. The argument name is dynamic and is stored in a variable. How do I call the function using with arg_name and value as the parameters. thanks mark For ex: def function(arg1='None', arg2='None', arg3='None'): print arg1 print arg2

How to respond to a confirmation prompt automatically

2007-01-12 Thread Coby
Just to give you some background about my problem: I execute os.system(command), where command is a string. On the command line in windows, I get: "Continue, and unload these objects? [no]" I need to respond 'y' to continue, but I am uncertain on how to output the 'y' automatically. Thanks in

Re: Rational Numbers

2007-01-12 Thread Simon Brunning
On 1/12/07, Thomas Ploch <[EMAIL PROTECTED]> wrote: > Do not forget: > > - Time > - Personal Data (like birthdays, age) The datetime module has perfectly good classes for holding date and time values, and age sounds like an integer to me. -- Cheers, Simon B [EMAIL PROTECTED] -- http://mail.pyth

[ANN] XPN 0.7.0

2007-01-12 Thread Nemesis
XPN (X Python Newsreader) is a multi-platform newsreader with Unicode support. It is written with Python+GTK. It has features like scoring/actions, X-Face and Face decoding, muting of quoted text, newsrc import/export, find article and search in the body, spoiler char/rot13, random taglines and con

Re: Rational Numbers

2007-01-12 Thread Simon Brunning
On 12 Jan 2007 19:41:52 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > Sigh. I was hoping not to have that myth perpetrated again. > > Financial calculations need decimal FIXED-point, with a precisely > specified precision. It is claimed that decimal FLOATING-point > helps with providing that, b

Re: Rational Numbers

2007-01-12 Thread Thomas Ploch
Simon Brunning schrieb: > On 12 Jan 2007 15:55:39 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: >> In article <[EMAIL PROTECTED]>, >> Carsten Haese <[EMAIL PROTECTED]> writes: >> |> but there are more use >> |> cases for Decimal than for Rational. >> >> That is dubious, but let's not start that one

Re: Rational Numbers

2007-01-12 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, "Simon Brunning" <[EMAIL PROTECTED]> writes: |> |> > |> but there are more use |> > |> cases for Decimal than for Rational. |> > |> > That is dubious, but let's not start that one again. |> |> Decimals are good for holding financial values. There's a whole lot of |

Re: Rational Numbers

2007-01-12 Thread Simon Brunning
On 12 Jan 2007 15:55:39 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > Carsten Haese <[EMAIL PROTECTED]> writes: > |> but there are more use > |> cases for Decimal than for Rational. > > That is dubious, but let's not start that one again. Decimals are good for

Re: I need to consume a .NET web service in a Python client

2007-01-12 Thread Simon Brunning
On 12 Jan 2007 11:11:21 -0800, Ravi Teja <[EMAIL PROTECTED]> wrote: > Start Here > http://www.diveintopython.org/soap_web_services/index.html > Example Client > http://www.diveintopython.org/soap_web_services/first_steps.html Sadly, SOAPpy doesn't seem to be maintained any more. I'd take a look at

Re: I need to consume a .NET web service in a Python client

2007-01-12 Thread Ravi Teja
mohit wrote: > Hello, > > I am a .NET developer experimenting with Python. > I need to consume a .NET web service in a Python client. how do I go > about it? > which libraries do i need? > pointers to help me get started would be much appreciated. > I am just a newbie to the Python world so please

Re: Rational Numbers

2007-01-12 Thread Noud Aldenhoven
On 1/12/07, Facundo Batista <[EMAIL PROTECTED]> wrote: Noud Aldenhoven wrote: > There are a (small) couple of other issues where rational numbers could be > handy. That's because rational numbers are exact, irrational numbers (in > python) aren't. But these issues are probably too mathematical

Re: parsing a file name

2007-01-12 Thread Chris Mellon
On 12 Jan 2007 10:23:41 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > > > I'm trying to think of a good reason to extract the version from the > > filename instead of using RPM to get the real version from the > > metadata and I can't come up with one. > > The inquirer doe

I need to consume a .NET web service in a Python client

2007-01-12 Thread mohit
Hello, I am a .NET developer experimenting with Python. I need to consume a .NET web service in a Python client. how do I go about it? which libraries do i need? pointers to help me get started would be much appreciated. I am just a newbie to the Python world so please be bear with my novice queri

Re: What is a perl hash in python

2007-01-12 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Karyn Williams wrote: > I am new to Pyton. I am trying to modify and understand a script someone > else wrote. I am trying to make sense of the following code snippet. I know > line 7 would be best coded with regex. What is line 7 in the snippet? > I first would like to u

Re: parsing a file name

2007-01-12 Thread Paul Boddie
Chris Mellon wrote: > > I'm trying to think of a good reason to extract the version from the > filename instead of using RPM to get the real version from the > metadata and I can't come up with one. The inquirer doesn't have any RPM handling tools installed/available or is dealing with a lot of ve

Re: parsing a file name

2007-01-12 Thread Chris Mellon
On 12 Jan 2007 09:16:51 -0800, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> wrote: > I have a filename > cairo-2.3.4.src.rpm > Is there any way i can only get 2.3.4 from this file name > thanks > > -- > http://mail.python.org/mailman/listinfo/python-list > I'm trying to think of a good reason to extract

Re: parsing a file name

2007-01-12 Thread Tim Williams
On 12 Jan 2007 09:16:51 -0800, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> wrote: > I have a filename > cairo-2.3.4.src.rpm > Is there any way i can only get 2.3.4 from this file name Is this a one off, or do you have to process multiple files with similar names? -- Tim Williams -- http://mail.pyt

Re: ArchGenXML please help

2007-01-12 Thread tonydevlin
Bruno Desthuilliers wrote: > > tonydevlin a écrit : >> I am creating a workflow in plone using argouml and archgenxml. I have >> been >> following the steps on the site:- >> http://plone.org/documentation/tutorial/anonymously-adding-custom-content-types-with-argouml-and-archgenxml/creating-a-c

Re: Any python based "Live Web Chat Support"

2007-01-12 Thread Kartic
johnny sayeth, on 01/12/2007 11:11 AM: > Is there any open source "live web chat support" program or script out > there? Any you can recommend? Why don't you install ejabberd (a Jabber server implemented in erlang) and install Muckl (http://zeank.in-berlin.de/muckl/), an AJAX client for mult

What is a perl hash in python

2007-01-12 Thread Karyn Williams
I am new to Pyton. I am trying to modify and understand a script someone else wrote. I am trying to make sense of the following code snippet. I know line 7 would be best coded with regex. I first would like to understand what was coded originally. thelistOut looks like a hash to me (I'm more famili

Re: Newbie imap lib question

2007-01-12 Thread jrpfinch
All I have to go on is the RFC2060 standard which says: 7.3.1. EXISTS Response Contents: none The EXISTS response reports the number of messages in the mailbox. This response occurs as a result of a SELECT or EXAMINE command, and if the size of the mailbox changes (e.g. n

parsing a file name

2007-01-12 Thread CSUIDL PROGRAMMEr
I have a filename cairo-2.3.4.src.rpm Is there any way i can only get 2.3.4 from this file name thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational Numbers

2007-01-12 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Facundo Batista <[EMAIL PROTECTED]> writes: |> Noud Aldenhoven wrote: |> |> > There are a (small) couple of other issues where rational numbers could be |> > handy. That's because rational numbers are exact, irrational numbers (in |> > python) aren't. But these iss

Re: Parallel Python

2007-01-12 Thread Konrad Hinsen
On Jan 12, 2007, at 15:08, Paul Boddie wrote: > It seems to me that a more useful first step would be to create an > overview of the different modules and put it on the python.org Wiki: > > http://wiki.python.org/moin/FrontPage > http://wiki.python.org/moin/UsefulModules (a reasonable entry point)

Re: What about this?

2007-01-12 Thread Bjoern Schliessmann
Dr. Who wrote: > What's more amazing is that anyone would click on the link at all > given the increasing number of website that provide hidden content > that tries to deliver spyware or viruses just by getting visitors. How could active input reach *me* if I just fed the W3C validator with the U

Re: context managers and generators

2007-01-12 Thread Bjoern Schliessmann
Laszlo Nagy wrote: >> I'm still thinking there is a better way to do it, and would >> appreciate any ideas. > > Everything can be implemented with goto and arrays. But is that really better? Regards, Björn -- BOFH excuse #174: Backbone adjustment -- http://mail.python.org/mailman/list

Re: modules...n methods

2007-01-12 Thread Bjoern Schliessmann
lee wrote: > whats the way to read the sourcecode of methods Easy. Look up the .py file and open it in an editor of your choice. Those files are, for example, in "/usr/lib/python". > and built in functions? Get your python interpreter's source code and look up the functions there. Regards, B

'LoadFile' not found when invoking Acrobat via wx.lib.pdfwin

2007-01-12 Thread Christian Stapfer
Hi, I get the following traceback when trying to have wx.lib.pdfwin.PDFWindow open a PDF file: E:\Tutoring\Teacher\Flashcards>python pdfwin1.py Traceback (most recent call last): File "pdfwin1.py", line 50, in OnOpenButton self.pdf.LoadFile(dlg.GetPath()) File "C:\Python24\lib\site-pack

Re: ArchGenXML please help

2007-01-12 Thread Bruno Desthuilliers
tonydevlin a écrit : > I am creating a workflow in plone using argouml and archgenxml. I have been > following the steps on the site:- > http://plone.org/documentation/tutorial/anonymously-adding-custom-content-types-with-argouml-and-archgenxml/creating-a-class-and-workflow-with-argouml > > Howev

modules...n methods

2007-01-12 Thread lee
First of all thnx guys for ur cover on ma questionsOk some more then...whats the way to read the sourcecode of methods and built in functions? -- http://mail.python.org/mailman/listinfo/python-list

module file

2007-01-12 Thread Imbaud Pierre
I am willing to retrieve the file an imported module came from; module.__file__, or inspect.getfile(module) only gives me the relative file name. How do I determine the path? Its obviously possible from python: ipython displays the information (interactively: *module?*). Python 2.4 on Suse 9.3 (clu

ArchGenXML please help

2007-01-12 Thread tonydevlin
I am creating a workflow in plone using argouml and archgenxml. I have been following the steps on the site:- http://plone.org/documentation/tutorial/anonymously-adding-custom-content-types-with-argouml-and-archgenxml/creating-a-class-and-workflow-with-argouml However I am confused at step 9 in

getting the name of hyperlinks in a file

2007-01-12 Thread CSUIDL PROGRAMMEr
folks, I am trying to write a script that would open a download server and download all the files and store them in a list for example Download server is http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ is there any way this can be done in python?? -- http://mail.pytho

Re: How to modify object attribute by python C API

2007-01-12 Thread Huayang Xia
Thanks for the replies. For the checking, I found we have to spend a lot of codes to check the Python API's results. That is a pain. Is it reasonable to ignore the result check of APIs like PyString_FromString and PyString_AsString which will fail only when out of memory. Unfortunately there is no

Re: Need better run/edit method. I have to restart the shell after every script change.

2007-01-12 Thread Mark
Thanks guys. I'll give it a try. Brian Blais wrote: > Mark wrote: > > I'm currently running the IDLE shell under Python 2.5, on Windows XP. > > > > Every time I edit my .txt or .py file, I have to restart the IDLE shell > > for the changes to take effect. It's pretty annoying. Assuming IDLE is > >

Re: Rational Numbers

2007-01-12 Thread Facundo Batista
Noud Aldenhoven wrote: > There are a (small) couple of other issues where rational numbers could be > handy. That's because rational numbers are exact, irrational numbers (in > python) aren't. But these issues are probably too mathematical to be used in For the sake of me being less ignorant, cou

Any python based "Live Web Chat Support"

2007-01-12 Thread johnny
Is there any open source "live web chat support" program or script out there? Any you can recommend? -- http://mail.python.org/mailman/listinfo/python-list

Re: Matching Directory Names and Grouping Them

2007-01-12 Thread Neil Cerutti
On 2007-01-11, J <[EMAIL PROTECTED]> wrote: > Steve- > > Thanks for the reply. I think what I'm trying to say by similar > is pattern matching. Essentially, walking through a directory > tree starting at a specified root folder, and returning a list > of all folders that matches a pattern, in this

Re: Rational Numbers

2007-01-12 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Carsten Haese <[EMAIL PROTECTED]> writes: |> |> Ah, so now you're putting words in the BDFL's mouth. ;) |> |> The pronouncement does say "The needs outlined in the rationale section |> have been addressed to some extent by the acceptance of PEP 327 for |> decimal

Re: ValueError from dict - some detail would be helpful

2007-01-12 Thread Facundo Batista
metaperl wrote: > File "/sw/lib/python2.5/csv.py", line 120, in _dict_to_list > raise ValueError, "dict contains fields not in fieldnames" > > > --- it would be nice if it said what field it was Yeap, nice and useful... but, for example, what'd happen if the fields that are not in fieldname

Re: Rational Numbers

2007-01-12 Thread Carsten Haese
On Fri, 2007-01-12 at 15:05 +, Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > Carsten Haese <[EMAIL PROTECTED]> writes: > |> On Thu, 2007-01-11 at 23:47 +, Nick Maclaren wrote: > |> > In article <[EMAIL PROTECTED]>, > |> > Facundo Batista <[EMAIL PROTECTED]> writes: > |> > |> Pyth

Re: Python nuube needs Unicode help

2007-01-12 Thread [EMAIL PROTECTED]
Diez, you are awesome! This works! Thank you so much!!! You are so awesome! Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > > > Can you attach files in this forum? Couldn't find the option. Oh well, > > here's the file. > > > > #!/usr/bin/python > > # Version: 1.1 > > # Author: Steve Losh >

Re: context managers and generators

2007-01-12 Thread Laszlo Nagy
> I'm still thinking there is a better way to do it, and would appreciate > any ideas. > Everything can be implemented with goto and arrays. http://entrian.com/goto/ :-P -- http://mail.python.org/mailman/listinfo/python-list

Re: What about this?

2007-01-12 Thread Dr. Who
What's more amazing is that anyone would click on the link at all given the increasing number of website that provide hidden content that tries to deliver spyware or viruses just by getting visitors. Jeff Bjoern Schliessmann wrote: > new wrote: > > > www.magicoz.com > > amazing > > Yeah, it *is*

Re: Command line arguments on Vista

2007-01-12 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > But on Windows Vista, when I run that command, I get > > there are 1 args > arg: printargs.py > > What's up with that? It sounds like the registry entry for running Python files is messed up. Can you go to a command line and see what the command 'ftype Pyth

Re: Command line arguments on Vista

2007-01-12 Thread jmike
Some further information: perl seems to do the same thing (losing arguments). We think it may have something to do with file association. Any ideas anyone? --JMike -- http://mail.python.org/mailman/listinfo/python-list

Re: context managers and generators

2007-01-12 Thread [EMAIL PROTECTED]
Jean-Paul Calderone wrote: > On 12 Jan 2007 06:17:01 -0800, [EMAIL PROTECTED] wrote: > >I'm happily using context managers and co-routines, and would like to > >use both at the same time, e.g. > > Python has generators, not co-routines. They may be called generators, but I'm using them as co-routi

Re: Rational Numbers

2007-01-12 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Carsten Haese <[EMAIL PROTECTED]> writes: |> On Thu, 2007-01-11 at 23:47 +, Nick Maclaren wrote: |> > In article <[EMAIL PROTECTED]>, |> > Facundo Batista <[EMAIL PROTECTED]> writes: |> > |> Noud Aldenhoven wrote: |> > |> |> > |> > When I was programming in a m

Re: Command line arguments on Vista

2007-01-12 Thread jmike
By the way, note that if I say (on Vista) python printargs.py booga -a wooga I get the desired output: > there are 4 args > arg: printargs.py > arg: booga > arg: -a > arg: wooga So the quesiton still stands, what's up with that? Thanks, --JMike -- http://mail.pytho

Re: context managers and generators

2007-01-12 Thread Jean-Paul Calderone
On 12 Jan 2007 06:17:01 -0800, [EMAIL PROTECTED] wrote: >I'm happily using context managers and co-routines, and would like to >use both at the same time, e.g. Python has generators, not co-routines. > >with foo(): >... >x = yield y >... > >In this code multiple copies

Command line arguments on Vista

2007-01-12 Thread jmike
So I write this sript called printargs.py: -- #!/usr/local/bin/python import sys print 'there are %d args' % len(sys.argv) for arg in sys.argv: print 'arg: %s' % arg -- and make it executable. On pretty much every platform I can get my hands on, when I run printargs.py booga -a

  1   2   >