PyCon Australia 2011: Sprints

2011-06-28 Thread Ryan Kelly
Hi Everyone, We have confirmed arrangements for two days of Sprints following PyCon Au this year. This will be a great opportunity to contribute to the Python ecosystem under the guidance of experienced developers, so bring your laptops! PyCon Australia is Australia's only conference dedicated

Re: Change the name with the random names in a text file

2011-06-28 Thread Chris Rebert
On Tue, Jun 28, 2011 at 12:17 PM, Amaninder Singh wrote: > Hi Guys, > I am fairly new to the language and programing. I am trying to solve a > problem in a text file. Where names are something like in this  manner > [**Name2 (NI) 98**] > > [**Last Name (STitle) 97**] >  [**First Name4 (NamePattern

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Chris Angelico
On Wed, Jun 29, 2011 at 8:56 AM, Chris Angelico wrote: >      else emit(lastprefix+tails) >  else emit(lastprefix+tails) Typo in the above code. The else needs a colon after it, both times. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Chris Angelico
On Wed, Jun 29, 2011 at 3:32 AM, Ellerbee, Edward wrote: > How to condense a group of numbers to a wildcard list. For example: > > 252205 > 252206 > 252208 > > Condense to: > 25220[568] Assuming you have the list sorted (if not, that's the first place to start), I'd do a six-pass approach - one p

Re: Using decorators with argument in Python

2011-06-28 Thread Ben Finney
Jigar Tanna writes: > where I came across a special case of using arguments with decorators A decorator is a function which takes exactly one parameter, and returns a function based on that parameter. http://docs.python.org/glossary.html#term-decorator> http://docs.python.org/reference/

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
Mel wrote: Erik Max Francis wrote: Mel wrote: By convention, nobody ever talks about 1 x 9.97^6 . Not sure what the relevance is, since nobody had mentioned any such thing. If it was intended as a gag, I don't catch the reference. I get giddy once in a while.. push things to limits. It doe

Re: Significant figures calculation

2011-06-28 Thread Mel
Erik Max Francis wrote: > Mel wrote: >> Erik Max Francis wrote: >> >>> Chris Angelico wrote: On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano wrote: > Zero sig figure: 0 >>> That's not really zero significant figures; without further >>> qualification, it's one. >>> Is 0.0 on

how can I disable tkinter install?

2011-06-28 Thread Nat Echols
I am building Python 2.7.2 with a standard set of options as part of a nightly build system. Some of our machines apparently have the tk headers installed, so Python automatically builds Tkinter on those platforms. Unfortunately, this now breaks matplotlib. Is there a way to turn of tkinter alto

Re: what is the airspeed velocity of an unladen swallow

2011-06-28 Thread Ian Kelly
On Tue, Jun 28, 2011 at 1:33 PM, Xah Lee wrote: > this will be of interest to those bleeding-edge pythoners. > > “what… is the airspeed velocity of an unladen swallow?” > > xahlee.org/funny/unladen_swallow.html More interesting to me is not the ad but that Wolfram Alpha will actually answer the q

Re: what is the airspeed velocity of an unladen swallow

2011-06-28 Thread Alister Ware
On Tue, 28 Jun 2011 12:33:27 -0700, Xah Lee wrote: > this will be of interest to those bleeding-edge pythoners. > > “what… is the airspeed velocity of an unladen swallow?” > > xahlee.org/funny/unladen_swallow.html > > Xah is that an African or European swallow? -- -- http://mail.python.o

Re: How to create n number of threads

2011-06-28 Thread Ian Kelly
On Tue, Jun 28, 2011 at 1:33 PM, hisan wrote: > How to create n number thread in python. i want iterate over the for loop and > create a thread for each iteration . > sample code >  for i in range(o,50): >  i want to create 50 thread here which call the same function. how start and > stop each t

what is the airspeed velocity of an unladen swallow

2011-06-28 Thread Xah Lee
this will be of interest to those bleeding-edge pythoners. “what… is the airspeed velocity of an unladen swallow?” xahlee.org/funny/unladen_swallow.html Xah -- http://mail.python.org/mailman/listinfo/python-list

How to create n number of threads

2011-06-28 Thread hisan
How to create n number thread in python. i want iterate over the for loop and create a thread for each iteration . sample code for i in range(o,50): i want to create 50 thread here which call the same function. how start and stop each thread after completion -- http://mail.python.org/mailman/l

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Noah Hall
On Tue, Jun 28, 2011 at 6:32 PM, Ellerbee, Edward wrote: > Thank you! > > That works perfect, I'll have to look into string formatting more. > > My next issue to solve I've been researching is: > > How to condense a group of numbers to a wildcard list. For example: > > 252205 > 252206 > 252208 > 2

Change the name with the random names in a text file

2011-06-28 Thread Amaninder Singh
Hi Guys, I am fairly new to the language and programing. I am trying to solve a problem in a text file. Where names are something like in this manner [**Name2 (NI) 98**] [**Last Name (STitle) 97**] [**First Name4 (NamePattern1) 93**] [**Last Name (NamePattern1) 94**] ([**Name (NI) 95**]) [**Las

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
Steven D'Aprano wrote: On Tue, 28 Jun 2011 01:16 pm Chris Angelico wrote: On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano wrote: Zero sig figure: 0 Is 0.0 one sig fig or two? (Just vaguely curious. Also curious as to whether a zero sig figures value is ever useful.) Two. I was actually

Re: Significant figures calculation

2011-06-28 Thread Erik Max Francis
Mel wrote: Erik Max Francis wrote: Chris Angelico wrote: On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano wrote: Zero sig figure: 0 That's not really zero significant figures; without further qualification, it's one. Is 0.0 one sig fig or two? Two. (Just vaguely curious. Also curious

RE: Suppressing newline writing to file after variable

2011-06-28 Thread Ellerbee, Edward
Thank you! That works perfect, I'll have to look into string formatting more. My next issue to solve I've been researching is: How to condense a group of numbers to a wildcard list. For example: 252205 252206 252208 252220 252221 25 252223 919745 919725 919785 704770 thru 704799 (all numbe

Re: Using decorators with argument in Python

2011-06-28 Thread Ian Kelly
On Tue, Jun 28, 2011 at 10:52 AM, Jigar Tanna wrote: > coming across to certain views from people, it is not a good practice > to use > decorators with arguments (i.e. @memoize() ) and instead it is good to > just > use @memoize. Can any of you guys explain me advantages and > disadvantages of > u

Re: Using decorators with argument in Python

2011-06-28 Thread Lie Ryan
On 06/29/2011 02:52 AM, Jigar Tanna wrote: > coming across to certain views from people, it is not a good practice > to use > decorators with arguments (i.e. @memoize() ) and instead it is good to > just > use @memoize. Can any of you guys explain me advantages and > disadvantages of > using each

Using decorators with argument in Python

2011-06-28 Thread Jigar Tanna
I am new to Python and Django, was going through the concept of decorators where I came across a special case of using arguments with decorators Below is the code for memoization where I was looking at the concept... cache = {} def get_key(function, *args, **kw) : key = '%s. %s: ' % (function.

Re: Suppressing newline writing to file after variable

2011-06-28 Thread Noah Hall
On Tue, Jun 28, 2011 at 5:05 PM, Ellerbee, Edward wrote: > Hi all, newbie question here. I'm using python 2.7. I've built my first > program to pull some info off the web, process it, and build dialpeers for a > cisco router. I have 2 problems - the first is the formatting of printing > the gather

Suppressing newline writing to file after variable

2011-06-28 Thread Ellerbee, Edward
Hi all, newbie question here. I'm using python 2.7. I've built my first program to pull some info off the web, process it, and build dialpeers for a cisco router. I have 2 problems - the first is the formatting of printing the gathered information to a file. It seems to be inserting a new line afte

Re: PyPad 2.7.1 Update 4 (Python on iPad and iPhone)

2011-06-28 Thread AlienBaby
On Jun 23, 2:07 pm, Jon Dowdall wrote: > Hi All, > > I'm pleased to announce that PyPad (Python environment for iOS) 2.7.1 > Update 4 is now available in the iTunes App Store. New in this version > is the ability to create custom modules. Modules can be independent or > can include other user modu

Re: Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-28 Thread mando
Why my post aren't here? -- http://mail.python.org/mailman/listinfo/python-list

Re: module problem on windows 64bit

2011-06-28 Thread Christian Heimes
Am 28.06.2011 14:59, schrieb Peter Irbizon: > yes, that's right. but I am using embedable version of fbclient.dll so I > don't need to install Firebird Sql Server package. all dlls are in my > program folder even so it does not work. fbclient.dll may depend on more DLLs. Dependency walker is a gre

Re: module problem on windows 64bit

2011-06-28 Thread Peter Irbizon
> kinterbasdb's extension module _kinterbasdb.pyd depends on the shared > library fbclient.dll. The Firebird client library is of the Firebird SQL > server. As I already explained you have to install the 32bit (!) version > of Firebird and enable the "copy client dll to system32" option during > th

Re: Significant figures calculation

2011-06-28 Thread Chris Angelico
On Tue, Jun 28, 2011 at 9:47 PM, Mel wrote: > > By convention, nobody ever talks about 1 x 9.97^6 . Unless you're a British politician of indeterminate party allegiance famous line, quoted as #6 in here: http://www.telegraph.co.uk/culture/tvandradio/7309332/The-ten-funniest-ever-Yes-Minister-

Re: Significant figures calculation

2011-06-28 Thread Mel
Erik Max Francis wrote: > Chris Angelico wrote: >> On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano >> wrote: >>> Zero sig figure: 0 > > That's not really zero significant figures; without further > qualification, it's one. > >> Is 0.0 one sig fig or two? > > Two. > >> (Just vaguely curious.

Re: How to read barcoded value from PDF

2011-06-28 Thread Robin Becker
On 28/06/2011 06:59, Asif Jamadar wrote: Hi, ... In Reportlab I can do the following code to generate barcode and to get the value of that barcode barcode=code39.Extended39("123456789",barWidth=0.2*mm,barHeight=8*mm) bc = Paragraph("Barcode value: %s" % barcod

Re: Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-28 Thread Ned Deily
In article <7e5a3cc6-93d0-4750-93cd-fe721960d...@u26g2000vby.googlegroups.com>, mando wrote: > This is the result of the test you suggested to me. What do you think? > > Last login: Mon Jun 27 19:35:21 on ttys000 > host220-186-dynamic:~ luca$ cd /Library/Frameworks/Python.framework/ > Versions/

Re: Significant figures calculation

2011-06-28 Thread Steven D'Aprano
On Tue, 28 Jun 2011 01:16 pm Chris Angelico wrote: > On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano > wrote: >> Zero sig figure: 0 >> > > Is 0.0 one sig fig or two? (Just vaguely curious. Also curious as to > whether a zero sig figures value is ever useful.) Two. I was actually being slightl

Re: module problem on windows 64bit

2011-06-28 Thread Christian Heimes
Am 27.06.2011 22:03, schrieb Peter Irbizon: > well, my program exe generated from py2exe. I am running Python 2.7 on my > win xp 32bit box then I compile my application with py2exe. After that I can > use it on other computers (on 32bit everything works perfect) but on 64 bit > windows I am getting

Re: Trying to chain processes together on a pipeline

2011-06-28 Thread Andrew Berg
On 2011.06.28 02:44 AM, Thomas Rachel wrote: > The way you work with the exception is not the very best - instead of > parsing the stringified exception, you better would trigger on > exc.winerror (it is an integer with the error number). > > Or, even better, just pas the error information contai

Re: Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-28 Thread mando
This is the result of the test you suggested to me. What do you think? Last login: Mon Jun 27 19:35:21 on ttys000 host220-186-dynamic:~ luca$ cd /Library/Frameworks/Python.framework/ Versions/2.6 host220-186-dynamic:2.6 luca$ cd ./lib/python2.6/lib-dynload/ host220-186-dynamic:lib-dynload luca$ ot

Re: Trying to chain processes together on a pipeline

2011-06-28 Thread Thomas Rachel
Am 28.06.2011 07:57 schrieb Andrew Berg: I'm working on an audio/video converter script (moving from bash to Python for some extra functionality), and part of it is chaining the audio decoder (FFmpeg) either into SoX to change the volume and then to the Nero AAC encoder or directly into the Nero