Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread Peter Otten
[EMAIL PROTECTED] wrote: Thanks both for suggestions. I still think that using inheritance is somehow cleanest in this case (I always hear the mantra avoid multiple inheritance!, but this is one of the cases it seems to make a lot of sense to me), but it's nice food for thought/code anyway.

Re: pygame and python 2.5

2007-02-13 Thread Steve Holden
[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 newsgroup I promote Python every chance I get. One fellow thanked me profusely for

Re: Testers please

2007-02-13 Thread stef
martien friedeman wrote: I have written this tool that allows you to look at runtime data and code at the same time. And now I need people to test it. The easiest way to see what I mean is to look at some videos: http://codeinvestigator.googlepages.com/codeinvestigator_videos It requires

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

2007-02-13 Thread Jussi Salmela
Grant Edwards kirjoitti: On 2007-02-12, Larry Bates [EMAIL PROTECTED] wrote: Grant Edwards wrote: On 2007-02-12, Larry Bates [EMAIL PROTECTED] wrote: On 2007-02-12, Larry Bates [EMAIL PROTECTED] wrote: I at least need the code for useing some library for connecting to acrobat reader and

Templates for epydoc

2007-02-13 Thread [EMAIL PROTECTED]
Hello, I am looking for a good css template to be used with epydoc . Google did not help. Any links would be helpful. - Suresh -- http://mail.python.org/mailman/listinfo/python-list

hi all

2007-02-13 Thread Sandeep Patil , Bangalore
I get an error while I try to call python through VB. The error is Error 429: Active X cant create object Pls anybody help me to call python through VB. Thanks and Regards. Sandeep Patil HCL Technologies Expecting the world to treat you fairly coz you are a gud person, is like

Re: WindowsNT user authentication

2007-02-13 Thread billie
On 12 Feb, 16:53, Tim Golden [EMAIL PROTECTED] wrote: billie wrote: Do you got any idea about how getting user's home directory? The answer to that is unfortunately slightly complicated, because Windows has no such thing as a user's home directory or, if you prefer, it has several such

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

2007-02-13 Thread Hendrik van Rooyen
John Machin [EMAIL PROTECTED] wrote: Now for the algorithm: all of that testing to see if you are about to sail off the end of the world is a bit ugly and slow. You can use bit- bashing, as Paul suggested, even though it's on Steven D'Aprano's list of 6 deadly sins :-) Thou shallt not bit

Re: Tkinter and Tile

2007-02-13 Thread Hendrik van Rooyen
Eric Brunel [EMAIL PROTECTED] wrote: FYI, changes done in tcl/tk are usually quite rapidly integrated in Tkinter. For example, for the panedwindow widget, introduced in tk8.4 (first version out in the end of 2002), a Tkinter wrapper was available in Python 2.3 (first version out mid-2003). So I

Re: Help with Optimization of Python software: real-time audiocontroller

2007-02-13 Thread Hendrik van Rooyen
Jean-Paul Calderone [EMAIL PROTECTED] wrote: Yep. There are even some existing Python applications which deal with sound and manage to work with ~20ms samples. I agree. Python is not *that* slow... I have written serial port communications that send and catch one character at a time (raw,

Re: how to compare...

2007-02-13 Thread Gerard Flanagan
On Feb 13, 5:03 am, jairodsl [EMAIL PROTECTED] wrote: Hello everybody ! I have two list, they are, S1=['A','B','C','D','E'], and S2=['F','G','H','I','J'], but i have to compare both in this way: A vs J A vs I, B vs J A vs H, B vs I, C

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

2007-02-13 Thread John Machin
On Feb 13, 4:57 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote: John Machin [EMAIL PROTECTED] wrote: Now for the algorithm: all of that testing to see if you are about to sail off the end of the world is a bit ugly and slow. You can use bit- bashing, as Paul suggested, even though it's on

Announcing Elixir!

2007-02-13 Thread Jonathan LaCour
Today, we are pleased to announce the release of Elixir (http://elixir.ematia.de), a declarative mapper for SQLAlchemy. Elixir is the successor to ActiveMapper and TurboEntity, and is a collaboration between Daniel Haus, Jonathan LaCour and Gaëtan de Menten. Elixir's website provides

Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread devicerandom
On 13 Feb, 09:14, Peter Otten [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Thanks both for suggestions. I still think that using inheritance is somehow cleanest in this case (I always hear the mantra avoid multiple inheritance!, but this is one of the cases it seems to make a lot of

Re: c++ for python programmers

2007-02-13 Thread Nicola Musatti
On Feb 12, 7:00 pm, Thomas Nelson [EMAIL PROTECTED] 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 programmers? I don't think there's any book catering specifically for people coming from

Re: Newbie Question

2007-02-13 Thread [EMAIL PROTECTED]
On 12 fév, 15:59, Stef Mientki [EMAIL PROTECTED] 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

Re: Testers please

2007-02-13 Thread fridrikm
On Feb 13, 1:38 am, martien friedeman [EMAIL PROTECTED] wrote: I have written this tool that allows you to look at runtime data and code at the same time. And now I need people to test it. The easiest way to see what I mean is to look at some

Re: favourite editor

2007-02-13 Thread PyScripter
A beta version of PyScripter with remote debugging is actually out. See http://pyscripter.googlepages.com/ and http:// pyscripter.googlepages.com/remotepythonengines for details. Ο/Η Stef Mientki έγραψε: azrael wrote: I expirienced some big craches. tra running some aplication vith using

Re: Vim scripting with python

2007-02-13 Thread [EMAIL PROTECTED]
J. Clifford Dyer wrote: Stuart D. Gathman wrote: On Sat, 03 Feb 2007 05:02:54 -0800, Tool69 wrote: Does anyone have any advice, and more genraly how to script Vim with Python ? :py import sys :py print sys.version :help :py I know I can put some python functions inside my

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

2007-02-13 Thread peter
On Feb 13, 7:44 pm, Jussi Salmela [EMAIL PROTECTED] wrote: Grant Edwards kirjoitti: On 2007-02-12, Larry Bates [EMAIL PROTECTED] wrote: Grant Edwards wrote: On 2007-02-12, Larry Bates [EMAIL PROTECTED] wrote: On 2007-02-12, Larry Bates [EMAIL PROTECTED] wrote: I at least need the code

Re: c++ for python programmers

2007-02-13 Thread Neil Cerutti
On 2007-02-12, Thomas Nelson [EMAIL PROTECTED] 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 programmers? To become productive in C++ in a short time, especially with a Python background, I highly

Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread Peter Otten
[EMAIL PROTECTED] wrote: On 13 Feb, 09:14, Peter Otten [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Thanks both for suggestions. I still think that using inheritance is somehow cleanest in this case (I always hear the mantra avoid multiple inheritance!, but this is one of the cases

Re: how to compare...

2007-02-13 Thread jairodsl
On Feb 13, 4:30 am, Gerard Flanagan [EMAIL PROTECTED] wrote: On Feb 13, 5:03 am, jairodsl [EMAIL PROTECTED] wrote: Hello everybody ! I have two list, they are, S1=['A','B','C','D','E'], and S2=['F','G','H','I','J'], but i have to compare both in this way: A vs J

Re: multiple inheritance of a dynamic list of classes?

2007-02-13 Thread Neil Cerutti
On 2007-02-13, 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? With multiple inheritance, the choice of algorithm for Method

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

2007-02-13 Thread Hendrik van Rooyen
John Machin [EMAIL PROTECTED] wrote: On Feb 13, 4:57 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote: John Machin [EMAIL PROTECTED] wrote: Now for the algorithm: all of that testing to see if you are about to sail off the end of the world is a bit ugly and slow. You can use bit-

Download parts not whole file in ones

2007-02-13 Thread NOSPAM plz
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--- import urllib # the heavy file to download f =

Regex highlight html

2007-02-13 Thread NOSPAM plz
Hey, I want to write a function that highlights html code. I have read the wiki page http://en.wikipedia.org/wiki/Regular_expressions just like this: img scr=test.png alt=test pic height=100 width=100 a href=#test/a to this: img scr=test.png alt=test pic height=100 width=100 a href=#test/a

Lazy container

2007-02-13 Thread Cristiano Paris
Hi everyone, I'm trying to write a Container which should mimic a list. Basically, the container pulls items on the fly from an unspecified source through a function and returns an instance of a given class over the pulled item. That is: class lazy(object): def __getitem__(self,index):

Re: Regex highlight html

2007-02-13 Thread NOSPAM plz
Hey, I want to write a function that highlights html code. I have read the wiki page http://en.wikipedia.org/wiki/Regular_expressions just like this: img scr="test.png" alt="test pic" height="100" width="100" a href=""test/a to this: img scr="test.png" alt="test pic" height="100"

Re: favourite editor

2007-02-13 Thread aspineux
I'm very happy with eclipse and its python module called pydev. It's a little slow because it parse continuously the code (P4 2.0Ghz required), but give nice realtime info by underlining syntax error or unknown variable (very very useful when miss spelling a variable or a function :-) On 11

Re: Lazy container

2007-02-13 Thread Duncan Booth
Cristiano Paris [EMAIL PROTECTED] wrote: May be someone has faced this problem before and came up with some obscure language feature to solve this elegantly :D Yes. Try using weak references. Specifically a weakref.WeakValueDictionary should meet your needs. --

Re: Lazy container

2007-02-13 Thread Cristiano Paris
Duncan Booth wrote: ... Yes. Try using weak references. Specifically a weakref.WeakValueDictionary should meet your needs. :D Thank you. Cristiano -- http://mail.python.org/mailman/listinfo/python-list

Re: Lazy container

2007-02-13 Thread Peter Otten
Cristiano Paris wrote: I'm trying to write a Container which should mimic a list. Basically, the container pulls items on the fly from an unspecified source through a function and returns an instance of a given class over the pulled item. That is: class lazy(object): def

Re: favourite editor

2007-02-13 Thread dimitri pater
You could try SPE, but that's really unstable, and no help manual to read ;-) But, there is a tutorial on SPE here: www.serpia.org/spe regards, Dimitri -- --- You can't have everything. Where would you put it? -- Steven Wright --- please visit www.serpia.org --

float print formatting

2007-02-13 Thread hg
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 -- http://mail.python.org/mailman/listinfo/python-list

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, print 45.45, print

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

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 it s = '%02.02f' % 0.0

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 text again or just this: print

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

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

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 Python with a factor of

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

_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

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. if that's

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, compared to 00.00? -- Neil

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

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). Any

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 Sorry, must be very slow or

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 and all digits

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

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

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

Freeze packaging for Debian

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

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

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

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

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; it looks

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

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: _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.5 and

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

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? Learning C++

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

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

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 the app while is

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

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 I

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

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

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.sourceforge.net/

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

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

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

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, it is

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

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

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

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,

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

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

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

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

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

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(Button-1, callback) frame.pack() root.mainloop() well, my problem is at frame.bind(,Button-1, callback)

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

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 object? It

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

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

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

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

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 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: 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(Button-1, callback) frame.pack() root.mainloop() if

  1   2   >