Re: Any way to change files in a ZIP archive?

2005-11-25 Thread Do Re Mi chel La Si Do
Hi! See http://mclaveau.com/ress/python/zipmci.htm @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing big XML files where beginning depends on end.

2005-11-25 Thread Gerard Flanagan
Magnus Lycka wrote: > We're using DOM to create XML files that describes fairly > complex calculations. The XML is structured as a big tree, > where elements in the beginning have values that depend on > other values further down in the tree. Imagine something > like below, but much bigger and muc

Re: Singleton and C extensions

2005-11-25 Thread Neal Norwitz
Emmanuel Briot wrote: > > I am not really good at python, but I was trying to implement the > singleton design pattern in C, so that for instance calling the constructor > >ed = Editor ("foo") > > would either return an existing instance of Editor currently editing > "foo", or would create a ne

Re: Making immutable instances

2005-11-25 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > "Hmmm, the class designer didn't want me adding attributes to instances... > maybe he had a good reason for that..." When it was suggested that a facility for doing this be added to the language, I asked for a use case for it. Nobodies come up with a r

Re: wxPython Licence vs GPL

2005-11-25 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 24 Nov 2005 17:43:22 +0100, Martin P. Hellwig wrote: > > > if I owned a company > > making profit on software sales (sale =! support) you sign a death wish > > for using GPL > > Apart from Microsoft, and possibly Quark (makers of Quark Expres

Re: wxPython Licence vs GPL

2005-11-25 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 24 Nov 2005 16:00:29 -0500, Mike Meyer wrote: > > > I believe in GPL'ed software - I use it regularly. On the other hand, > > I don't believe that it represents the best license to release > > software if the goal is to improve the lot of human

Re: books: Dive into Python vs Beginning Python

2005-11-25 Thread Godwin Burby
I would recommend both, but as i have already bought the first version of Beginning Python known as Practical Python by Magnus. I can gaurantee you that the practical projects as well as the succinct python tutorial in the book will show you the full power and glory of Python. Magnus is a great aut

Re: How to get started in GUI Programming?

2005-11-25 Thread Godwin Burby
Try http://boa-constructor.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Making immutable instances

2005-11-25 Thread Steven D'Aprano
On Fri, 25 Nov 2005 20:50:41 -0500, Mike Meyer wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> On Thu, 24 Nov 2005 11:44:16 -0500, Mike Meyer wrote: >>> In Python, I can even fix >>> it so *your* code uses my wrapped version: >>> >>> import Finney >>> class Addable(Finnney.Immutable): pas

Re: wxPython Licence vs GPL

2005-11-25 Thread Steven D'Aprano
On Fri, 25 Nov 2005 17:17:43 +, Ed Jensen wrote: > Whereas including > one line of GPL code into your 10,000,000,000 line project can have > disasterous consequences (which I find ridiculous) If you think that's disastrous, just try using one line of proprietary code in your 10,000,000,000 li

Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Paul Rubin wrote: > Python and *BSD are getting far less volunteer development love than, > say, GCC or Linux, and the licensing is at least part of the reason. I disagree. I believe *BSD gets less volunteer development because of some legal wrangling in the early 90s t

Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Christophe <[EMAIL PROTECTED]> wrote: > If you don't like the GPL, then by all means, *do not use GPL code !* > > Please, I mean, when you use without authorisation some code in your > project, you are in trouble, no matter what licence the code was using. I'm not sure why you felt compelled to

Re: return in loop for ?

2005-11-25 Thread Steven D'Aprano
On Fri, 25 Nov 2005 08:36:48 +, Steve Holden wrote: That's not a problem if there exists a verification program A which can't verify itself but can verify program B, which in turn also can't verify itself but will verify program A. >>> >>>That is logically equivalent to the fi

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Tom Anderson
On Fri, 25 Nov 2005, Christoph Zwerschke wrote: > Tom Anderson wrote: > >> True, but that's not exactly rocket science. I think the rules governing >> when your [] acts like a dict [] and when it acts like a list [] are vastly >> more complex than the name of one attribute. > > I think it's not

Mail Delivery System

2005-11-25 Thread seddharth
-- Virus Warning Message (on moms.localagri.com) Found virus WORM_MYTOB.V in file message.pif (in message.zip) The uncleanable file message.zip is moved to /etc/iscan/virus/virgp7pVn. - The message contains Unicode character

Yet another ordered dictionary implementation

2005-11-25 Thread Tom Anderson
What up yalls, Since i've been giving it all that all over the ordered dictionary thread lately, i thought i should put my fingers where my mouth is and write one myself: http://urchin.earth.li/~twic/odict.py It's nothing fancy, but it does what i think is right. The big thing that i'm not ha

Re: icmp - should this go in itertools?

2005-11-25 Thread Roy Smith
Tom Anderson <[EMAIL PROTECTED]> wrote: > It's modelled after the way cmp treats lists - if a and b are lists, > icmp(iter(a), iter(b)) should always be the same as cmp(a, b). > > Is this any good? Would it be any use? Should this be added to itertools? Whatever happens, please name it somethin

icmp - should this go in itertools?

2005-11-25 Thread Tom Anderson
Hi all, This is a little function to compare two iterators: def icmp(a, b): for xa in a: try: xb = b.next() d = cmp(xa, xb) if (d != 0): return d excep

enum 0.3: Enumerations in Python

2005-11-25 Thread Ben Finney
Howdy all, I've uploaded enum 0.3 to the Cheeseshop. http://cheeseshop.python.org/pypi/enum/> Enumerations are now sequences, iterable (as before) *and* indexable:: >>> from enum import Enum >>> Weekdays = Enum('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat') >>> pizza_night = W

Re: wxPython Licence vs GPL

2005-11-25 Thread Steven D'Aprano
On Fri, 25 Nov 2005 02:34:32 +, Ed Jensen wrote: > Because I think a lot of well meaning software developers writing free > software don't performance due diligence to determine the true > motivation behind, and the chilling effect of, the GPL. It took me seconds, seconds I say, to open a web

Re: the first element in the list of list

2005-11-25 Thread Ben Bush
On 11/22/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > "Ben Bush" wrote: > > > This question just came to my mind and not assigned by anyone. > > given that you and "Shi Mu" are asking identical questions, and that > you've both started to send questions via direct mail, can you please > ask your

Re: wxPython Licence vs GPL

2005-11-25 Thread Steven D'Aprano
On Thu, 24 Nov 2005 23:26:38 +0100, Martin P. Hellwig wrote: > BSD/MIT style license is a > good substitute of no license at all. But that's not true: "no licence at all" means that nobody has the right to use or copy or even *see* your work. You can, of course, choose to show them your work wit

Re: wxPython Licence vs GPL

2005-11-25 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 24 Nov 2005 16:00:29 -0500, Mike Meyer wrote: > The GPL doesn't restrict distribution. I don't understand where > people get this bizarre view of the GPL from.> It happens because people say things like: > If you don't like that clause, you ha

Re: Making immutable instances

2005-11-25 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Thu, 24 Nov 2005 11:44:16 -0500, Mike Meyer wrote: >> In Python, I can even fix >> it so *your* code uses my wrapped version: >> >> import Finney >> class Addable(Finnney.Immutable): pass >> Finney.Immutable = Addable > > Python's consenting adults

Re: drawline

2005-11-25 Thread Ben Bush
On 11/23/05, Magnus Lycka <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > I had the following code and when I clicked the left mouse button one > > time. I got green line and the second click got a purple line and the > > green disappeared. > > I was confused by two questions: > > It's good that t

Any way to change files in a ZIP archive?

2005-11-25 Thread Damjan
I am looking for a way to change a file that is inside a zip archive, in python of course. The thing is, I'm doing a CGI script that accepts a zip file (an OpenOffice document), I need to make some transformations to one of the files in the ZIP archive, but not touch any of the other files in it,

Re: wxPython Licence vs GPL

2005-11-25 Thread Steven D'Aprano
On Thu, 24 Nov 2005 16:00:29 -0500, Mike Meyer wrote: > I believe in GPL'ed software - I use it regularly. On the other hand, > I don't believe that it represents the best license to release > software if the goal is to improve the lot of humanity. The > restrictions are on "distribution", not on

Re: Unicode in MIMEText

2005-11-25 Thread Damjan
> ... and being concerned to improve the library you logged this patch in > Sourceforge for consideration by the developers? > > That's the only way to guarantee proper consideration of your fix. Ok I will, can you confirm that the patch is correct? Maybe I got something wrong? -- damjan -- h

Re: Making immutable instances

2005-11-25 Thread Steven D'Aprano
On Thu, 24 Nov 2005 11:44:16 -0500, Mike Meyer wrote: > In Python, I can even fix > it so *your* code uses my wrapped version: > > import Finney > class Addable(Finnney.Immutable): pass > Finney.Immutable = Addable > > Which means that from now on *your* code that tries to create > Immutables wi

Re: wxPython Licence vs GPL

2005-11-25 Thread Steven D'Aprano
On Thu, 24 Nov 2005 17:43:22 +0100, Martin P. Hellwig wrote: > if I owned a company > making profit on software sales (sale =! support) you sign a death wish > for using GPL Apart from Microsoft, and possibly Quark (makers of Quark Express desktop packaging software), and perhaps a few console

Re: How to get started in GUI Programming?

2005-11-25 Thread Luis M. Gonzalez
IMHO, the easier alternative for building GUI apps with Python is PythonCard. It is based on wxWindows, and it lets you build gui apps by dragging and dropping widgets on a form, just like VB or Delphi. It is very high level and very easy to learn and use. http://pythoncard.sourceforge.net/ Anoth

Re: Making immutable instances

2005-11-25 Thread Steven D'Aprano
On Thu, 24 Nov 2005 12:55:07 +, Antoon Pardon wrote: > Suppose I have the following code. > > from module import __take_care__ > > __private_detail__ = ... > > I now have two variable that are flaged the same way, but they are not. No, you have two names written using a poor naming convent

Re: [Forged?] Re: How to find the port a server is listening on (from within the server)

2005-11-25 Thread Tim Williams (gmail)
On 26/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:    If I understand correctly, you're looking for the socket methodgetsockname(), documented at http://docs.python.org/lib/socket-objects.htmlJeff Many thanks Jeff, self.server.socket.getsockname() did the trick. -- -- http://mail.py

Re: Which License Should I Use?

2005-11-25 Thread Tom Anderson
On Fri, 25 Nov 2005, mojosam wrote: > How do I decide on a license? You decide on what obligations you wish to impose on licensees, then pick a license which embodies those. There are basically three levels of obligation: 1. None. 2. Derivatives of the code must be open source. 3. Derivative

Re: How to find the port a server is listening on (from within the server)

2005-11-25 Thread jepler
If I understand correctly, you're looking for the socket method getsockname(), documented at http://docs.python.org/lib/socket-objects.html Jeff pgppauvaXgXhK.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing pins to the RS232

2005-11-25 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I want to write to the pins of an RS232 without using the serial > protocol. The use would be every pin could act to complete a circuit > in customized hardware. I could use python to communicate serially to > a BASIC stamp or a Javelin stamp and then use the stamp to s

vb2py question

2005-11-25 Thread sszmidt
Hi, Has anyone looked at or used vb2py lately? I'm looking at doing some conversion work and it's awfully out of date. Any other information on the subject would be welcome. -- Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread gsteff
I learned pygtk via the tutorial and reference manual, and found most things to be pleasantly simple to do. A message dialog, for example, can be done via dialog = gtk.MessageDialog(buttons=gtk.BUTTONS_OK_CANCEL, message_format="Test message here.") response = dialog.run() All that can be found

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Mike Meyer
Christoph Zwerschke <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > > The mutability - or immutability - of an object is irrelevant to > > the question of whether or not they can be a dictionary key/set > > element. The critical property is that they are hashable. > > *Most* immutable builtin

Re: Which License Should I Use?

2005-11-25 Thread Tom Anderson
On Fri, 25 Nov 2005, Robert Kern wrote: > You may also want to read this Licensing HOWTO: > > http://www.catb.org/~esr/faqs/Licensing-HOWTO.html > > It's a draft, but it contains useful information. It's worth mentioning that ESR, who wrote that, is zealously pro-BSD-style-license. That's not t

Re: Move xml.sax.saxutils.*?

2005-11-25 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > It seems like functions such as xml.sax.saxutils.escape and unescape > are generally useful, and not at all tied to the xml.sax module. Would > it make sense to move them somewhere else, like to xml? Moving it would be a bad idea. Exposing it elsewhere would be useful.

Re: Which License Should I Use?

2005-11-25 Thread Martin v. Löwis
mojosam wrote: > How do I decide on a license? If you want to look at this from a legal point of view, I highly recommend reading Larry Rosen's book, Open Source Licensing. It covers issue you would never have thought of without studying law, and gives good advice (IMHO). Regards, Martin -- htt

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Martin v. Löwis
Mike Meyer wrote: > I would have phrased it as "identical" instead of equal. Sets should > hold unique elements, where "unique" depends on the use at hand. For > some uses, "==" might be appropriate. For others, "is" might be > appropriate. Sets, as currently defined, require hashable objects, i.e

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Martin v. Löwis
Christoph Zwerschke wrote: > You need to know a third thing, namely that as an iterable object, a > dictionary returns the keys only, not the key/value tuples which would > also make some sense. If it had been designed that way, you could write Right. I forgot to say that, but that is also expla

How to find the port a server is listening on (from within the server)

2005-11-25 Thread Tim Williams (gmail)
How can I find the port a server is listening on - at the commented line in the code below. (ie  self.serving_on_port_num =  ? ) I have googled a lot. :-( -- class BaseSrvr(SocketServer.ThreadingMixIn, SocketServer.TCPServer):  

Re: How to get started in GUI Programming?

2005-11-25 Thread jmdeschamps
It all really depends on what you wish to achieve. Results are generally in proportion to the effort involved. I don't think a "Python for Nulls" exists ! the following thread deals with documentation for beginners (and others as well) http://groups.google.ca/group/comp.lang.python/browse_frm/threa

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Christoph Zwerschke
Mike Meyer wrote: > The mutability - or immutability - of an object is irrelevant to > the question of whether or not they can be a dictionary key/set > element. The critical property is that they are hashable. > *Most* immutable builtin types are hashable, and no builtin > mutable types are

Re: wxPython Licence vs GPL

2005-11-25 Thread Paul Rubin
Ed Jensen <[EMAIL PROTECTED]> writes: > I think free software/open source has existed long enough and with > enough varied licenses (GPL, LGPL, modified LGPL (see wxWidgets), BSD, > X11, MIT, Apache, etc.) that we'd basically know without question if > less restritive licenses (like BSD) were causi

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Christoph Zwerschke
Tom Anderson wrote: > True, but that's not exactly rocket science. I think the rules governing > when your [] acts like a dict [] and when it acts like a list [] are > vastly more complex than the name of one attribute. I think it's not really rocket science either to assume that an ordered di

Re: How to get started in GUI Programming?

2005-11-25 Thread BartlebyScrivener
[EMAIL PROTECTED] wrote: > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > I am not an experienced programmer - just someone who from time to > time writes small programs for my use. Over the years I have moved > from GWBASIC to QBASIC to Visua

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Mike Meyer
Christoph Zwerschke <[EMAIL PROTECTED]> writes: > Mike Meyer schrieb: >> Ok, how about this for dictionaries/sets: >> Any hashable object can be used as a dictionary key (set >> member). Immutable >> objects, except for tuples that contain a non-hashable object, are >> hashable. Python classes are

Re: Writing pins to the RS232

2005-11-25 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I want to write to the pins of an RS232 without using the serial > protocol. The use would be every pin could act to complete a circuit > in customized hardware. I could use python to communicate serially to > a BA

Re: Which license should I use?

2005-11-25 Thread Mike Meyer
[EMAIL PROTECTED] (Björn Lindström) writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> IANAL, but I don't believe the GPL helps in this situation. It places >> conditions on redistributing the code; it doesn't force you to >> redistribute modifieed code. Your employers could refuse to let you >>

Re: How to get started in GUI Programming?

2005-11-25 Thread [EMAIL PROTECTED]
did you search GUI in this group? I think the results will be helpful. some other GUI packages you might of missed are wxPython and pygame -- http://mail.python.org/mailman/listinfo/python-list

Writing pins to the RS232

2005-11-25 Thread [EMAIL PROTECTED]
I want to write to the pins of an RS232 without using the serial protocol. The use would be every pin could act to complete a circuit in customized hardware. I could use python to communicate serially to a BASIC stamp or a Javelin stamp and then use the stamp to set however many pins as 0's or 1'

Re: Which License Should I Use?

2005-11-25 Thread Paul Watson
mojosam wrote: > I've been watching the flame war about licenses with some interest. > There are many motivations for those who participate in this sector, so > disagreements over licenses reflect those agendas. > > I don't have an agenda, at least not right now. I do plan on writing a > few prog

CGI question

2005-11-25 Thread Dan Stromberg
What's the best way of converting this: 'hide\\?http://www.dedasys.com/articles/programming_language_economics.html\x012005-07-20 14:48' ...to something easily usable in a python CGI script? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Christoph Zwerschke
It seems everybody is in full agreement here. I have the same mixed feeling about letting keys/values/items become both managed list attributes and still returning copies of the lists when called in the usual way as methods. I don't know any precedent for doing things that way and i'm unsure w

Re: Which license should I use?

2005-11-25 Thread Björn Lindström
Mike Meyer <[EMAIL PROTECTED]> writes: > IANAL, but I don't believe the GPL helps in this situation. It places > conditions on redistributing the code; it doesn't force you to > redistribute modifieed code. Your employers could refuse to let you > take the code with you because they own partial co

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Christoph Zwerschke
Tom Anderson schrieb: > Maybe we should call it a 'sequenced dictionary' to fit better with > pythonic terminology? That's not such a bad idea. Note that it is called like that in the Python version of the "Programming Language Examples Alike Cookbook": http://pleac.sourceforge.net/pleac_pytho

Move xml.sax.saxutils.*?

2005-11-25 Thread [EMAIL PROTECTED]
It seems like functions such as xml.sax.saxutils.escape and unescape are generally useful, and not at all tied to the xml.sax module. Would it make sense to move them somewhere else, like to xml? I ask because it just took me 20 minutes to figure out how to escape entities in python. It's not ob

Re: Which License Should I Use?

2005-11-25 Thread Robert Kern
mojosam wrote: > I will be doing the bulk of the coding on my own time, because I need > to be able to take these tools with me when I change employers. > However, I'm sure that in the course of using these tools, I will need > to spend time on the job debugging or tweaking them. I do not want my

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Christoph Zwerschke
Mike Meyer schrieb: > Ok, how about this for dictionaries/sets: > > Any hashable object can be used as a dictionary key (set member). Immutable > objects, except for tuples that contain a non-hashable object, are > hashable. Python classes are normally hashable(1). I would be even more simple he

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Tom Anderson
On Wed, 23 Nov 2005, Christoph Zwerschke wrote: > Tom Anderson wrote: > >>> I think it would be probably the best to hide the keys list from the >>> public, but to provide list methods for reordering them (sorting, slicing >>> etc.). >> >> one with unusual constraints, so there should be a list

Re: Which License Should I Use?

2005-11-25 Thread Mike Meyer
"mojosam" <[EMAIL PROTECTED]> writes: > I will be doing the bulk of the coding on my own time, because I need > to be able to take these tools with me when I change employers. > However, I'm sure that in the course of using these tools, I will need > to spend time on the job debugging or tweaking t

Re: Persist a class (not an instance)

2005-11-25 Thread David Wahler
Kent Johnson wrote: > Is there a way to persist a class definition (not a class instance, > the actual class) so it can be restored later? A naive approach > using pickle doesn't work: [snip] > The idea is to persist classes that are created and modified at runtime. I couldn't resist the challenge

python and pymat

2005-11-25 Thread Knut Birger Lunde
Pretty new to python I have a module for python who is made for python2.2. I have the endthought version 2.3. I have dowloaded a c++ source file and a makefile to create pymat.dll. However I think the maekfile is made for cygwin, since it complains that it does not find -lpython23 . This

Re: wxPython Licence vs GPL

2005-11-25 Thread Mike Meyer
"Paul Boddie" <[EMAIL PROTECTED]> writes: > Ed Jensen wrote: > [On proprietary ports of Python...] >> Show me the harm done. > We'll have to wait and see what happens. There's a risk that versions > of Python with different semantics or characteristics to the original > could cause the development

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Tom Anderson
On Wed, 23 Nov 2005, Carsten Haese wrote: > On Wed, 2005-11-23 at 15:17, Christoph Zwerschke wrote: >> Bengt Richter wrote: >> >> > E.g., it might be nice to have a mode that assumes d[key] is >> d.items()[k][1] when >> > key is an integer, and otherwise uses dict lookup, for cases where >> the us

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Tom Anderson
On Wed, 23 Nov 2005, Christoph Zwerschke wrote: > Alex Martelli wrote: > >> However, since Christoph himself just misclassified C++'s std::map as >> "ordered" (it would be "sorted" in this new terminology he's now >> introducing), it seems obvious that the terminological confusion is >> rife. >

Re: Making immutable instances

2005-11-25 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> There isn't a standard serialize method in Python, so I don't know how >> you want to define it. >> I can think of perfectly reasonable definitions >> of serialize where obj.serialize() won't always return the

Re: How to get started in GUI Programming?

2005-11-25 Thread Bill
[EMAIL PROTECTED] wrote: > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > Googling around it seems the best GUI is either Tkinter or PyGtk. This statement is, and has been subject to much debate. If you ask 10 people on this newsgroup you'll pr

Which License Should I Use?

2005-11-25 Thread mojosam
I've been watching the flame war about licenses with some interest. There are many motivations for those who participate in this sector, so disagreements over licenses reflect those agendas. I don't have an agenda, at least not right now. I do plan on writing a few programs. These will be tools

Re: Python as Guido Intended

2005-11-25 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > Well this is, is one thing I have a problem with. > > The python people seem to be more concerned with fighting things > that could be used counter the python philosophy, than search for > things that enable working in the python philosophy. And what's w

Re: How to get started in GUI Programming?

2005-11-25 Thread BartlebyScrivener
Search this group for PythonCard and wxPython for many posts on this subject. Also see the following link for descriptions of other alternatives: http://www.fredshack.com/docs/python.html bs -- http://mail.python.org/mailman/listinfo/python-list

Re: Singleton and C extensions

2005-11-25 Thread Scott David Daniels
Emmanuel Briot wrote: > I am participating in the development of a GPL IDE >https://libre2.adacore.com/gps/ > I am not really good at python, but I was trying to implement the > singleton design pattern in C, so that for instance calling the constructor >ed = Editor ("foo") Fredrik's advic

Re: Python as Guido Intended

2005-11-25 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > Op 2005-11-24, Mike Meyer schreef <[EMAIL PROTECTED]>: >> Antoon Pardon <[EMAIL PROTECTED]> writes: The usual response is "That's not the Python way." That's not calling someone dumb, just pointing out that they don't yet fully understand t

Re: Why is dictionary.keys() a list and not a set?

2005-11-25 Thread Mike Meyer
Christoph Zwerschke <[EMAIL PROTECTED]> writes: > As a general note, I think it would be good to place the exact > description in a footnote, since speaking about hashable objects, > __hash__ and __cmp__ will certainly frighten off newbies and make it > hard to read even for experienced users. The

Re: books: Dive into Python vs Beginning Python

2005-11-25 Thread Franck PEREZ
On 11/25/05, Sebastien Douche <[EMAIL PROTECTED]> wrote: > On 11/25/05, Franz Mueller <[EMAIL PROTECTED]> wrote: > > Hi, > > Hi Franz! :) > > > which of the following books would you recommend: > > "Dive into Python" or "Beginning Python: From Novice to Professional"? > > Both are very good books b

Re: How to get started in GUI Programming?

2005-11-25 Thread malv
I suggest you take a look at Qt3, much superior to Tkinter or PyGtk. With Python, you have to use PyQt bindings. [EMAIL PROTECTED] wrote: > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > I am not an experienced programmer - just someone who fro

Re: How to get started in GUI Programming?

2005-11-25 Thread Thomas Guettler
Am Fri, 25 Nov 2005 06:02:40 -0800 schrieb peter.mosley: > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > Yes, if you come from Visual Basic you might be missing something. I developed with Visual Basic some time ago and like some parts of it.

Re: Dynamic classes

2005-11-25 Thread Piet van Oostrum
> "Dave Rose" <[EMAIL PROTECTED]> (DR) wrote: >DR> Hello all. >DR> I was wondering if creating classes could be dynamic. I want to know >DR> if I can make a class Person, then read in a list of names (say >DR> people's names) so then I can have a class instance created for each >DR> name in

Re: books: Dive into Python vs Beginning Python

2005-11-25 Thread Sebastien Douche
On 11/25/05, Franz Mueller <[EMAIL PROTECTED]> wrote: > Hi, Hi Franz! :) > which of the following books would you recommend: > "Dive into Python" or "Beginning Python: From Novice to Professional"? Both are very good books but I suggest the latter because more recent. Beginning Python talk pytho

Re: books: Dive into Python vs Beginning Python

2005-11-25 Thread Aahz
In article <[EMAIL PROTECTED]>, Franz Mueller <[EMAIL PROTECTED]> wrote: > >which of the following books would you recommend: >"Dive into Python" or "Beginning Python: From Novice to Professional"? > >I'm an experienced C++-programmer who wants to take a look at Python. Another option: just use th

Re: Persist a class (not an instance)

2005-11-25 Thread Alex Martelli
Kent Johnson <[EMAIL PROTECTED]> wrote: > Is there a way to persist a class definition (not a class instance, the > actual class) so it can be restored later? A naive approach using pickle > doesn't work: You can use copy_reg to customize pickling behavior. In this case, you'd need a custom meta

Re: Dynamic classes

2005-11-25 Thread Alex Martelli
Dave Rose <[EMAIL PROTECTED]> wrote: > Hello all. > I was wondering if creating classes could be dynamic. I want to know if I > can make a class Person, then read in a list of names (say people's names) > so then I can have a class instance created for each name in the list? Yes, but what you'

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Alex Martelli
Fuzzyman <[EMAIL PROTECTED]> wrote: ... > If you slice an ordered dictionary, I assume you would expect to get an > ordered dictionary back ? That would be helpful, yes, though there are precedents for types whose slicing doesn't return an instance of that type (e.g. slices of an mmap are insta

Re: wxPython Licence vs GPL

2005-11-25 Thread Christophe
Ed Jensen a écrit : >>Well, despite your protestations, I think the GPL and LGPL are fairly >>easy and safe choices for a lot of developers who know enough about >>Free Software (ie. haven't just seen the name and thought "that's the >>thing for me"), know what the characteristics of those licences

Re: How to get started in GUI Programming?

2005-11-25 Thread David Boddie
[EMAIL PROTECTED] wrote: > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > I am not an experienced programmer - just someone who from time to > time writes small programs for my use. Over the years I have moved > from GWBASIC to QBASIC to Visual

Re: wxPython Licence vs GPL

2005-11-25 Thread Ed Jensen
Paul Boddie <[EMAIL PROTECTED]> wrote: > We'll have to wait and see what happens. There's a risk that versions > of Python with different semantics or characteristics to the original > could cause the development of parallel communities, instead of > everyone working on/with the same project. The "

Re: Python as Guido Intended

2005-11-25 Thread Bryan
> But suppose someone came up with a Python compiler. It > would compile any Python program but there would be no > speed benefit unless you carefully wrote the code to not use > many of Python's dynamic features, so that either by type > inferencing or programmer supplied static declarations, th

Re: (newbie) N-uples from list of lists

2005-11-25 Thread [EMAIL PROTECTED]
This is my attempt : def cross(seq): r=[[]] for x in seq: r = [ a + b for a in r for b in [[i] for i in x ]] return r It is not very efficient though as it would loop through the intermediate list produced multiple times. [EMAIL PROTECTED] wrote: > Hello, > > i think it coul

Re: How to get started in GUI Programming?

2005-11-25 Thread BartlebyScrivener
Search this group for PythonCard and wxPython for gobs of opinions. For descriptions of other resources, try: http://www.fredshack.com/docs/python.html bs -- http://mail.python.org/mailman/listinfo/python-list

Modifying Unix ReadKey Code

2005-11-25 Thread Dustan
I found this site that has code for readkey for Windows, Unix, and in an updated version, Mac: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/134892 . The Mac object returns a character whether or not a key was pressed. I modified the Windows object to do the same when I downloaded it, b

Re: Persist a class (not an instance)

2005-11-25 Thread Sybren Stuvel
Kent Johnson enlightened us with: > OK that confirms that pickle won't work. Is there another approach > that will? Well, since the classes are created at runtime as well, you could compile them using the appropriate API and call exec() on them. Sybren -- The problem with the world is stupidity.

Re: How to get started in GUI Programming?

2005-11-25 Thread flamesrock
The best, in my opinion is wxPython. I recommend getting wxGlade and just fiddling around. You should be able to produce some interesting GUI's fairly easily. -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over TLS

2005-11-25 Thread David Isaac
"Carl Waldbieser" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone know of any good examples for writing client side code to upload > files over a secure FTP connection? http://trevp.net/tlslite/ Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as Guido Intended

2005-11-25 Thread EP
> Should the priority be to enable python's philosophy or should > it be the priority to limit python to only allow it's philosophy. > > One groups seems to think that python's spirit is not broken > by allowing things that seem counter to it, as long as people > can without much trouble, work wi

Re: How to get started in GUI Programming?

2005-11-25 Thread pdalet
If you come from visual basic, I suggest to use pythoncard GUI, which is very simple to develop with a Ressource Editor (create a panel, see labwindows, visual basic ..). https://sourceforge.net/projects/vb2py/ a package to transform VB to pythoncard http://www.linux2000.com/pimp.html a pythoncar

Re: How to get started in GUI Programming?

2005-11-25 Thread UrsusMaximus
Hello Peter, I am going to recommend EasyGui which can be found at http://www.ferg.org/easygui/ because it is (by far) the easiest possible GUI creation tool using Python. If (or when) your needs require more complex options than easygui provides, you might try looking at my GUI toolkits page, ht

  1   2   >