Re: Recursive calls and stack

2007-02-13 Thread [EMAIL PROTECTED]
On Feb 14, 11:45 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 14 Feb 2007 03:09:37 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > Hi, > > I have a program which literately finds the object that overlapping a > > point. The horizontal and vertical search are called r

Re: python not returning true

2007-02-13 Thread John Machin
On Feb 14, 5:45 pm, "agent-s" <[EMAIL PROTECTED]> wrote: > On Feb 13, 9:37 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 14, 4:15 pm, "agent-s" <[EMAIL PROTECTED]> wrote: > > > > I have a function, generally described as so: > > > > def function(args): > > > if condition: > > >

Re: How can this Perl regular expression be expressed in Python?

2007-02-13 Thread Gabriel Genellina
En Wed, 14 Feb 2007 04:11:37 -0300, John Nagle <[EMAIL PROTECTED]> escribió: > Gabriel Genellina wrote: >> En Wed, 14 Feb 2007 01:07:33 -0300, John Nagle <[EMAIL PROTECTED]> >> escribió: >> >>> Here's a large Perl regular expression, from a Perl address parser in >>> CPAN: >>> >>> use re 'ev

Re: python not returning true

2007-02-13 Thread agent-s
On Feb 13, 9:37 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > On Feb 14, 4:15 pm, "agent-s" <[EMAIL PROTECTED]> wrote: > > > I have a function, generally described as so: > > > def function(args): > > if condition: > > if condition2: > > function(args+1) > > r

Re: Recursive calls and stack

2007-02-13 Thread Gabriel Genellina
En Wed, 14 Feb 2007 03:09:37 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > Hi, > I have a program which literately finds the object that overlapping a > point. The horizontal and vertical search are called recursively from > inside each other. > Is this way of implementation fill th

Re: threading and multicores, pros and cons

2007-02-13 Thread Paul Rubin
Maric Michaud <[EMAIL PROTECTED]> writes: > Le mercredi 14 février 2007 05:49, Paul Rubin a écrit : > > Basically Python applications are usually not too CPU-intensive; there > > are some ways you can get parallelism with reasonable extra effort; > Basically, while not CPU intensive, application s

Re: How can this Perl regular expression be expressed in Python?

2007-02-13 Thread John Nagle
Gabriel Genellina wrote: > En Wed, 14 Feb 2007 01:07:33 -0300, John Nagle <[EMAIL PROTECTED]> > escribió: > >> Here's a large Perl regular expression, from a Perl address parser in >> CPAN: >> >> use re 'eval'; >> $Addr_Match{street} = qr/ >> (?: >># special case

Re: threading and multicores, pros and cons

2007-02-13 Thread Maric Michaud
Le mercredi 14 février 2007 05:49, Paul Rubin a écrit : > Basically Python applications are usually not too CPU-intensive; there > are some ways you can get parallelism with reasonable extra effort; Basically, while not CPU intensive, application server needs to get benefit of all resources of the

Re: How can this Perl regular expression be expressed in Python?

2007-02-13 Thread Gabriel Genellina
En Wed, 14 Feb 2007 01:07:33 -0300, John Nagle <[EMAIL PROTECTED]> escribió: > Here's a large Perl regular expression, from a Perl address parser in > CPAN: > > use re 'eval'; > $Addr_Match{street} = qr/ > (?: ># special case for addresses like 100 South Street >

Re: barcode generation

2007-02-13 Thread Gabriel Genellina
En Wed, 14 Feb 2007 00:56:14 -0300, <[EMAIL PROTECTED]> escribió: > I want to generate barcode based on an input which can be numbers or > numbers+alphabets. > How do I do this? Is there any library that will doo this? Try google... -- Gabriel Genellina -- http://mail.python.org/mailman/list

Re: Please help about an instance var

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 23:54:29 -0300, <[EMAIL PROTECTED]> escribió: from UserDict import UserDict d = {1:2,3:4,5:6} d1 = UserDict(d) d1 > {1: 2, 3: 4, 5: 6} d1.data > {1: 2, 3: 4, 5: 6} > Here why both d1 and d1.data have the same values?As shown below,they're > different

Recursive calls and stack

2007-02-13 Thread [EMAIL PROTECTED]
Hi, I have a program which literately finds the object that overlapping a point. The horizontal and vertical search are called recursively from inside each other. Is this way of implementation fill the stack space with the local variables inside each call. If this is not good, is there a better w

Re: Segmentation faults using threads

2007-02-13 Thread Hendrik van Rooyen
"Mathias" <[EMAIL PROTECTED]> wrote: > Does someone have experience with threading in python - are there > non-threadsafe functions I should know about? how do your threads communicate with one another - are there any globals that are accessed from different threads? strange this - you should

Re: calling php function from python

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 23:52:37 -0300, mark <[EMAIL PROTECTED]> escribió: > is it possible to call a php function from python and use a class from > php in python? i want to use mmslib which creates mms messages and the > only implementation is a php mmslib implementation. > thanks a lot! > mark I d

Re: python not returning true

2007-02-13 Thread Steven D'Aprano
On Tue, 13 Feb 2007 21:15:19 -0800, agent-s wrote: > I have a function, generally described as so: [snip function] > which is used in: > > if function(args): > print "ok" > > so here basically "text" will print out when condition3 is true but it > will not print o

Re: python not returning true

2007-02-13 Thread John Machin
On Feb 14, 4:15 pm, "agent-s" <[EMAIL PROTECTED]> wrote: > I have a function, generally described as so: > > def function(args): > if condition: > if condition2: > function(args+1) return None > elif condition3: > print "text" >

Re: python not returning true

2007-02-13 Thread Ben Finney
"agent-s" <[EMAIL PROTECTED]> writes: > I have a function, generally described as so: > > def function(args): > if condition: > if condition2: > function(args+1) > elif condition3: > print "text" > return True > else: > re

Re: Is python2.5's Tix wrapper broken?

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 22:10:54 -0300, Ron Provost <[EMAIL PROTECTED]> escribió: > Under Python2.5, the empty root window is displayed but I also get a > Traceback: > > Traceback (most recent call last): > File "", line 1, in > File "C:\Python25\lib\lib-tk\Tix.py", line 210, in __init__ > se

python not returning true

2007-02-13 Thread agent-s
I have a function, generally described as so: def function(args): if condition: if condition2: function(args+1) elif condition3: print "text" return True else: return False which is used in: if function(args):

Re: threading and multicores, pros and cons

2007-02-13 Thread Paul Rubin
Maric Michaud <[EMAIL PROTECTED]> writes: > If some guru has made a good recipe, or want to resume the main points it > would be really appreciated. Basically Python applications are usually not too CPU-intensive; there are some ways you can get parallelism with reasonable extra effort; and for m

threading and multicores, pros and cons

2007-02-13 Thread Maric Michaud
This is a recurrent problem I encounter when I try to sell python solutions to my customers. I'm aware that this problem is sometimes overlooked, but here is the market's law. I've heard of a bunch of arguments to defend python's choice of GIL, but I'm not quite sure of their technical backgrou

Re: Testers please

2007-02-13 Thread Martien Friedeman
Thanks for that for that Scott. Most of hassle is storing the program flow. For example: Iteration 3 of the loop starting on line 12 has itself a loop on line 15 that has 14 iterations. Iteration 4 of the loop starting on line 12 has a completely different set of iterations for the loop on line 1

How can this Perl regular expression be expressed in Python?

2007-02-13 Thread John Nagle
Here's a large Perl regular expression, from a Perl address parser in CPAN: use re 'eval'; $Addr_Match{street} = qr/ (?: # special case for addresses like 100 South Street (?:($Addr_Match{direct})\W+ (?{ $_{street} = $^N }) ($Addr_Mat

Re: can't find a way to display and print pdf through python.

2007-02-13 Thread jim-on-linux
For those who care, the file below should run on a unix/ linux style system. And "xpdf", amoung others, will run a pdf file. import os def Printpdf(): os.system( 'xpdf form.pdf' ) if __name__ == '__main__' : Printpdf() jim-on-linux > On Tue, 13 Feb 2007 08:44:18 GMT, Jussi Salm

barcode generation

2007-02-13 Thread mobiledreamers
Hi I want to generate barcode based on an input which can be numbers or numbers+alphabets. How do I do this? Is there any library that will doo this? thanks mark -- http://mail.python.org/mailman/listinfo/python-list

calling php function from python

2007-02-13 Thread mark
is it possible to call a php function from python and use a class from php in python? i want to use mmslib which creates mms messages and the only implementation is a php mmslib implementation. thanks a lot! mark -- http://mail.python.org/mailman/listinfo/python-list

Please help about an instance var

2007-02-13 Thread JStoneGT
>>> from UserDict import UserDict >>> d = {1:2,3:4,5:6} >>> d1 = UserDict(d) >>> d1 {1: 2, 3: 4, 5: 6} >>> d1.data {1: 2, 3: 4, 5: 6} Here why both d1 and d1.data have the same values?As shown below,they're different types. >>> type(d1) >>> type(d1.data) Please help.Thanks! -- http

Re: Testers please

2007-02-13 Thread Scott David Daniels
Martien Friedeman wrote: > The size of the 'recording' is a major drawback, it was clearly not meant > to record the processing of millions of records. > > I need to find a way to specify the area in the code that needs recording. Use something like zlib and write a compressed log -- especially w

Re: searching a list of lists as a two-dimensional array?

2007-02-13 Thread agent-s
OK I just realized that a list of lists can be accessed in the same way a 2d array would be accessed. Thanks anyways guys. -- http://mail.python.org/mailman/listinfo/python-list

Re: searching a list of lists as a two-dimensional array?

2007-02-13 Thread agent-s
Thanks for the help guys but I'm a newbie at this and from what I understand from the code, it looks like you guys are using a two dimensional array. I am not using a two dimensional array. Basically, it looks like this: [ [' ',' ',' ',' ',' ',' ',' ',' '], [' ',' ',' ',' ',' ',' ',' ',' '], [' ',

Re: pygame and python 2.5

2007-02-13 Thread [EMAIL PROTECTED]
On Feb 13, 2:24 am, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Feb 11, 4:24 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> On Feb 11, 1:35?am, Steve Holden <[EMAIL PROTECTED]> wrote: > [...] > > >>> By the way, on the sci.math newsgrou

Re: Newbie question about Class

2007-02-13 Thread JStoneGT
Thanks a lot.I've got it. En Tue, 13 Feb 2007 13:01:59 -0300, <[EMAIL PROTECTED]> escribió: > But I'm still confused that what's the "real dictionary"?I can't know > this > point.Please help and thanks again. I'm talking about a Python dictionary (a "real" one, as opposed to UserDic

FedEx UN Travel Destinations

2007-02-13 Thread Agent X
UN Spons.ored Southern Vacation Packages http://vacationdestiny.blogspot.com/ @-- d -- http://mail.python.org/mailman/listinfo/python-list

Is python2.5's Tix wrapper broken?

2007-02-13 Thread Ron Provost
I have a piece of software I wrote some time ago using Python and the Tix wrapper. I just upgraded to Python 2.5 and to my surprise my software no longer functions. There's a problem with the Tix wrapper. Under a clean install of Python the following should display an empty root window on th

Re: Fast constant functions for Py2.5's defaultdict()

2007-02-13 Thread Giovanni Bajo
On 13/02/2007 20.01, Raymond Hettinger wrote: > FWIW, here are three ways of writing constant functions for > collections.defaultdict(): > > d = defaultdict(int) # slowest way; works only for zero > d = defaultdict(lambda: 0) # faster way; works for any constant > d = defaultdict(it

Re: Tkinter: how; newbie

2007-02-13 Thread jim-on-linux
On Tuesday 13 February 2007 18:02, Gigs_ wrote: > can someone explain me this code? > > from Tkinter import * > > root = Tk() > > def callback(event): > print "clicked at", event.x, event.y > > frame = Frame(root, width=100, height=100) > frame.bind("", callback) > frame.pack() > > root.mainlo

Re: Comparing lists ...

2007-02-13 Thread Paul Rubin
Loic <[EMAIL PROTECTED]> writes: > I want to design a function to compare lists and return True only if > both lists are equal considering memory location of the list. > I suppose it would be the equivalent of comparing 2 pointers in c++ Use the "is" keyword. print (l1 is l2) print (l0 is l2)

Re: _ssl.pyd is buggy?

2007-02-13 Thread Giles Brown
Something I always found useful is to use the win32traceutil to set up the trace debugging tool. You can then see the output in the pythonwin trace collector tool. This is very useful for Python services and COM servers. Best of luck, Giles -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing lists ...

2007-02-13 Thread James Stroud
Loic wrote: > I would like to know if it is possible, and how to do this with Python: > > I want to design a function to compare lists and return True only if > both lists are equal considering memory location of the list. > I suppose it would be the equivalent of comparing 2 pointers in c++ > >

Re: Tkinter: how; newbie

2007-02-13 Thread Gigs_
Matimus wrote: >> How the callback function get this two number when it has only one >> argument (event)? > > It has one argument, event, which is an instance of a class that has > both x and y attributes. > >> print "clicked at", event.x, event.y > > It doesn't accept the coordinates as separat

Comparing lists ...

2007-02-13 Thread Loic
I would like to know if it is possible, and how to do this with Python: I want to design a function to compare lists and return True only if both lists are equal considering memory location of the list. I suppose it would be the equivalent of comparing 2 pointers in c++ lets call this function c

Re: Tkinter: how; newbie

2007-02-13 Thread Matimus
> How the callback function get this two number when it has only one > argument (event)? It has one argument, event, which is an instance of a class that has both x and y attributes. > print "clicked at", event.x, event.y It doesn't accept the coordinates as separate parameters because every ev

Re: c++ for python programmers

2007-02-13 Thread Sam
On 13 Feb 2007 17:51:00 GMT, Jorgen Grahn <[EMAIL PROTECTED]> wrote: > Well, C++ is a better language than C in many ways. So, if he needs to learn > one of them, why does it have to be C? > > Another reason some people choose C++ over Python for some tasks is that > they feel that larger programs

Re: What does "del" actually do?

2007-02-13 Thread Bruno Desthuilliers
John Nagle a écrit : >The Python "reference manual" says, for "del", "Rather that spelling > it out in full details, here are some hints." That's not too helpful. > >In particular, when "del" is applied to a class object, what happens? > Are all the instance attributes deleted from the o

Re: Testers please

2007-02-13 Thread Martien Friedeman
Thanks Stef! I looked at that area of storing large structures. That would seriously make the whole thing much more complicated. Say you have object 'foo' and it has lots of attributes. If you're only accessing foo.length in the statement 'if foo.length > 12:' why should I store everything ab

Tkinter: how; newbie

2007-02-13 Thread Gigs_
can someone explain me this code? from Tkinter import * root = Tk() def callback(event): print "clicked at", event.x, event.y frame = Frame(root, width=100, height=100) frame.bind("", callback) frame.pack() root.mainloop() well, my problem is at frame.bind(",Button-1>", callback) callba

Re: _ssl.pyd is buggy?

2007-02-13 Thread Larry Bates
Laszlo Nagy wrote: > > Hello, > > I wrote a small program that uses xmlrpc over https. It should work as a > win32 application and as a win32 service too. There is a file called > Processor.py that contains the main thread of the program. It is called > from two files: win32_Application.py and

Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > (snip) > - is there a better way than using multiple inheritance to plug-in > dynamically commands in a Cmd command line? Yes : use composition + delegation. Python makes it easy: #foo.py class Commands(object): def do_this(self,args): ...

RE: Testers please

2007-02-13 Thread Sells, Fred
cool product, I'll test depending on schedule at the time. one (more) suggestion (from those of us who arn't doing the work ;) is to put this in eclipse, rather than apache, since many developers work with it. Please no IDE wars, I like emacs too, but when I'm trying to teach to newbies I use elci

Re: Undo os.remove

2007-02-13 Thread Ben Finney
[EMAIL PROTECTED] writes: > Hi. I just used os.remove to get rid of some files -- > unfortunately, I realized afterward that I didn't really want to get > rid of them. It isn't life-or-death, here, but is there any way for > me to get these files back? Since 'os.remove' delegates the actual rem

Re: Scripting Visio using Python

2007-02-13 Thread Marcel
On Feb 13, 6:52 pm, Paul Watson <[EMAIL PROTECTED]> wrote: > I would like to create some additional shapes in Microsoft Visio using > the Python language. It would appear that Visio can use any CLR > language. Has anyone done this? Can I use the Python package from > python.org, or must I use Ir

Re: Testers please

2007-02-13 Thread Martien Friedeman
Thanks for getting involved. And kind remarks. The labeling of 'false' and 'true' is just for shortness sake. The condition itself could be quite a mess and span several lines. You mentioned that. The only reason I like to display it, is to show whether a block of coding, the colored bit, is perfo

Re: Undo os.remove

2007-02-13 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Hi. I just used os.remove to get rid of some files -- unfortunately, > I realized afterward that I didn't really want to get rid of them. It > isn't life-or-death, here, but is there any way for me to get these > files back? Try a websearch for file recovery utilities

Undo os.remove

2007-02-13 Thread chris . peressotti
Hi. I just used os.remove to get rid of some files -- unfortunately, I realized afterward that I didn't really want to get rid of them. It isn't life-or-death, here, but is there any way for me to get these files back? - Chris -- http://mail.python.org/mailman/listinfo/python-list

Click event with python

2007-02-13 Thread Otacon22
I am creating an alternative mouse device(like wiimote), i use Xlib to move mouse, but now I need also to create the right and left click event, I can use already Xlib or there is another library that make it? It is possibile beacuse the wiimote code click also(I tryed to understand that code but i

Re: New Pythin user looking foe some good examples to study

2007-02-13 Thread Wensui Liu
yeah! i also think cookbook is easy to read and code is very practical. On 2/12/07, Larry Bates <[EMAIL PROTECTED]> wrote: > Johnny Garcia wrote: > > I have just discovered Python and am familiarizing myself with the syntax > > but I have always found that code examples where the best way for me t

Re: New Pythin user looking foe some good examples to study

2007-02-13 Thread cyberco
http://www.daniweb.com/code/python.html http://www.pythonchallenge.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: _ssl.pyd is buggy?

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 16:49:10 -0300, Laszlo Nagy <[EMAIL PROTECTED]> escribió: >> Services usually run under the LOCAL_SERVICE account, which is rather >> limited on what it is allowed to do (It has no access to network shares, >> by example). Perhaps this is afecting your program. >> > I'm sorry

Re: _ssl.pyd is buggy?

2007-02-13 Thread Laszlo Nagy
> Services usually run under the LOCAL_SERVICE account, which is rather > limited on what it is allowed to do (It has no access to network shares, > by example). Perhaps this is afecting your program. > I'm sorry, it is not. My service only uses the standard output, writes into different f

Fast constant functions for Py2.5's defaultdict()

2007-02-13 Thread Raymond Hettinger
FWIW, here are three ways of writing constant functions for collections.defaultdict(): d = defaultdict(int) # slowest way; works only for zero d = defaultdict(lambda: 0) # faster way; works for any constant d = defaultdict(itertools.repeat(0).next)# fastest way; works for any con

Re: _ssl.pyd is buggy?

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 14:40:20 -0300, Laszlo Nagy <[EMAIL PROTECTED]> escribió: > I just installed Python 2.5 and now I do not get the error message in > the event log. But the service still cannot be stopped and does not log > anything. I'm using the logging module and RotatingFileHandler, so the

Re: Segmentation faults using threads

2007-02-13 Thread Mathias
PS: setting sys.setcheckinterval(1) reduces the probablilty of a failure as well, but definetely at a performance cost. -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex highlight html

2007-02-13 Thread NOSPAM plz
Gabriel Genellina skrev: > En Tue, 13 Feb 2007 10:13:26 -0300, NOSPAM plz <[EMAIL PROTECTED]> > escribió: > > >> I want to write a function that highlights html code. >> > > Well, it's already done, you have Pygments http://pygments.pocoo.org/ > and SilverCity http://silvercity.sourceforg

Re: Segmentation faults using threads

2007-02-13 Thread Mathias
John Nagle wrote: > Daniel Nogradi wrote: >>> I use the thread module (not threading) for a client/server app where I >>> distribute large amounts of pickled data over ssh tunnels. > > What module are you using for SSH? > > What's in your program that isn't pure Python? > The problem is p

Re: Segmentation faults using threads

2007-02-13 Thread John Nagle
Daniel Nogradi wrote: >> I use the thread module (not threading) for a client/server app where I >> distribute large amounts of pickled data over ssh tunnels. What module are you using for SSH? What's in your program that isn't pure Python? The problem is probably in some non-Python com

Re: Segmentation faults using threads

2007-02-13 Thread Mathias
> Hi, it would be helpful if you posted a minimalistic code snippet > which showed the problem you describe. > > Daniel I wish I could! If I knew exactly where the effect takes place I could probably circumvent it. All I know know is that it happens under high load and with a lot of waitstates

Re: can't find a way to display and print pdf through python.

2007-02-13 Thread Jussi Salmela
Dennis Lee Bieber kirjoitti: > On Tue, 13 Feb 2007 08:44:18 GMT, Jussi Salmela > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >> On Windows, this (where fileName is xyz.PDF, for example): >> webbrowser.open(r'file://' + fileName) >> starts Acrobat Reader with the docu

Re: Download parts not whole file in ones

2007-02-13 Thread Jordan
On Feb 13, 12:51 pm, "Jordan" <[EMAIL PROTECTED]> wrote: > On Feb 13, 8:09 am, NOSPAM plz <[EMAIL PROTECTED]> wrote: > > > > > Hey, > > > My problem is, is it possible to download parts of a file while. i think > > is it is called threading > > > My code thats download the whole webpage, and stunds

Scripting Visio using Python

2007-02-13 Thread Paul Watson
I would like to create some additional shapes in Microsoft Visio using the Python language. It would appear that Visio can use any CLR language. Has anyone done this? Can I use the Python package from python.org, or must I use IronPython? -- http://mail.python.org/mailman/listinfo/python-lis

Re: Download parts not whole file in ones

2007-02-13 Thread Jordan
On Feb 13, 8:09 am, NOSPAM plz <[EMAIL PROTECTED]> wrote: > Hey, > > My problem is, is it possible to download parts of a file while. i think > is it is called threading > > My code thats download the whole webpage, and stunds the app while is is > downloading: > > ---CODE--- > impo

Re: c++ for python programmers

2007-02-13 Thread Jorgen Grahn
On Mon, 12 Feb 2007 19:10:02 +0100, Maël Benjamin Mettler <[EMAIL PROTECTED]> wrote: > Thomas Nelson schrieb: [top posting fixed] >> I realize I'm approaching this backwards from the direction most >> people go, but does anyone know of a good c/c++ introduction for >> python programmers? > Lear

Re: Segmentation faults using threads

2007-02-13 Thread Daniel Nogradi
> I use the thread module (not threading) for a client/server app where I > distribute large amounts of pickled data over ssh tunnels. > Now I get regular Segmentation Faults during high load episodes. I use a > semaphore to have pickle/unpickle run nonthreaded, but I still get > frequent nondeterm

Re: _ssl.pyd is buggy?

2007-02-13 Thread Laszlo Nagy
> I was using _ssl.pyd to upload files to DAV server over ssl and > found it to be a problem. I upgraded to Python 2.5 and the problem > was fixed. I don't know if it is the same problem that is affecting > you, but I couldn't get it to work on 2.4. > > FYI, Larry > I just installed Python 2

Re: Testers please

2007-02-13 Thread azrael
it would be nice when someone would paste some instructions or tutorial how to bound it all together. where to paste the file. a dummy tutorial if possible. -- http://mail.python.org/mailman/listinfo/python-list

Re: c++ for python programmers

2007-02-13 Thread Jorgen Grahn
On Tue, 13 Feb 2007 06:35:36 +1100, andrew clarke <[EMAIL PROTECTED]> wrote: > On Mon, Feb 12, 2007 at 10:00:51AM -0800, Thomas Nelson wrote: > >> I realize I'm approaching this backwards from the direction most >> people go, but does anyone know of a good c/c++ introduction for >> python programme

Re: Newbie question about Class

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 13:01:59 -0300, <[EMAIL PROTECTED]> escribió: > But I'm still confused that what's the "real dictionary"?I can't know > this > point.Please help and thanks again. I'm talking about a Python dictionary (a "real" one, as opposed to UserDict, which is a "fake" dictionary; i

Re: Freeze packaging for Debian

2007-02-13 Thread Paul Boddie
On 13 Feb, 16:48, [EMAIL PROTECTED] (Cameron Laird) wrote: > How is Freeze--freeze.py http://wiki.python.org/moin/Freeze>--packaged > for Debian? *Is* it packaged for Debian? A search for freeze.py in package contents conducted from the Debian packages page [1] indicates that the file in question

Re: Regex highlight html

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 10:13:26 -0300, NOSPAM plz <[EMAIL PROTECTED]> escribió: > I want to write a function that highlights html code. Well, it's already done, you have Pygments http://pygments.pocoo.org/ and SilverCity http://silvercity.sourceforge.net/ > I have read the wiki page > http://en

Re: _ssl.pyd is buggy?

2007-02-13 Thread Larry Bates
Laszlo Nagy wrote: > > Hello, > > I wrote a small program that uses xmlrpc over https. It should work as a > win32 application and as a win32 service too. There is a file called > Processor.py that contains the main thread of the program. It is called > from two files: win32_Application.py and

Re: can't find a way to display and print pdf through python.

2007-02-13 Thread jim-on-linux
I'm using Suse Linux which has five program that will open a pdf file from a shell command line. Acrobat Reader is one of the five. A right button click on the file should give a list of programs that will open a PDF file. Im using a KDE desktop Open a shell, add the path to the directory

Freeze packaging for Debian

2007-02-13 Thread Cameron Laird
How is Freeze--freeze.py http://wiki.python.org/moin/Freeze >--packaged for Debian? *Is* it packaged for Debian? -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread massimo s.
On 13 Feb, 12:46, Peter Otten <[EMAIL PROTECTED]> wrote: > Well, what problems ocurring with > > class A: pass > class B: pass > class C(A, B): pass > > could be avoided by writing > > class A: pass > class B(A): pass > class C(B): pass > > instead? Classes have to be designed for subclassing, so e

Re: Newbie question about Class

2007-02-13 Thread JStoneGT
[quote]The idea behind that class is to act "as-if" it were a real dictionary. Dicts have an update method, and UserDict should too. But it's not listed in the book (should appear a few lines below that code); this is a possible implementation: def update(self, other): for key in ot

Re: Newbie question about Class

2007-02-13 Thread Gabriel Genellina
En Tue, 13 Feb 2007 03:56:21 -0300, <[EMAIL PROTECTED]> escribió: > I'm reading the book of "Dive into Python" and got these code pieces: > class UserDict: > def __init__(self, dict=None): self.data = {} > if dict is not None: self.update(dict) > My question is,for the statement of:

Re: float print formatting

2007-02-13 Thread hg
Grant Edwards wrote: > On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 > ^^ > That's the specifierfor how many total columns you want to use > (including the decimal point

Re: Mulig SPAM: float print formatting

2007-02-13 Thread Grant Edwards
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > NOSPAM plz wrote: >>> Considering the float 0.0, I would like to print 00.00. >>> >>> I tried '%02.02f' % 0.0 ... but I get 0.00 >> Try this: >> >> a = 45.45 # the floating number >> >> print "some text", >> print a, >> print "some text again" > S

Re: float print formatting

2007-02-13 Thread Grant Edwards
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > Hi, > > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 ^^ That's the specifierfor how many total columns you want to use (including the decimal point and all digits to either side). >

Re: can't find a way to display and print pdf through python.

2007-02-13 Thread Antoon Pardon
On 2007-02-11, krishnakant Mane <[EMAIL PROTECTED]> wrote: > hello all, > I am stuck with a strange requirement. > I need a library that can help me display a pdf file as a report and > also want a way to print the same pdf file in a platform independent > way. > if that's not possible then I at le

Re: float print formatting

2007-02-13 Thread hg
Neil Cerutti wrote: > The eighth-graders will be presenting Shakespeare's Hamlet in the church > basement on Friday at 7 p.m. The congregation is invited to attend this > tragedy. --Church Bulletin Blooper ;-) I like that ! hg -- http://mail.python.org/mailman/listinfo/python-list

Re: float print formatting

2007-02-13 Thread Neil Cerutti
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: > >> On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> Considering the float 0.0, I would like to print 00.00. >>> >>> I tried '%02.02f' % 0.0 ... but I get 0.00 >>> >>> Any clue ? >> >> Yes. How wide (total) is "0.00",

Re: can't find a way to display and print pdf through python.

2007-02-13 Thread XBello
On Feb 12, 4:56 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > krishnakant Mane wrote: > > hello all, > > I am stuck with a strange requirement. > > I need a library that can help me display a pdf file as a report and > > also want a way to print the same pdf file in a platform independent > > way. >

_ssl.pyd is buggy?

2007-02-13 Thread Laszlo Nagy
Hello, I wrote a small program that uses xmlrpc over https. It should work as a win32 application and as a win32 service too. There is a file called Processor.py that contains the main thread of the program. It is called from two files: win32_Application.py and win32_Service.py. The applic

Re: float print formatting

2007-02-13 Thread hg
Peter Otten wrote: > hg wrote: > >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 >> >> Any clue ? > > The first integer specifies the total width: > "%05.2f" % 0 > '00.00' > > Peter Many thanks ! hg -- http://mail.python.or

Re: Newbie Question

2007-02-13 Thread Uwe Grauer
Stef Mientki wrote: > [EMAIL PROTECTED] wrote: >> On 9 fév, 14:06, Stef Mientki <[EMAIL PROTECTED]> wrote: > will explain the rest Delphi is a (dying) proprietary, MS-Windows-only[1] software relying on a low-level language. >>> Well it may be dying, >>> but for the moment it beats Py

Segmentation faults using threads

2007-02-13 Thread Mathias
Dear ng, I use the thread module (not threading) for a client/server app where I distribute large amounts of pickled data over ssh tunnels. Now I get regular Segmentation Faults during high load episodes. I use a semaphore to have pickle/unpickle run nonthreaded, but I still get frequent nondet

Re: float print formatting

2007-02-13 Thread Peter Otten
hg wrote: > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 > > Any clue ? The first integer specifies the total width: >>> "%05.2f" % 0 '00.00' Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Mulig SPAM: float print formatting

2007-02-13 Thread hg
NOSPAM plz wrote: > hg skrev: >> Hi, >> >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 >> >> Any clue ? >> >> Thanks, >> >> hg >> >> > Try this: > > a = 45.45 # the floating number > > print "some text", > print a, > print "some tex

Re: float print formatting

2007-02-13 Thread hg
Neil Cerutti wrote: > On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Considering the float 0.0, I would like to print 00.00. >> >> I tried '%02.02f' % 0.0 ... but I get 0.00 >> >> Any clue ? > > Yes. How wide (total) is "0.00", compared to "00.00"? > > -- > Neil Cerutti I do not get

Re: float print formatting

2007-02-13 Thread Neil Cerutti
On 2007-02-13, hg <[EMAIL PROTECTED]> wrote: > Hi, > > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 > > Any clue ? Yes. How wide (total) is "0.00", compared to "00.00"? -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-li

Re: Mulig SPAM: float print formatting

2007-02-13 Thread NOSPAM plz
hg skrev: > Hi, > > Considering the float 0.0, I would like to print 00.00. > > I tried '%02.02f' % 0.0 ... but I get 0.00 > > Any clue ? > > Thanks, > > hg > > Try this: a = 45.45 # the floating number print "some text", print a, print "some text again" or just this: print "some text", prin

  1   2   >