ANN: BigDecimal - decimal arithmetic on very large intergers

2005-03-28 Thread casevh
BigDecimal is a Python class that supports decimal arithmetic on very large integers. BigDecimal was inspired by the posting of BigDec to c.l.py by Tim Peters. BigDecimal implements all the commonly used integer methods. (It doesn't implement any of the binary/shifting operations.) It has

[ANN] pyfdupes 1.0.3

2005-03-28 Thread Luca Montecchiani
Pyfdupes can help you to reorganize your mp3 collection or your download directories, finding files with a similar name or same content with great results. Main features : - Graphical interface - Console mode command line version - Reusability of the core classes - GNU GPL licence Documentation,

[ANN] Release 0.26 of Task Coach

2005-03-28 Thread Frank Niessink
Hi all, I am pleased to announce release 0.26 of Task Coach. This release fixes tow bugs and extends two features: Bugs fixed: - Marking a task completed did not stop effort tracking. - Reading lots of effort records was slow. Features added: - Save button is disabled when saving is not necessary,

Re: html tags and python

2005-03-28 Thread Hansan
Hi and thanks for your replies. Will one still tell me how I use the timedate modul with my form print '''form action='insertevent.py'br pDay (1-31):br INPUT type=text NAME=day pMonth (1-12):br INPUT type=text NAME=month print '''pinput type=submit value='Submit'/p/form'''

Re: how to add a string to the beginning of a large binary file?

2005-03-28 Thread could ildg
I'm not going to, I just want to know how to manipulate a large file and insert or delete some stuff in it. On Mon, 28 Mar 2005 09:43:41 +0200, Patrick Useldinger [EMAIL PROTECTED] wrote: could ildg wrote: I want to add a string such as I love you to the beginning of a binary file, How

hiding a frame in tkinter

2005-03-28 Thread faramarz yari
hello everybody suppose we have a tk frame in witch there are lots of frame, and we want to hide one of them(frames) what should we do , and what will be the result in pack or grid goemetry? thank you in advanced -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: how to add a string to the beginning of a large binary file?

2005-03-28 Thread could
James Stroud,hello: I mean large is over 1 GB. === 2005-03-28 13:44:55 you mentioned=== On Sunday 27 March 2005 07:56 pm, could ildg wrote: I want to add a string such as I love you to the beginning of a binary file, How to? and how to delete the string if I want to get the

how to apply mvc pattern to gui-design in python

2005-03-28 Thread Su Wei
i have a project want to develop with python. who can tell me that how to apply mvc pattern to gui-design in python. please give me some advices! ths in advanced. -- -- http://mail.python.org/mailman/listinfo/python-list

Connecting to a SQL Server

2005-03-28 Thread ttmi
Hi, I am trying to write a python script to connect to a remote SQL Server on windows. The user name and password should be encrypted and transmitted over network using ssh. Any idea how this can be done? Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: String Splitter Brain Teaser

2005-03-28 Thread runsun pan
For the fans of funtional programming: s='ATT/GATA/G' [y.split('/') for y in (' '.join([x for x in s]).replace(' / ', '/')).split()] [['A'], ['T'], ['T', 'G'], ['A'], ['T'], ['A', 'G']] -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the best GUI toolkit in Python,Tkinter,wxPython,QT,GTK?

2005-03-28 Thread Dave Cook
On 2005-03-27, Tom [EMAIL PROTECTED] wrote: 1) Portable to Windows, Unix-like platforms, and the Macintosh; 2) Powerful, GUI is very beautiful ; 3) Efficiency of development is high; What's the best, Tkinter, wxPython, QT, GTK or other? Don't forget Swing and SWT via Jython. Of course that

Re: hiding a frame in tkinter

2005-03-28 Thread Fredrik Lundh
faramarz yari [EMAIL PROTECTED] wrote: suppose we have a tk frame in witch there are lots of frame, and we want to hide one of them(frames) what should we do , and what will be the result in pack or grid goemetry? use pack_forget() or grid_forget() /F --

Re: how to add a string to the beginning of a large binary file?

2005-03-28 Thread Fredrik Lundh
could ildg [EMAIL PROTECTED] wrote: I just want to know how to manipulate a large file and insert or delete some stuff in it. you cannot insert or delete stuff in files in contemporary operating systems; all you can do is to overwrite parts of the file, or add/remove stuff at the end of the

Re: Newbie Shell Editor Question

2005-03-28 Thread runsun pan
whatever you type after the is either a statement that command python to do something (like print 'hello'), or an object that might or might not contain/return a value. The 'hello' you typed (the one that caused error) is simply a word. It is not a command, it is not a variable, it is not an

Re: Overriding methods in classes you don't control

2005-03-28 Thread andybak
I've also come across several situations where modifying existing classes seems the simplest and most intuitive thing to do. Obviously it is fine for quick hacks but people tend to go 'whoo' and wave their fingers around when people suggest it as a general technique. Has anyone got any

numbering variables

2005-03-28 Thread remi
Hello, I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... The lenght of mylist is finite ;-) Any ideas ? Thanks a lot. Rémi. --

Re: numbering variables

2005-03-28 Thread Fredrik Lundh
remi [EMAIL PROTECTED] wrote: I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... why? /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs [was: function with a state]

2005-03-28 Thread Xah Lee
Python doc 3.6.4 Mutable Sequence Types at http://python.org/doc/2.4/lib/typesseq-mutable.html in which contains the documentation of the sort method of a list. Quote: -- .sort([cmp[, key[, reverse]]]) sort the items of s in place (7), (8), (9), (10) ... (8) The sort() method

Support

2005-03-28 Thread Alberto Troiano
I have a question about Menus I know how to use menhubuttons like add_checkbutton and so but how can I select one of them by default? When I start the application I want that one add_radiobutton be on. Another question, if I can put the disabled state to one menu_button, later how

Re: numbering variables

2005-03-28 Thread Patrick Useldinger
remi wrote: Hello, I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... The lenght of mylist is finite ;-) Any ideas ? Thanks a lot. Rémi. Use a dictionary:

Re: numbering variables

2005-03-28 Thread remi
Patrick Useldinger a écrit : remi wrote: Hello, I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... The lenght of mylist is finite ;-) Any ideas ? Thanks a lot. Rémi.

Re: numbering variables

2005-03-28 Thread remi
Fredrik Lundh a écrit : remi [EMAIL PROTECTED] wrote: I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... why? I want to convert a very simple *.tex file into a very

Calling __init__ with multiple inheritance

2005-03-28 Thread Axel Straschil
Hello! Im working with new (object) classes and normaly call init of ther motherclass with callin super(...), workes fine. No, I've got a case with multiple inherance and want to ask if this is the right and common case to call init: class Mother(object): def __init__(self,

Re: numbering variables

2005-03-28 Thread Fredrik Lundh
remi [EMAIL PROTECTED] wrote: i = 0 while i=len(mylist) variable['s_i']=mylist.pop() i = i+1 variable['s_' + str(i)]=mylist.pop() but that while and pop stuff is pretty weird; maybe you should read the sections on lists, for loops, and string formatting in the Python tutorial?

Re: Python for a 10-14 years old?

2005-03-28 Thread TZOTZIOY
On 24 Mar 2005 13:33:58 GMT, rumours say that Fred Pacquier [EMAIL PROTECTED] might have written: Christos TZOTZIOY Georgiou [EMAIL PROTECTED] said : At the age of nine at school, two guys from a French computer-making company named as Loup (in french) or Lupo (in Italian), can't remember

Re: numbering variables

2005-03-28 Thread Fredrik Lundh
remi [EMAIL PROTECTED] wrote: I want to store each item of mylist in a variable (and after xmlize it little by little). why not just process the items in the list? for item in mylist: print tex2xml(item) /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Connecting to a SQL Server

2005-03-28 Thread Jarek Zgoda
ttmi napisa(a): I am trying to write a python script to connect to a remote SQL Server on windows. The user name and password should be encrypted and transmitted over network using ssh. Any idea how this can be done? Using native MSSQL2K ADO (OLEDB) provider encrypted connection -- see MSDN on

Re: numbering variables

2005-03-28 Thread remi
Fredrik Lundh a écrit : remi [EMAIL PROTECTED] wrote: I want to store each item of mylist in a variable (and after xmlize it little by little). why not just process the items in the list? That's right. for item in mylist: print tex2xml(item) where tex2xml() is the main converting

Re: numbering variables

2005-03-28 Thread remi
Fredrik Lundh a écrit : variable['s_i']=mylist.pop() variable['s_' + str(i)]=mylist.pop() but that while and pop stuff is pretty weird; Why ? Because it destroys the list ? maybe you should read the sections on lists, for loops, and string formatting in the Python tutorial? here's a

Re: static variables in functions (was: Version Number Comparison Function)

2005-03-28 Thread TZOTZIOY
On Fri, 25 Mar 2005 19:23:37 GMT, rumours say that [EMAIL PROTECTED] (Bengt Richter) might have written: On Fri, 25 Mar 2005 17:02:31 +0100, Fredrik Lundh [EMAIL PROTECTED] wrote: Keith wrote: Is there a function for comparing version numbers? E.g. 0.1.0 0.1.2 1.876b 1.876c 3.2.2 3.4

Re: how to apply mvc pattern to gui-design in python

2005-03-28 Thread Swaroop C H
On Mon, 28 Mar 2005 17:26:14 +0800, Su Wei [EMAIL PROTECTED] wrote: i have a project want to develop with python. who can tell me that how to apply mvc pattern to gui-design in python. please give me some advices! ths in advanced. This may help you:

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread Peter Otten
Axel Straschil wrote: Im working with new (object) classes and normaly call init of ther motherclass with callin super(...), workes fine. No, I've got a case with multiple inherance and want to ask if this is the right and common case to call init: class Mother(object): def

Python Cookbook 2nd Ed

2005-03-28 Thread Will McGugan
Hi, Is the second edition of the Python Cookbook worth getting if you have the first edition? How much new material is there in the 2nd edition? Thanks, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: Access denied calling FireEvent in Python

2005-03-28 Thread calfdog
Found that you have to call FireEvent a different way in the News IE and sp2 Instead of: ie.Document.forms[0].campus.fi­reEvent('onchange') if needs to be changed to: ie.Document.forms[0].campus.Fi­reEvent('onchange') RLM [EMAIL PROTECTED] wrote: Hello, Does anyone know a workaround for

Re: html tags and python

2005-03-28 Thread Swaroop C H
On Sat, 26 Mar 2005 01:13:08 +0100, Hansan [EMAIL PROTECTED] wrote: Do you know what I should google after, which key words ? free javascript calendar These look interesting: http://www.scriptsearch.com/JavaScript/Scripts/Calendars/

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread phil_nospam_schmidt
What if I want to call other methods as well? Modifying your example a bit, I'd like the reset() method call of Child to invoke both the Mother and Father reset() methods, without referencing them by name, i.e., Mother.reset(self). --- class Mother(object): def __init__(self,

Re: String Splitter Brain Teaser

2005-03-28 Thread Bill Mill
On 28 Mar 2005 04:12:15 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This is shorter: map(list,' '.join(s).replace(' / ','').split()) but for very long genomes Michael Spencer's nice version can be faster. for very long genomes he might want a generator: def xgen(s): l = len(s) -

Re: Dumb*ss newbie Q

2005-03-28 Thread Larry Bates
Others have answered your specific question, I thought I would add some suggestions (not tested): 1) You don't need a separate set_title method. You can change the title attribute at any time by just saying m.title=new title. No method is required unless you need to do some pre/post processing.

Re: passing input to running loop

2005-03-28 Thread Swaroop C H
On 27 Mar 2005 17:51:03 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm still very new to Python, after decideding to learn a true programming language (rather then a scripting language, i like to think i'm a intermediate PHP user). I decided for my first project I would try to make a

Re: Python docs [was: function with a state]

2005-03-28 Thread Mark McIntyre
On 28 Mar 2005 03:56:42 -0800, in comp.lang.c , Xah Lee [EMAIL PROTECTED] wrote: Python doc “3.6.4 Mutable Sequence Types” at (whatever) will you /please/ stop crossposting this python thread to comp.lang.c. (FUP's set to exclude CLC, please respect this) -- Mark McIntyre CLC FAQ

Re: list-comprehension and map question (simple)

2005-03-28 Thread runsun pan
I remember reading somewhere that the map, filter, reduce are much faster than list comp. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Printing Question

2005-03-28 Thread Larry Bates
If it is a print that can take direct character output (e.g. one that has PCL or text mode emulation) you can do following: lpr=open('LPT1','w') # or LPT2, LPT3 lpr.writeline('the output line you want') lpr.close() If it is a GDI-only printer it is MUCH more difficult. You need to interface

Re: Overriding methods in classes you don't control

2005-03-28 Thread runsun pan
good point, andy. -- http://mail.python.org/mailman/listinfo/python-list

Re: numbering variables

2005-03-28 Thread Ron_Adam
On Mon, 28 Mar 2005 13:39:17 +0200, remi [EMAIL PROTECTED] wrote: Hello, I have got a list like : mylist = ['item 1', 'item 2','item n'] and I would like to store the string 'item1' in a variable called s_1, 'item2' in s_2,...,'item i' in 's_i',... The lenght of mylist is finite ;-) Any

Re: list-comprehension and map question (simple)

2005-03-28 Thread Robert Kern
runsun pan wrote: I remember reading somewhere that the map, filter, reduce are much faster than list comp. It depends. map(float, some_list_of_numbers) is going to be faster than [float(x) for x in some_list_of_numbers] but map(lambda x,y: x+y, xs, ys) is going to be slower than import

Cooperative methods, was Re: Calling __init__ with multiple inheritance

2005-03-28 Thread Peter Otten
[EMAIL PROTECTED] wrote: What if I want to call other methods as well? Modifying your example a bit, I'd like the reset() method call of Child to invoke both the Mother and Father reset() methods, without referencing them by name, i.e., Mother.reset(self). [example snipped] The problem with

Re: Get document as normal text and not as binary data

2005-03-28 Thread Markus Franz
Diez B. Roggisch wrote: You get what the server sends. That is always binary - either it _is_ a binary file, or maybe in an unknown encoding. And how can I convert those binary data to a normal string with normal characters? Best regards Markus --

Re: Pre-PEP: Dictionary accumulator methods

2005-03-28 Thread Jack Diederich
On Sun, Mar 27, 2005 at 02:20:33PM -0700, Steven Bethard wrote: Michele Simionato wrote: I am surprised nobody suggested we put those two methods into a separate module (say dictutils or even UserDict) as functions: from dictutils import tally, listappend tally(mydict, key)

How do I get the current value of errno

2005-03-28 Thread Steve Juranich
I know that there's os.strerror to get the error string, and the errno module gives me all of the mappings like 34 - ERANGE. But I have yet to find out how to check the value of errno in a Python script. If I'm missing something obvious, please tell me. But I've been using Python for about six

Re: Cooperative methods, was Re: Calling __init__ with multiple inheritance

2005-03-28 Thread phil_nospam_schmidt
Peter Otten wrote: snip The problem with that aren't incompatible signatures, but the lack of an implementation of the reset() method at the top of the diamond-shaped inheritance graph that does _not_ call the superclass method. That method could be basically a noop: snip Ok, now that's

Re: Python Cookbook, 2'nd. Edition is published

2005-03-28 Thread Larry Bates
[EMAIL PROTECTED] wrote: See http://www.oreilly.com/catalog/pythoncook2/index.html I don't see it on Amazon yet, but you can order it from O'Reilly. Ron Stephens www.awaretek.com I received my copy on Friday (because I was a contributor). I wanted to thank Alex, Anna, and David for

Re: html tags and python

2005-03-28 Thread Hansan
I figured it out with a lot of if else statements, but still if one have time to explain how the time/date modul works with forms, I will be more than happy to lear. Thanks Hansan none wrote in message news:[EMAIL PROTECTED] Hi and thanks for your replies. Will one still tell me how I use

Re: Python for a 10-14 years old?

2005-03-28 Thread Fred Pacquier
Christos TZOTZIOY Georgiou [EMAIL PROTECTED] said : OT/trivia : if it was between mid-eighties and early nineties, the company could be Goupil (ancien french for Fox). Exactly! That was it... it was October or November 1981, though (early eighties). Oh... probably a G2 model then, with a

Exception Handling

2005-03-28 Thread ias0nas
Hello, Is it possible to bypass an exception and continue the code? If the exception is being raised in a while statement is it possible to bypoass it and continue with the next while? Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: Exception Handling

2005-03-28 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: Is it possible to bypass an exception and continue the code? If the exception is being raised in a while statement is it possible to bypoass it and continue with the next while? while True: some_action() try: some_other_action_raising_KeyError() except KeyError:

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread jfj
Peter Otten wrote: Here is an alternative approach that massages the initializer signatures a bit to work with super() in a multiple-inheritance environment: super(Father, self).__init__(p_father=p_father, **more) Is there any advantage using super in this case? I think the case

Re: String Splitter Brain Teaser

2005-03-28 Thread Michael Spencer
Bill Mill wrote: for very long genomes he might want a generator: def xgen(s): l = len(s) - 1 e = enumerate(s) for i,c in e: if i l and s[i+1] == '/': e.next() i2, c2 = e.next() yield [c, c2] else: yield [c] for g in

Module function can't see globals after import.

2005-03-28 Thread Ron_Adam
Using this example: [in mymodule] def whatisx(): try: print 'x is',x except: print 'There is no x' [in mymain] from mymodule import printx x = 10 whatisx() prints - There is no x Is there a way to tell the imported function printx to use mymain's globals instead of

itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-28 Thread Steven Bethard
Jack Diederich wrote: itertools to iter transition, huh? I slipped that one in, I mentioned it to Raymond at PyCon and he didn't flinch. It would be nice not to have to sprinkle 'import itertools as it' in code. iter could also become a type wrapper instead of a function, so an iter

Re: String Splitter Brain Teaser

2005-03-28 Thread Bill Mill
On Mon, 28 Mar 2005 09:18:38 -0800, Michael Spencer [EMAIL PROTECTED] wrote: Bill Mill wrote: for very long genomes he might want a generator: def xgen(s): l = len(s) - 1 e = enumerate(s) for i,c in e: if i l and s[i+1] == '/': e.next()

Re: What's the best GUI toolkit in Python,Tkinter,wxPython,QT,GTK?

2005-03-28 Thread Scott Robinson
On Mon, 28 Mar 2005 10:06:14 GMT, Dave Cook [EMAIL PROTECTED] wrote: On 2005-03-27, Tom [EMAIL PROTECTED] wrote: 1) Portable to Windows, Unix-like platforms, and the Macintosh; 2) Powerful, GUI is very beautiful ; 3) Efficiency of development is high; What's the best, Tkinter, wxPython, QT,

Re: Module function can't see globals after import.

2005-03-28 Thread TZOTZIOY
On Mon, 28 Mar 2005 17:19:42 GMT, rumours say that Ron_Adam [EMAIL PROTECTED] might have written: Is there a way to tell the imported function printx to use mymain's globals instead of it's own copy without passing it as an argument? No, but if you insist on working with globals for some reason

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread Peter Otten
jfj wrote: Peter Otten wrote: Here is an alternative approach that massages the initializer signatures a bit to work with super() in a multiple-inheritance environment: super(Father, self).__init__(p_father=p_father, **more) Is there any advantage using super in this case? I

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-28 Thread Jack Diederich
On Mon, Mar 28, 2005 at 10:28:29AM -0700, Steven Bethard wrote: Jack Diederich wrote: itertools to iter transition, huh? I slipped that one in, I mentioned it to Raymond at PyCon and he didn't flinch. It would be nice not to have to sprinkle 'import itertools as it' in code. iter could

looped if's stop working

2005-03-28 Thread lotmr
After figuring out how to have a threaded frontend to pass varibles I've run into a problem. The 'quit' command works as long as issue it fast enough as soon as the if's start looping. If I wait about 5 seconds, the commands will close the frontend thread but leave the main loop running. This

Re: Grouping code by indentation - feature or ******?

2005-03-28 Thread Javier Bezos
Dennis Lee Bieber [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] I don't think l[:5] + l[5:] = l is a handy property and to me is clearly counterintuitive. Further, [snipped in the reply] Please, don't remove parts of my post which are relevant to the discussion. I said:

Re: Pre-PEP: Dictionary accumulator methods

2005-03-28 Thread Michael Spencer
Jack Diederich wrote: On Sun, Mar 27, 2005 at 02:20:33PM -0700, Steven Bethard wrote: Michele Simionato wrote: I am surprised nobody suggested we put those two methods into a separate module (say dictutils or even UserDict) as functions: from dictutils import tally, listappend tally(mydict, key)

Re: Save passwords in scripts

2005-03-28 Thread Florian Lindner
Serge Orlov wrote: Florian Lindner wrote: Paul Rubin wrote: - sort of similar: have a separate process running that knows the password (administrator enters it at startup time). That process listens on a unix socket and checks the ID of the client. It reveals the password to authorized

Re: Get document as normal text and not as binary data

2005-03-28 Thread Diez B. Roggisch
Markus Franz wrote: Diez B. Roggisch wrote: You get what the server sends. That is always binary - either it _is_ a binary file, or maybe in an unknown encoding. And how can I convert those binary data to a normal string with normal characters? There is no normal - it's just bytes, and

Re: Get document as normal text and not as binary data

2005-03-28 Thread Diez B. Roggisch
Addendum: If you give us the url you're fetching data from, we might be able to look at the delivered data ourselves. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: String Splitter Brain Teaser

2005-03-28 Thread Michael Spencer
Bill Mill wrote: [long genomes might justify a generator approach] That's a good point. I should have said: *If* you are going to put the items into a list anyway, then there is no point generating the list items individually. Michael Spencer wrote: [Bill's solution didn't work for

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread jfj
Peter Otten wrote: jfj wrote: Peter Otten wrote: Here is an alternative approach that massages the initializer signatures a bit to work with super() in a multiple-inheritance environment: super(Father, self).__init__(p_father=p_father, **more) Is there any advantage using super in this

Re: String Splitter Brain Teaser

2005-03-28 Thread Steven Bethard
Michael Spencer wrote: def xgen(s): srciter = iter(s) item = [srciter.next()] for i in srciter: if i == '/': item.append(srciter.next()) else: yield item item = [i] yield item Note that the generator-based solution doesn't

Re: String Splitter Brain Teaser

2005-03-28 Thread Bill Mill
snip everything That is clearer. At this point, though, you don't need the enumerator any more (so you can avoid indexing each item): Good point. def xgen(s): srciter = iter(s) item = [srciter.next()] for i in srciter: if i == '/':

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread Robert Dick
jfj: In the case of Parent diamond inheritance, super() can avoid calling the __init__ of parent twice? How? Guido has a nice description of it: http://www.python.org/2.2.3/descrintro.html#cooperation. It linearizes the graph. Unfortunately, this means that super delegates to siblings.

Re: String Splitter Brain Teaser

2005-03-28 Thread Doug Schwarz
In article [EMAIL PROTECTED], James Stroud [EMAIL PROTECTED] wrote: Hello, I have strings represented as a combination of an alphabet (AGCT) and a an operator /, that signifies degeneracy. I want to split these strings into lists of lists, where the degeneracies are members of the same

Re: Get document as normal text and not as binary data

2005-03-28 Thread Kent Johnson
Markus Franz wrote: Hi. I used urllib2 to load a html-document through http. But my problem is: The loaded contents are returned as binary data, that means that every character is displayed like lt, for example. How can I get the contents as normal text? My guess is the html is utf-8 encoded -

Re: Save passwords in scripts

2005-03-28 Thread Paul Rubin
Florian Lindner [EMAIL PROTECTED] writes: Can I find out the identity of the client (PID/UID) when using unix socket? Unix sockets have a feature called ancillary messages that lets you do that, but the Python socket module currently doesn't support the feature. There's an open sourceforge bug

tkinter and textvariable option

2005-03-28 Thread max(01)*
hello everybody. i am a a bit of a newbie in python/tkinter,and i am experimenting a bit with widgets like checkbuttons. in python, you can create a checkbutton instance like this: self.tergicristalli = IntVar() self.b1 = Checkbutton(self.pulsanti_spunta) self.b1.configure( text =

Re: Calling __init__ with multiple inheritance

2005-03-28 Thread Peter Otten
jfj wrote: As for the case where the users of the library want to subclass, I don't see a problem.  They know they must subclass from class XXX and so they call XXX.__init__ to construct it. I was thinking of class Child(Father, Mother): pass where Father and Mother have a common base

PyParsing module or HTMLParser

2005-03-28 Thread Lad
I came across pyparsing module by Paul McGuire. It seems to be nice but I am not sure if it is the best for my need. I need to extract some text from html page. The text is in tables and a table can be inside another table. Is it better and easier to use the pyparsing module or HTMLparser?

Re: Python Cookbook, 2'nd. Edition is published

2005-03-28 Thread rdsteph
Hello Larry, I don't have my copy yet. Can you give any guidance on how the 2'nd edition compares to the 1'st edition? At 844 pages, it seems to be 250+ pages bigger than the 1'st Ed. How much of the book is new, and does it use the same chapter headings? Ron Stephens Someone else asked a

Re: Python Cookbook 2nd Ed

2005-03-28 Thread Skip Montanaro
Will Is the second edition of the Python Cookbook worth getting if you Will have the first edition? How much new material is there in the 2nd Will edition? While I have dived into it yet, I received a copy from O'Reilly last week. It's about twice the size of the first edition, and I

Which is easier? Translating from C++ or from Java...

2005-03-28 Thread cjl
Hey all: I'm working on a 'pure' python port of some existing software. Implementations of what I'm trying to accomplish are available (open source) in C++ and in Java. Which would be easier for me to use as a reference? I'm not looking for automated tools, just trying to gather opinions on

Re: Which is easier? Translating from C++ or from Java...

2005-03-28 Thread Patrick Useldinger
cjl wrote: Implementations of what I'm trying to accomplish are available (open source) in C++ and in Java. Which would be easier for me to use as a reference? I'm not looking for automated tools, just trying to gather opinions on which language is easier to understand / rewrite as python. Depends

Re: convert user input to Decimal objects using eval()?

2005-03-28 Thread Swaroop C H
On Mon, 28 Mar 2005 12:03:24 -0500, Julian Hernandez Gomez [EMAIL PROTECTED] wrote: is there a easy way to make eval() convert all floating numbers to Decimal objects and return a Decimal? eval('1.0001+0.111') -- convert each number to a Decimal object, perform the sum and obtain a

Re: PyParsing module or HTMLParser

2005-03-28 Thread EuGeNe
Lad wrote: I came across pyparsing module by Paul McGuire. It seems to be nice but I am not sure if it is the best for my need. I need to extract some text from html page. The text is in tables and a table can be inside another table. Is it better and easier to use the pyparsing module or

The Greatest News Ever!

2005-03-28 Thread Ron_Grossi_039
http://www.jcil.blogspot.com The Greatest News Ever! -- http://mail.python.org/mailman/listinfo/python-list

Re: Which is easier? Translating from C++ or from Java...

2005-03-28 Thread [EMAIL PROTECTED]
Patrick Useldinger wrote: cjl wrote: Implementations of what I'm trying to accomplish are available (open source) in C++ and in Java. Which would be easier for me to use as a reference? I'm not looking for automated tools, just trying to gather opinions on which language is easier

Max files in unix folder from PIL process

2005-03-28 Thread David Pratt
Hi. I am creating a python application that uses PIL to generate thumbnails and sized images. It is beginning to look the volume of images will be large. This has got me to thinking. Is there a number that Unix can handle in a single directory. I am using FreeBSD4.x at the moment. I am

Re: Python Cookbook, 2'nd. Edition is published

2005-03-28 Thread Larry Bates
Sorry, I didn't ever have copy of 1st edition. Maybe Alex can help us on this one? -Larry [EMAIL PROTECTED] wrote: Hello Larry, I don't have my copy yet. Can you give any guidance on how the 2'nd edition compares to the 1'st edition? At 844 pages, it seems to be 250+ pages bigger than the

using distutils.command.config

2005-03-28 Thread John Hunter
I am trying to utilize the config module in distutils to test for certain headers and libraries and fail elegantly if they are not found with a helpful message. The typical gcc error message when a header is missing is inscrutable to many. I have subclassed config and can use my class with

Re: DBAPI Paramstyle

2005-03-28 Thread Andy Dustman
Tim Roberts wrote: In theory, using a paramstyle allows the query to be sent to the SQL database backend and compiled like a program. Then, successive uses of the same query can be done by sending just the parameters, instead of sending the entire query string to be parsed and compiled again

Looking for Stephen Turner, maintainer of informixdb

2005-03-28 Thread Carsten Haese
Hello everybody: I have discovered that the functionality for connecting Python to an Informix database is currently in a frustrating state of neglect. The link to Kinfxdb is dead, and informixdb doesn't build on Python 2. I couldn't find any usable workarounds to the build problem, so I worked

Re: Which is easier? Translating from C++ or from Java...

2005-03-28 Thread Kent Johnson
cjl wrote: Hey all: I'm working on a 'pure' python port of some existing software. Implementations of what I'm trying to accomplish are available (open source) in C++ and in Java. Which would be easier for me to use as a reference? I haven't touched C++ in a long time, my experience porting Java

Re: Python Cookbook, 2'nd. Edition is published

2005-03-28 Thread Trent Mick
I don't have my copy yet. Can you give any guidance on how the 2'nd edition compares to the 1'st edition? Here is an excerpt from the preface (typing errors are mine): If you already own the first edition, you may be wondering whether you need this second edition, too. We think the

Status of Python implementation for PalmOS?

2005-03-28 Thread Wolfgang Keller
Hello, Does anyone have any recent information about the status of the (Stackless) Python implementation for the PalmOS? (Yes, I know about Pippy, but that's O-L-D) TIA, Best regards, Wolfgang Keller -- P.S.: My From-address is correct -- http://mail.python.org/mailman/listinfo/python-list

Re: DBAPI Paramstyle

2005-03-28 Thread Gerhard Haering
On Mon, Mar 28, 2005 at 01:43:28PM -0800, Andy Dustman wrote: Tim Roberts wrote: [prepared statements] mx.ODBC does, since it is an ODBC implementation. I would be very surprised if the Oracle adapter did not. MySQLdb does not yet, but probably will by the end of summer (with MySQL-4.1 or

author index for Python Cookbook 2?

2005-03-28 Thread Andrew Dalke
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. Andrew [EMAIL PROTECTED] --

newbie question

2005-03-28 Thread shama . bell
Hello, How do i create two memory mapped buffers(mmap) and pass an index to select which one needs to be populated? Is it possible to define the size of the buffer? -SB -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >