Re: proposed proposal: set.values()

2006-03-31 Thread Paul Rubin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > > Nobody says you shouldn't use list(s) if you know you're dealing with > > a set. The idea of s.values() is so you can duck-type between dicts > > and sets. > > if y is a dict, "x in y" looks for a matching key, not for a > matching value. Good poin

Re: Doc suggestions (was: Why "class exceptions" are not deprecated?)

2006-03-31 Thread Fredrik Lundh
> 1) dear lazyweb/lazynet: does anyone have some time to spare on figuring > out how to log into infogami from a simple python script. standard library > only, preferrably. nevermind. the hack that didn't work yesterday did did work today. must have been a bad cookie day. -- http://mail.

Re: New Python website, new documentation ?

2006-03-31 Thread Tim Parkin
John J. Lee wrote: > > How about the desktop icon used on Windows boxes? Will we see the shy > tadpoles replacing the squiggly green pixellated Python snake in 2.5? > If not, why not? -- is this not a branding excercise? (I don't > personally like the tadpoles, FWLIW, but inconsistency seems wor

Re: How to debug python code?

2006-03-31 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > hi, >I am new to Python programming.I am not getting exactly pdb.Can > anyone tell me effective way to debug python code? (automated) unit tests + print statements + the interactive shell are usually enough. I almost never used pdb in 5+ years of Python programm

Re: Best IDE for Python?

2006-03-31 Thread bruno at modulix
Fredrik Lundh wrote: > Dennis Lee Bieber wrote: > > >>> I want to know which is the best IDE for python.Please if >>>possible mention the features of the IDE. >> >>The best IDE is the one that YOU can be most productive in. What /I/ >>find useful may not be of interest to /you/. > > > nons

Re: Best IDE for Python?

2006-03-31 Thread Fredrik Lundh
bruno wrote: > Nonsense ! *Ed* is the the standard editor ! > > http://www.gnu.org/fun/jokes/ed.msg.html unless you're on Windows, where edlin is the true standard editor. as you can see, Microsoft's usability team has made some massive improvements (note how well it deals with the "eat flaming

Re: Doc suggestions (was: Why "class exceptions" are not deprecated?)

2006-03-31 Thread Ed Singleton
On 30 Mar 2006 16:30:24 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "Fredrik Lundh" wrote: > > [EMAIL PROTECTED] wrote > > > write a tutorial as good as what is already there. But what I can > > > do is report problems I find when using it, and make suggestions > > > about how to avoid

Re: any() and all() on empty list?

2006-03-31 Thread Antoon Pardon
Op 2006-03-30, Paul McGuire schreef <[EMAIL PROTECTED]>: > > "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Op 2006-03-30, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >> >> > So, these flying elephants -- are they pink or not? >> >> They are both. >> > > That woul

Re: Why are so many built-in types inheritable?

2006-03-31 Thread Antoon Pardon
Op 2006-03-31, Georg Brandl schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2006-03-30, Michele Simionato schreef <[EMAIL PROTECTED]>: >>> I cannot find the reference now, but I remember Tim Peters saying some >>> time ago that the only >>> reason why FunctionType is not subclassable is t

Re: Best IDE for Python?

2006-03-31 Thread Duncan Booth
Fredrik Lundh wrote: > as you can see, Microsoft's usability team has made some massive > improvements (note how well it deals with the "eat flaming death" > command): I especially like the way running it messes up the prompt: C:\Documents and Settings\Duncan>edlin File name must be specified C

Can I control Video Card by using Python under linux?

2006-03-31 Thread LUK
Hi, I have a video card based on cx2388 chip to catch video and do the other thing. There's already a V4L2 driver for it, but it is too hard for me to program in C. Can I use Python do the job? Does Python has simpler APIs? Please gvie me some suggestion. Thanks! -- http://mail.python.org/mailman

Re: C++ and Python

2006-03-31 Thread Roman Yakovenko
On 30 Mar 2006 23:01:21 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I've been learning to write VST plugins in C++ and would like to switch > back to Python. The first step of writing the plugin is to import the > C++ header files from the Steinberg SDK. How can I do this in Python. > I

[ANN] pycdio 0.11

2006-03-31 Thread R. Bernstein
pycdio is an OO Python interface to libcdio. The libcdio package contains a library for CD-ROM and CD image access. Applications wishing to be oblivious of the OS- and device-dependent properties of a CD-ROM or of the specific details of various CD-image formats may benefit from using this library

Re: Why are so many built-in types inheritable?

2006-03-31 Thread Georg Brandl
Antoon Pardon wrote: > Well that looks somewhat short sighted to me. It is also why python > seems to throws so many surprises at people. > > My impression is that quite frequently people come here with a question > about why something doesn't work, that normally could be expected to > work. > T

Re: How to debug python code?

2006-03-31 Thread Ravi Teja
1.) Print statements 2.) IDEs Most Python IDEs provide visual debuggers so that you don't have to use command line ones such as pdb. As with all languages that allow to be executated as a script as well, print statements usually get the job done quite well in most cases. Please read the Python F

CGIHTTPServer threading problems

2006-03-31 Thread Alvin A. Delagon
I'm a simple python webserver based on CGIHTTPServer module: import CGIHTTPServer import BaseHTTPServer import SocketServer import sys import SQL,network from config import * class ThreadingServer(SocketServer.ThreadingMixIn,BaseHTTPServer.HTTPServer): pass cfg = params() print "XBOX Server

Re: any() and all() on empty list?

2006-03-31 Thread Ant
I don't think that there will be any valid examples. all(list) simply means "every element of the list evaluates to True". This is trivially true in the case of the empty list. This is logically equivalent to "There are no elements in the list which evaluate to False". any(list) simply means "at

Copy files

2006-03-31 Thread ChengGong
How can I copy a file from one folder to another(subfolder) without change and property. I work on zope. -- http://mail.python.org/mailman/listinfo/python-list

Re: Connecting to gnuplot with Popen?

2006-03-31 Thread Anton81
> Hi Anton, > > here is a little snippet using os.popen: Unfortunately I'm having more problem getting the output from Gnuplot, which I'd like to examine for error messages and settings of options. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: proposed proposal: set.values()

2006-03-31 Thread http://phr.cx
"Terry Reedy" <[EMAIL PROTECTED]> writes: > 1. It is pure duplication that *adds* keystrokes. > Nobody says you shouldn't use list(s) if you know you're dealing with a set. The idea of s.values() is so you can duck-type between dicts and sets. > 2. It copies the wrong aspect of dict. A set is l

Re: Best IDE for Python?

2006-03-31 Thread bruno at modulix
Duncan Booth wrote: > Fredrik Lundh wrote: > > >>as you can see, Microsoft's usability team has made some massive >>improvements (note how well it deals with the "eat flaming death" >>command): > > > I especially like the way running it messes up the prompt: > > C:\Documents and Settings\Dunca

Re: ldap usage

2006-03-31 Thread Michael Ströder
Jed Parsons wrote: > >> Which LDAP server are you using? You can switch off this behaviour >> with OpenLDAP. See man 5 slapd.conf, allow . > > I don't have anything other than user access. Good to know about this > feature, though. In case you're programming for different LDAP servers it's good

Re: Why are so many built-in types inheritable?

2006-03-31 Thread Antoon Pardon
Op 2006-03-31, Georg Brandl schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Well that looks somewhat short sighted to me. It is also why python >> seems to throws so many surprises at people. >> >> My impression is that quite frequently people come here with a question >> about why someth

Re: Connecting to gnuplot with Popen?

2006-03-31 Thread Laurent Pointal
Anton81 a écrit : > Hi, > > it seems to be a FAQ, but I still haven't found a solution. I want to > control gnuplot with a python program. The following at least gives me the > gnuplot output: Unless you absolutely need to write your own code, you should try: http://gnuplot-py.sourceforge.net/ A

Re: Why are so many built-in types inheritable?

2006-03-31 Thread Georg Brandl
Antoon Pardon wrote: > Op 2006-03-31, Georg Brandl schreef <[EMAIL PROTECTED]>: >> Antoon Pardon wrote: >> >>> Well that looks somewhat short sighted to me. It is also why python >>> seems to throws so many surprises at people. >>> >>> My impression is that quite frequently people come here with a

............這些您極可能不知道..........

2006-03-31 Thread
您辛苦了,休息一下,聽幾首歌好嗎? http://kuso.cc/qWo http://kuso.cc/vMt http://jschang.myweb.hinet.net/dontforget.wma http://jschang.myweb.hinet.net/ueyes.wma 一、請問: 美國諾貝爾獎得主大部分是哈佛大學畢業的嗎?不是! 那大部分是麻省理工畢業的?不是! 還是大多為耶魯大學畢業生?不是! 請注意,歷年來美國諾貝爾獎得主最少來自於六十個不同的大學! 也就是說,美國最少有六十所不同大學的畢業生或教授得過諾貝爾獎! 各位若不相信,可以去調查統計看看。 英國?德國?法

Re: How to debug python code?

2006-03-31 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > hi, >I am new to Python programming.I am not getting exactly pdb.Can > anyone tell me effective way to debug python code? I too rely mostly on unit tests and print statements for debugging, but occasionally I use winpdb which is a pretty nice GUI debugger. http

Re: Why are so many built-in types inheritable?

2006-03-31 Thread Antoon Pardon
Op 2006-03-31, Georg Brandl schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2006-03-31, Georg Brandl schreef <[EMAIL PROTECTED]>: >>> Antoon Pardon wrote: >>> >>> If he/she's not able to do one of these, he/she can at least convince some >>> other Python developer if the use case is stron

How to search HUGE XML with DOM?

2006-03-31 Thread Sullivan WxPyQtKinter
a relation database has admiring search efficiency when the database is very big (several thousands or tens of thousands of records). But my current project is based on XML, for its tree-like data structure has much more flexibility; and DOM, which could be manipulated just like a tree. However, ho

Working with files in a SimpleXMLRPCServver

2006-03-31 Thread Jose Carlos Balderas Alberico
I'm setting up a server accepting XML-RPC calls using the SimpleXMLRPCServer class. Basically, what I have to do is send a zip-compressed file to the server, have the server unzip it and process it, after processing it the server is supposed to zip the file again, and send it back to the client.  

Re: How to search HUGE XML with DOM?

2006-03-31 Thread Diez B. Roggisch
> the xml.dom.minidom object is too slow when parsing such a big XML file > to a DOM object. while pulldom should spend quite a long time going > through the whole database file. How to enhance the searching speed? > Are there existing solution or algorithm? Thank you for your > suggetion... I've

Re: How to search HUGE XML with DOM?

2006-03-31 Thread bruno at modulix
Sullivan WxPyQtKinter wrote: > a relation database has admiring search efficiency when the database is > very big (several thousands or tens of thousands of records). But my > current project is based on XML, for its tree-like data structure has > much more flexibility; and DOM, which could be mani

invalid syntax - problems with CR (0x0a)

2006-03-31 Thread cesare
hi, i'm very new to python and am experiencing the following problem: an identical program that runs on certain computers crashes on other machines due to Carriage Returns (CR; 0x0a) that now appear in the source code. I guess it's some kind of character encoding issue, i.e. ways of saving the s

Re: Copy files

2006-03-31 Thread v0id
I haven't tested this, but i maybe think it works? import shutil try: copy("your_file.txt", "your_subfolder") print "Done!" except: print "Failed!" -- http://mail.python.org/mailman/listinfo/python-list

Re: how to comment lot of lines in python

2006-03-31 Thread Eric Deveaud
[EMAIL PROTECTED] wrote: > Like in C we comment like > /* > Bunch of lines of code > */ > > Should we use docstring """ """ I would say NO. docstring are displayed by pydoc, thus a pydoc on your code will display some inconsistent information ;-) > Or there is something else too ?? some m

Re: any() and all() on empty list?

2006-03-31 Thread Gerard Flanagan
Steve R. Hastings wrote: > Therefore, I propose that all() should work as if it were written this way: > def all(S): > ret_val = False > > for x in S: > ret_val = True > if not x: > return False > > return ret_val > > Comments? Ant wrote: > all(list) simp

Re: Working with files in a SimpleXMLRPCServver

2006-03-31 Thread Brian Quinlan
Jose Carlos Balderas Alberico wrote: > I'm setting up a server accepting XML-RPC calls using the > SimpleXMLRPCServer class. Basically, what I have to do is send a > zip-compressed file to the server, have the server unzip it and process > it, after processing it the server is supposed to zip th

re.sub problem

2006-03-31 Thread veracon
I'm trying to make a (tiny) template system (Cheetah and like have far more than what I need), but I've run into a problem. To simplify everything, I've decided to make for loops matching the indentation level of the open and close statements; it appears to work fine, but apparently it chokes once

Re: re.sub problem

2006-03-31 Thread veracon
Actually, it happens in general when there is more than one linebreak between the open and close statements; not only when there are empty lines. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to search HUGE XML with DOM?

2006-03-31 Thread Paul Boddie
Diez B. Roggisch wrote: > > the xml.dom.minidom object is too slow when parsing such a big XML file > > to a DOM object. while pulldom should spend quite a long time going > > through the whole database file. How to enhance the searching speed? > > Are there existing solution or algorithm? Thank y

Re: How to debug python code?

2006-03-31 Thread Thomas Guettler
Am Thu, 30 Mar 2006 21:18:50 -0800 schrieb sushant.sirsikar: > hi, >I am new to Python programming.I am not getting exactly pdb.Can > anyone tell me effective way to debug python code? Hi, I try to debug the code while I type: Use "assert". Then if you get an AssertionError you can inse

Re: Very stupid question.

2006-03-31 Thread Juha-Matti Tapio
Peter Hansen <[EMAIL PROTECTED]> wrote: > >>> from path import path > >>> path('foobar').getsize() > 12345L > (But note that it's just a nice wrapper around the scattered builtin > ways of doing the same thing, in this case the os.stat().st_size > approach mentioned above. That's not a bad thi

Re: Best IDE for Python?

2006-03-31 Thread Ant
On a more useful note, I'll assume you're not already a vim or emacs zealot, since you are asking the question ;-) and give my tips: SPE seems to be the best (free) python IDE out there at the moment, though the text editor component is pretty basic. I personally use jEdit, since it has a superb e

Can I export my datas in pickle format safely ?

2006-03-31 Thread DurumDara
Hi ! I want to create a database from datas. I want to store my datas in lists/dicts/normal variables. I thinking about that I can use the pickle to serialize/load my datas from the file. But: I remember that in the year of 2004(?) I tried this thing. I store my CD informations in pickled obje

<><><><><><><>The Net's #1 Joke e-Book!<><><><><><><><>

2006-03-31 Thread Expert Humor
That's Comedy - Over 460 Pages of Little Snickers, Medium-Sized Chuckles, and Great Big Belly Laughs: http://www.ExpertHumor.com/That'sComedy.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** -- http:

>@>@>@>@>GET MORE CHICKS............LEARN GUITAR.............

2006-03-31 Thread Expert Humor
Chicks dig guitar players. So get more chicks! Learn how to play guitar! http://www.ExpertHumor.com/LearnGuitar.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** -- http://mail.python.org/mailma

wx.checklistbox

2006-03-31 Thread luca72
Hello I write one file using:...(i think that is ok for write all the lines of my list) luca = open('/tmp/luca', 'w') luca.writelines(list) when i open the application again i use: leggi = open('/tmp/luca', 'r') leggi.readlines() How can i store this line in to a wx.checkbox. Thanks Luc

Re: How to determine COM objects/functions

2006-03-31 Thread M�ta-MCI
Hi! COM browsers, Makepy, and other tools run only for statics COM servers. For dynamic-COM-servers, there are ... only ... documentation. @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Best IDE for Python?

2006-03-31 Thread kbperry
I have recently been trying out NewEdit, and it is a pretty good "IDE" for Python. The reason that I have it in quotes is because I haven't really found a true IDE (like the way Eclipse behaves for Java) for python. (I realize that Eclipse has a plug-in for Python, too). -- http://mail.python.o

Re: wx.checklistbox

2006-03-31 Thread Philippe Martin
Not sure I understand: a wx.CheckBox has up to three states (on, off ... does not apply/greyed) Is that what you read from your file ? Philippe luca72 wrote: > Hello > I write one file using:...(i think that is ok for write all the > lines of my list) > luca = open('/tmp/luca', 'w') > luc

packaging question - documentation

2006-03-31 Thread schwehr
Hi All, I am rearranging the layout of one of my python projects so that it more closely conforms to how most python projects seem to work. I now have a structure like this: seismic-py - setup.py - seismic - bulk of the code - scripts - programs that go in bin I am usi

cgi error

2006-03-31 Thread s99999999s2003
hi I have a little function to use ftputil module to get a file from a server def getfile(filename): import ftputil host = ftputil.FTPHost(svr, usr,pswd) host.chdir("/somewhere") try: host.download(filename,filename,"a") except ftputil.FTPErr

<%><%><%><%>HOW TO BE FUNNY!<%><%><%><%>

2006-03-31 Thread Expert Humor
You too can learn to be funny in just 7 days flat: http://www.ExpertHumor.com/HowToBeFunny.htm *** Free account sponsored by SecureIX.com *** *** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** -- http://mail.python.org/mailman/listinfo/python-list

Re: how to comment lot of lines in python

2006-03-31 Thread olsongt
Eric Deveaud wrote: > [EMAIL PROTECTED] wrote: > > Like in C we comment like > > /* > > Bunch of lines of code > > */ > > > > Should we use docstring """ """ > > I would say NO. > docstring are displayed by pydoc, thus a pydoc on your code will display some > inconsistent information ;-) > d

Spawn/Kill Process

2006-03-31 Thread david brochu jr
I need to write a script that starts an exe and then continues throughthe script. I am able to start the exe file but my script doesn'tcontinue because the process I start runs in the background of Windows(as it is supposed to). I have tried using both os.system and os.popento get around this but

QOTW... (was: Doc suggestions (was: Why "class exceptions" are not deprecated?))

2006-03-31 Thread skip
> "Ed" == Ed Singleton <[EMAIL PROTECTED]> writes: Ed> Go to the wiki, make the changes you want, and feel good about Ed> yourself for once. +1 QOTW. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I control Video Card by using Python under linux?

2006-03-31 Thread Mike C. Fletcher
LUK wrote: > Hi, I have a video card based on cx2388 chip to catch video and do the > other thing. > There's already a V4L2 driver for it, but it is too hard for me to > program in C. > Can I use Python do the job? > Does Python has simpler APIs? > Please gvie me some suggestion. > Thanks! > You

Re: wx.checklistbox

2006-03-31 Thread luca72
Sorry Philippe is a Wx.checklistbox -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I export my datas in pickle format safely ?

2006-03-31 Thread Sybren Stuvel
DurumDara enlightened us with: > I want to create a database from datas. Just nitpicking: 'data' is already plural, a single is called 'datum'. > I thinking about that I can use the pickle to serialize/load my > datas from the file. Sure you can. Be very, very careful though, since unpickling da

Re: cgi error

2006-03-31 Thread v0id
I'm not sure, but in your CGI script, where you have import cgi or import cgi import cgitb; cgitb.enable() there sometimes come error if place any other modules over it. I don't now if it is that, 'cus i don't have seen more of your code. so if your code is: importFTPHost import cgi import cgitb; c

Re: Best IDE for Python?

2006-03-31 Thread Fabio Zadrozny
On 31 Mar 2006 06:46:35 -0800, kbperry <[EMAIL PROTECTED]> wrote: I have recently been trying out NewEdit, and it is a pretty good "IDE"for Python.The reason that I have it in quotes is because I haven't really found atrue IDE (like the way Eclipse behaves for Java) for python.  (I realize that Ecl

Re: how to comment lot of lines in python

2006-03-31 Thread Eric Deveaud
[EMAIL PROTECTED] wrote: > > Eric Deveaud wrote: > > [EMAIL PROTECTED] wrote: > > > Like in C we comment like > > > /* > > > Bunch of lines of code > > > */ > > > > > > Should we use docstring """ """ > > > > I would say NO. docstring are displayed by pydoc, thus a pydoc on your > > code wi

Re: How to debug python code?

2006-03-31 Thread Grant Edwards
On 2006-03-31, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >I am new to Python programming.I am not getting exactly pdb.Can > anyone tell me effective way to debug python code? 1) Read your code. Think. 2) Add some "print" statements. 3) goto 1) -- Grant Edwards g

member variables in python

2006-03-31 Thread PyPK
hi how do I write this better with member variables rather than global as you see below. eg: test-flag = 0 class AA: def __init__(...): def methos(self,...): global test-flag test-flag = xx instead of something like above ..how do i put it i terms of member variables? -- h

Re: Best IDE for Python?

2006-03-31 Thread Keith B. Perry
To me, it just doesn't behave the same way as Eclipse for java.  I have used the plug-in, and I usually use it on my home machine ( I am still a student).  For example, in Java eclipse, if you import a module like math, then if you want to use a math function, you just type math + period, and then

cd burning

2006-03-31 Thread DK
i was wondering if there had been any recent development of python modules that enables cd writing capabilities. specifically, i'm looking to produce audio cds from ogg files on a win32 envrionment. any leads will be greatly appreciated... -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi error

2006-03-31 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It works fine when i run it in python , but it won't run when i run my > cgi script. > > It says AttributeError: 'module' object has no attribute 'FTPHost' > what could be a possible cause? thanks. Perhaps you called your script 'ftp

Re: Best IDE for Python?

2006-03-31 Thread kbperry
To me, it just doesn't behave the same way as Eclipse for java. I have used the plug-in, and I usually use it on my home machine ( I am still a student). For example, in Java eclipse, if you import a module like math, then if you want to use a math function, you just type math + period, and then

Re: Python plug-in

2006-03-31 Thread Terry Hancock
toto wrote: >I'm trying to find some howto, tutorial in order to create a python program >that will allow plug-in programming. I've found various tutos on how to >write a plug-in for soft A or soft B but none telling me how to do it in my >own programs. Do you have any bookmarks ? > > There is m

Re: Best IDE for Python?

2006-03-31 Thread Doug Bromley
You may find the IDE review at Straw Dogs worth a look:  http://www.straw-dogs.co.uk/blog/python-ide-reviewOn 3/31/06, Keith B. Perry <[EMAIL PROTECTED]> wrote: To me, it just doesn't behave the same way as Eclipse for java.  I have used the plug-in, and I usually use it on my home machine ( I am

Re: member variables in python

2006-03-31 Thread Kent Johnson
PyPK wrote: > hi how do I write this better with member variables rather than global > as you see below. > > eg: > > test-flag = 0 > > class AA: >def __init__(...): > > def methos(self,...): >global test-flag >test-flag = xx > > instead of something like above ..how do i

Re: Convert Word .doc to Acrobat .pdf files

2006-03-31 Thread kbperry
The question is where is the API? -- http://mail.python.org/mailman/listinfo/python-list

Re: Best IDE for Python?

2006-03-31 Thread Fabio Zadrozny
Well, in pydev you surely can have code-completion on 'math.' I think you got some wrong configuration...  Have you read the getting started manual? (http://www.fabioz.com/pydev/manual_101_root.html)  On 31 Mar 2006 07:44:38 -0800, kbperry <[EMAIL PROTECTED]> wrote: To me, it just doesn't behave t

Re: Best IDE for Python?

2006-03-31 Thread Keith B. Perry
You are probably right, and I will definitely take a look at the starter manual.  Hopefully it also works well on classes that I create?  You got some nice docs there.   Thanks for the tip!  On 3/31/06, Fabio Zadrozny <[EMAIL PROTECTED]> wrote: Well, in pydev you surely can have code-completion on

Re: wx.checklistbox

2006-03-31 Thread luca72
I have solved with appen.items() Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: CGIHTTPServer threading problems

2006-03-31 Thread infidel
Alvin A. Delagon wrote: > I'm a simple python webserver based on CGIHTTPServer module: > > import CGIHTTPServer > import BaseHTTPServer > import SocketServer > import sys > import SQL,network > from config import * > > class > ThreadingServer(SocketServer.ThreadingMixIn,BaseHTTPServer.HTTPServer):

Re: How to debug python code?

2006-03-31 Thread R. Bernstein
[EMAIL PROTECTED] writes: > hi, >I am new to Python programming.I am not getting exactly pdb.Can > anyone tell me effective way to debug python code? >Please give me any example. >Looking for responce. >Thank You. > Sushant Well, I guess (in addition to the other

Re: member variables in python

2006-03-31 Thread PyPK
ok I reason I was going with globals is that i use this variable in another class something like this along with above testflag = 0 class AA: def __init__(...): def methos(self,...): global testflag testflag = xx class BB: def __init__(...): def method2(..): if

Re: How to debug python code?

2006-03-31 Thread R. Bernstein
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On 30 Mar 2006 21:18:50 -0800, [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > hi, > >I am new to Python programming.I am not getting exactly pdb.Can > > anyone tell me effective way to debug python code? > > I

Re: How to debug python code?

2006-03-31 Thread pruebauno
[EMAIL PROTECTED] wrote: > hi, >I am new to Python programming.I am not getting exactly pdb.Can > anyone tell me effective way to debug python code? >Please give me any example. >Looking for responce. >Thank You. > Sushant If you are having issues you also might wa

Re: cd burning

2006-03-31 Thread RunLevelZero
I am hopeing something has developed myself. I have been waiting awhile. I simply don't want to use cdrecord or cdrdao. If I had the know how I would be working on it but I believe this is a massive undertaking and rather hard to accomplish. I do hope this happens very soon though. Libburn mig

Re: member variables in python

2006-03-31 Thread Grant Edwards
On 2006-03-31, PyPK <[EMAIL PROTECTED]> wrote: > hi how do I write this better with member variables Sorry, I don't know what "member variables" are. > rather than global as you see below. What you did below isn't global. It's scope is limited to the module containing the class. If you got so

Re: How to search HUGE XML with DOM?

2006-03-31 Thread bayerj
Mind, that XML documents are not more flexible than RDBMS. You can represent any XML document in a RDBMS. You cannot represent any RDBMS in an XML document. RDBMS are (strictly spoken) relations and XML documents are trees. Relations are superior to trees, at least mathematically speaking. Once y

Re: member variables in python

2006-03-31 Thread Fredrik Lundh
"PyPK" wrote: > hi how do I write this better with member variables rather than global > as you see below. > > eg: > > test-flag = 0 > > class AA: >def __init__(...): > > def methos(self,...): >global test-flag >test-flag = xx > > instead of something like above ..how do i pu

Re: Find similar images using python

2006-03-31 Thread Terry Hancock
Thomas W wrote: >How can I use python to find images that looks quite similar? Thought >I'd scale the images down to 32x32 and convert it to use a standard >palette of 256 colors then compare the result pixel for pixel etc, but >it seems as if this would take a very long time to do when processing

Re: Best IDE for Python?

2006-03-31 Thread Fabio Zadrozny
On 3/31/06, Keith B. Perry <[EMAIL PROTECTED]> wrote: You are probably right, and I will definitely take a look at the starter manual.  Hopefully it also works well on classes that I create?  You got some nice docs there. Surely does ;-) Cheers, Fabio Thanks for the tip!  On 3/31/06, Fabio Zad

Re: wx.checklistbox

2006-03-31 Thread luca72
sorry appenditems -- http://mail.python.org/mailman/listinfo/python-list

Re: re.sub problem

2006-03-31 Thread RunLevelZero
Okay I just woke up and haven't had enough coffee so if I'm off here please forgive me. Are you saying that if there is an emptly line then it borks? If so just use re.S ( re.DOTALL ) and that should take care of it. It will treat the ( . ) special. Otherwise it ignores new lines. -- http://m

Re: member variables in python

2006-03-31 Thread PyPK
I see that.But here in my case the testflags is computed inside the member function something like class AA: def __init__(self): self.test_flag = 0 # initialize def methods(self, value): save_value = _munge(value) self.test_flag = save_value N

best way to index numerical data ?

2006-03-31 Thread Jack
Hi I have a lot of data that is in a TEXT file which are numbers does anyone have a good suggestion for indexing TEXT numbers (zip codes, other codes, dollar amounts, quantities, etc). since Lucene and other indexers are really optimized for Alpha character indexing. What approaches are typically t

Re: member variables in python

2006-03-31 Thread bruno at modulix
PyPK wrote: > ok I reason I was going with globals is that i use this variable in > another class something like this along with above > > testflag = 0 > > class AA: >def __init__(...): > > def methos(self,...): >global testflag >testflag = xx > > class BB: > def __ini

Re: Spawn/Kill Process

2006-03-31 Thread Daniel Nogradi
> I need to write a script that starts an exe and then continues through > the script. I am able to start the exe file but my script doesn't > continue because the process I start runs in the background of Windows > (as it is supposed to). I have tried using both os.system and os.popen > to get aro

base64 memory question

2006-03-31 Thread Michele Petrazzo
Hi ng, I see that after en encoding with base64, the memory used for the variable that I use for store the encoded data, after deleted, python keep a part of that memory: #ls -lh on /tmp/test_zero #-rw-r--r-- 1 michele michele 9,8M 2006-03-31 18:32 /tmp/test_zero michele:~$ python2.4 Python 2.4

Re: how to comment lot of lines in python

2006-03-31 Thread Michael Hobbs
Eric Deveaud wrote: > [EMAIL PROTECTED] wrote: > >> Eric Deveaud wrote: >> >>> [EMAIL PROTECTED] wrote: >>> Like in C we comment like /* Bunch of lines of code */ Should we use docstring """ """ >>> I would say NO. docstring are disp

Re: How to search HUGE XML with DOM?

2006-03-31 Thread Ivan Vinogradov
On 31-Mar-06, at 11:17 AM, bayerj wrote: > Mind, that XML documents are not more flexible than RDBMS. > > You can represent any XML document in a RDBMS. You cannot represent > any > RDBMS in an XML document. RDBMS are (strictly spoken) relations and > XML > documents are trees. Relations are

Re: re.sub problem

2006-03-31 Thread veracon
Thanks a lot! Compiling with re.DOTALL did fix my problem for the most part; there still are a few problems with my code, but I think I can fix those myself. Again, thanks! > Okay I just woke up and haven't had enough coffee so if I'm off here > please forgive me. Are you saying that if there is

Re: member variables in python

2006-03-31 Thread Kent Johnson
PyPK wrote: > ok I reason I was going with globals is that i use this variable in > another class something like this along with above > > testflag = 0 > > class AA: >def __init__(...): > > def methos(self,...): >global testflag >testflag = xx > > class BB: > def __ini

Re: logging producing redundant entries

2006-03-31 Thread Jed Parsons
Thanks, Peter and alex23, The metalog test shows that the code is only being executed once at a time. And if I take those lines and put them in a shell script (fixing the FileHandler - sorry about the bad copy there), they work as expected, producing a single log entry. So I'm left with: - l

Re: any() and all() on empty list?

2006-03-31 Thread Carl Banks
Ron Adam wrote: > Carl Banks wrote: > > > In Python, yes and no are the only possible answers. Probably the only > > analogous thing you could do in Python would be for all() to raise > > ValueError when passed an empty sequence. > > There is also 'None' which serves a similar purpose of indicati

Re: re.sub problem

2006-03-31 Thread RunLevelZero
Glad I could help. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >