Guppy-PE: A Python Programming Environment

2005-11-25 Thread [EMAIL PROTECTED]
I would like to announce Guppy-PE 0.1 The first version of Guppy-PE, a programming environment providing object and heap memory sizing and analysis and comes with a prototypical specification language that can be used to formally specify aspects of Python programs and generate tests and

Re: ftplib question - ftp.dir() returns something and ftp.nlst() does not

2005-11-25 Thread Nico Grubert
add ftp.set_debuglevel(3) so you can see what the goes on the wire (without that information, it's hard to tell if it's a bug in the library or a glitch in your server). /F Hello Fredrik , thank you for your reply. I did a ftp.set_debuglevel(3) and ftp.nlst() now prints:

Re: defining the behavior of zip(it, it) (WAS: Converting a flatlist...)

2005-11-25 Thread Fredrik Lundh
Steve Holden wrote: Now, see, that's the thing. The more ways there are to write the same program, the harder any given program will be to understand. This is indeed a fairly deliberate approach in the Python world, and contrasts with languages where readability is low because of the

Re: defining the behavior of zip(it, it) (WAS: Converting a flat list...)

2005-11-25 Thread Steve Holden
Magnus Lycka wrote: [EMAIL PROTECTED] wrote: Oh, find a need to shut other up ? Oh, find a need to get the last word? /Magnus P.S. Yes, this *is* a test. Looks like you hooked him, Magnus ;-) -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

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

2005-11-25 Thread [EMAIL PROTECTED]
Duncan Booth wrote: [EMAIL PROTECTED] wrote: As for the (k,v) vs (v,k), I still don't think it is a good example. I can always use index to access the tuple elements and most other functions expect the first element to be the key. For example : a=d.items() do something about a b =

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Fuzzyman
Christoph Zwerschke wrote: Fuzzyman schrieb: d.keys() will still return a copy of the list, so d.keys()[i] will still be slower than d.sequence[i] Right, I forgot that. Bengt suggested to implement __call__ as well as __getitem__ and __setitem__ for keys, values and items. In this

Re: Draw a triangle...

2005-11-25 Thread Fredrik Lundh
The Eternal Squire wrote: PyGame is your best bet for pure graphics. Simple shapes can be done in just a few statements. the same applies to Tkinter, of course. from Tkinter import * # set things up c = Canvas(); c.pack() # draw stuff c.create_polygon((0, 100, 50, 0,

Re: Python as Guido Intended

2005-11-25 Thread Antoon Pardon
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 the Python way. That is not the Python way, is just saying

Re: defining the behavior of zip(it, it) (WAS: Converting a flat list...)

2005-11-25 Thread [EMAIL PROTECTED]
Steve Holden wrote: Magnus Lycka wrote: [EMAIL PROTECTED] wrote: Oh, find a need to shut other up ? Oh, find a need to get the last word? /Magnus P.S. Yes, this *is* a test. Looks like you hooked him, Magnus ;-) and he is permenantly hooked --

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Christoph Zwerschke
Le ruego me perdone. replace('haber', random.choice('tener', 'hacer', 'lograr')) Mi espanol es peor que mi python. -- Christoph -- http://mail.python.org/mailman/listinfo/python-list

Re: return in loop for ?

2005-11-25 Thread Steve Holden
Steven D'Aprano wrote: On Thu, 24 Nov 2005 12:51:34 +, Duncan Booth wrote: Steven D'Aprano wrote: While outwardly they apear to offer a technique for making software more reliable there are two shortcomings I'm leery of. First, no verification program can verify itself; That's not a

Re: ftplib question - ftp.dir() returns something and ftp.nlst() does not

2005-11-25 Thread Fredrik Lundh
Nico Grubert wrote: *cmd* 'NLST' *put* 'NLST\r\n' *get* '150 About to open data connection.\r\n' *resp* '150 About to open data connection.' *retr* '' *get* '226 Transfer complete.\r\n' *resp* '226 Transfer complete.' [] it's not obvious how Python could translate '' to anything other

Re: Python as Guido Intended

2005-11-25 Thread Antoon Pardon
Op 2005-11-24, Mike Meyer schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] writes: [EMAIL PROTECTED] writes: Different programming styles are appropriate for different tasks, different times and different places, different people. And like morality,

Re: Python as Guido Intended

2005-11-25 Thread Antoon Pardon
Op 2005-11-24, Delaney, Timothy (Tim) schreef [EMAIL PROTECTED]: And this is the crux of it - the majority of such proposals come from people who apparently haven't actually used python that much, and are trying to impose things from other languages onto it. There's nothing wrong with

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Fuzzyman
Sure - that was just an example of mutating the keys list without having direct access to it. If keys was implemented as an object (with a ``__call__`` method) then we could also implement sequence methods on it - making it easier to mutate the keys/values/items directly. All the best, Fuzzyman

problem compiling executable with py2exe

2005-11-25 Thread tim
I wrote this very simple program that checks a directory and makes a list of files that surpass a given size. I tried to compile it using py2exe. I used py2exe before with more complex programs without any problem. Now, although my program works fine when I run it from PythonWin, it won't compile

Re: Guification of console app

2005-11-25 Thread Steve Holden
metiu wrote: Say I have a console app that does something in three steps: - opens a file - transfers the file through a serial port - does some elaborations and I want to build a GUI around it that, for example, sets the file name to open or starts the different steps. I started using

Re: Python as Guido Intended

2005-11-25 Thread [EMAIL PROTECTED]
Antoon Pardon wrote: Op 2005-11-24, Mike Meyer schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] writes: [EMAIL PROTECTED] writes: Different programming styles are appropriate for different tasks, different times and different places, different people.

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

2005-11-25 Thread Christoph Zwerschke
[EMAIL PROTECTED] schrieb: And this, again from the doc(about mapping objects): A mapping object maps immutable values to arbitrary objects. Seems that is questionable too. a=(1,[]) d={} d[a]=1 again would give TypeError, list object are unhashable. That's a good example showing that the

Re: Guification of console app

2005-11-25 Thread metiu
Yes, I'll try to give you an example: you have a compression utility that works as a standard *nix filter, so it takes something from stdin and gives it back compressed to stdout you like to use it as such, because it's nice to call it from the command line now someone finds your utility quite

Problem with HtmlWindow and Widgets

2005-11-25 Thread radek_ne
Hello I have problem with HtmlWindow and Widgets (wxPython). When I put on HtmlWindow TextCtrl all is ok, but when I try to use ComboBox then all controls not refresh. Where is problem? Thenks for help and sorry for my english ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Fuzzyman
Alex Martelli wrote: Fuzzyman [EMAIL PROTECTED] wrote: There is already an update method of course. :-) Slicing an ordered dictionary is interesting - but how many people are actually going to use it ? (What's your use case) I detest and abhor almost-sequences which can't be sliced (I

Re: sending all key events to wx.panel?

2005-11-25 Thread Steve Holden
KvS wrote: Hi all, I have a wxPython GUI consisting of a wxWindow - wxPanel - set of widgets. I need to catch pressed keys no matter which widget has focus, so I've attached an event handler to the panel but I can't seem to find a way to do some kind of collective sending through of the key

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Fuzzyman
Sure - that was just an example of mutating the keys list without having direct access to it. If keys was implemented as an object (with a ``__call__`` method) then we could also implement sequence methods on it - making it easier to mutate the keys/values/items directly. All the best, Fuzzyman

Re: Draw a triangle...

2005-11-25 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: The Eternal Squire wrote: PyGame is your best bet for pure graphics. Simple shapes can be done in just a few statements. the same applies to Tkinter, of course. from Tkinter import * # set things up c = Canvas(); c.pack() # draw stuff

Re: Making immutable instances

2005-11-25 Thread Paul Rubin
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. Well, consider pickle, for example. I can think of perfectly reasonable definitions of serialize where obj.serialize() won't always return the same string on an

Re: Making immutable instances

2005-11-25 Thread [EMAIL PROTECTED]
Paul Rubin wrote: Fair enough. How's this: a = ImmutableObject() b = deepcopy(a) assert a == b # a and b start out equal do stuff # since a and b are immutable, they should still be equal # no matter what has happened above assert a == b If you've added

Re: return in loop for ?

2005-11-25 Thread Steve Holden
Steven D'Aprano wrote: On Thu, 24 Nov 2005 12:51:34 +, Duncan Booth wrote: Steven D'Aprano wrote: While outwardly they apear to offer a technique for making software more reliable there are two shortcomings I'm leery of. First, no verification program can verify itself; That's not a

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

2005-11-25 Thread Christoph Zwerschke
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 main text may lie/simplyfy a little bit. Or as

Re: Guification of console app

2005-11-25 Thread Fredrik Lundh
metiu wrote: you have a compression utility that works as a standard *nix filter, so it takes something from stdin and gives it back compressed to stdout you like to use it as such, because it's nice to call it from the command line now someone finds your utility quite nice, and says it

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

2005-11-25 Thread Ben Sizer
Magnus Lycka wrote: This won't help if we have problems keeping the whole structure / call graph in memory at one time. Ah, I had assumed that the main problem was just that the resulting DOM was too big. Still, I don't think there would be a problem if you just constructed a very small tree

Re: ftplib question - ftp.dir() returns something and ftp.nlst() does not

2005-11-25 Thread Nico Grubert
it's not obvious how Python could translate '' to anything other than an empty list, so it sure looks like a server issue. (or is a problem with running in passive mode? can you test with- out using passive mode on the same server?) I thought using ftp.set_pasv(0) sets active mode so I

Re: Python as Guido Intended

2005-11-25 Thread Ben Sizer
Delaney, Timothy (Tim) wrote: It is without a doubt though incumbent on anyone proposing new *features* to have a solid understanding of what they are proposing, what it would affect, any backwards incompatibilities, and whether it fits into the python philosophy (import this). Sure. However,

Re: Why are there no ordered dictionaries?

2005-11-25 Thread Christoph Zwerschke
Fuzzyman wrote: That means making keys, values, and items custom objects. Creating a new instance would have the overhead of creating 4 new objects instead of just 1. Is the added convenience worth it ? (Plus the extra layers of method calls for each access). I'm not sure about that either.

books: Dive into Python vs Beginning Python

2005-11-25 Thread Franz Mueller
Hi, 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. Thanks, Franz -- http://mail.python.org/mailman/listinfo/python-list

How to use _ in interactive mode

2005-11-25 Thread pythonic
Hi, I use '_' for localization in my program. The problem is when testing the program using python intractive mode I lose _ function. One solution is put following in PYTHONSTARTUP file. -- import readline def __enforce_underscore__ (): __builtins__._ = str readline.set_pre_input_hook

Python book for a non-programmer

2005-11-25 Thread Simon Brunning
I have a non-programming friend who wants to learn Python. It's been so long since I've been in her shoes that I don't feel qualified to judge the books aimed at people in her situation. I know of two such books: http://www.freenetpages.co.uk/hp/alan.gauld/ http://www.ibiblio.org/obp/thinkCSpy/

Re: Python as Guido Intended

2005-11-25 Thread Fredrik Lundh
Ben Sizer wrote: The problem you get, is that the only people who are ever likely to need to ask questions, are those who don't fully understand Python, by definition. really? I'd say that most people that ask questions on comp.lang.python do understand Python pretty well, and just needs

Re: Python book for a non-programmer

2005-11-25 Thread shane . mitchell
http://www.python.org/doc/Intros.html and two great texts when she has covered the basics are: http://diveintopython.org/ http://www.mindview.net/Books/TIPython -- http://mail.python.org/mailman/listinfo/python-list

Re: problem compiling executable with py2exe

2005-11-25 Thread Fredrik Lundh
tim [EMAIL PROTECTED] wrote: I used py2exe before with more complex programs without any problem. Now, although my program works fine when I run it from PythonWin, it won't compile to an executable. are you sure you're generating a console executable? your program needs access to the

Re: Python book for a non-programmer

2005-11-25 Thread BartlebyScrivener
Simon Brunning wrote: I have a non-programming friend who wants to learn Python. It's been so long since I've been in her shoes that I don't feel qualified to judge the books aimed at people in her situation. I know of two such books: http://www.freenetpages.co.uk/hp/alan.gauld/

Re: sending all key events to wx.panel?

2005-11-25 Thread KvS
I've tried, by setting self.Bind(wx.EVT_CHAR, self.handleKeybEv, self) in the top level frame, but still this only works if the panel has focus and not if e.g. a button on the panel has focus while a key is pressed... In the meantime I found this: In some cases, it might be desired by the

Stealing focus: emacs, and PIL, in Windows

2005-11-25 Thread damonwischik
I'm using GNU Emacs 21.3.1 with python-mode 1.0alpha under Windows XP. Whenever I execute a command in an edit window (with py-execute-region), the output window steals the focus. How can I stop this happening? I don't know any lisp, but I hacked together this routine so that that when I press

Stealing focus: PIL

2005-11-25 Thread damonwischik
I'm using the Python Image Library (PIL) for Python 2.4. If I have an image and I show it from PIL import Image im = Image.new('RGB',100,100) im.show() then the output window steals focus. It's very handy to use an image to show the progress of execution for my program, but the computer is

Re: Guification of console app

2005-11-25 Thread metiu
I like it! Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: books: Dive into Python vs Beginning Python

2005-11-25 Thread bruno at modulix
Franz Mueller wrote: Hi, which of the following books would you recommend: Dive into Python or Beginning Python: From Novice to Professional? I can't recommand the second since I've never read it. But you can freely make your own opinion on the first, since it's freely available online.

Re: Python book for a non-programmer

2005-11-25 Thread Simon Brunning
On 25 Nov 2005 03:23:33 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: http://www.python.org/doc/Intros.html and two great texts when she has covered the basics are: http://diveintopython.org/ http://www.mindview.net/Books/TIPython I wouldn't have thought either of those was suitable

Re: Python book for a non-programmer

2005-11-25 Thread Luis M. Gonzalez
Read my reply here from another thread: http://groups.google.com/group/comp.lang.python/browse_thread/thread/25aada3c22ce6e66/cc69fd0c78384e5b?q=luis+cogliati'srnum=1#cc69fd0c78384e5b -- http://mail.python.org/mailman/listinfo/python-list

Singleton and C extensions

2005-11-25 Thread Emmanuel Briot
I am participating in the development of a GPL IDE https://libre2.adacore.com/gps/ It is written in Ada, but provides an extensive extensibility through Python. 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

Re: Guification of console app

2005-11-25 Thread Chris Mellon
On 11/25/05, Fredrik Lundh [EMAIL PROTECTED] wrote: metiu wrote: you have a compression utility that works as a standard *nix filter, so it takes something from stdin and gives it back compressed to stdout you like to use it as such, because it's nice to call it from the command line

Persist a class (not an instance)

2005-11-25 Thread Kent Johnson
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: import pickle class Foo(object): ... def show(self): ... print I'm a Foo ... p = pickle.dumps(Foo) p

Re: Python book for a non-programmer

2005-11-25 Thread Shane
Simon Brunning wrote: I wouldn't have thought either of those was suitable for a non-programmer. Great for cross-trainers, yes, but neither is intended as a programming tutorial. I agree, I just thought that the other replies had provided more than enough resources to cover the basics, so I

How to get started in GUI Programming?

2005-11-25 Thread peter . mosley
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 Basic, and now trying to move

Re: Singleton and C extensions

2005-11-25 Thread Fredrik Lundh
Emmanuel Briot wrote: I am participating in the development of a GPL IDE https://libre2.adacore.com/gps/ It is written in Ada, but provides an extensive extensibility through Python. I am not really good at python, but I was trying to implement the singleton design pattern in C, so that

Re: How to get started in GUI Programming?

2005-11-25 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: Googling around it seems the best GUI is either Tkinter or PyGtk. I'd go for wxPython ;-) Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of

Re: wxPython Licence vs GPL

2005-11-25 Thread Paul Boddie
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 of parallel communities, instead of everyone

Help need

2005-11-25 Thread sr_sutar
HI group, During doing some codeing with python i got the inline error, def my_word( offset ): try: j = ord(t[offset]) + 256*ord(t[offset+1])# + 65536*ord(t [offset+2]) + 16777216*ord(t[offset+3]) #return j except IndexError: # print Exception return j

Re: Persist a class (not an instance)

2005-11-25 Thread Sybren Stuvel
Kent Johnson enlightened us with: Is there a way to persist a class definition (not a class instance, the actual class) so it can be restored later? From the docs: Similarly, classes are pickled by named reference, so the same restrictions in the unpickling environment apply. Note that none of

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: Python as Guido Intended

2005-11-25 Thread Paul Boddie
[EMAIL PROTECTED] wrote: And exactly what is python's spirit/philosophy ? It seems to me that they are often used in a liberal way, just to support one's argument that whatever is not in the CURRENT python should not be there. Yes, those contentious terms pythonic and unpythonic which, as

Accessing Outlook Public Folders

2005-11-25 Thread Bob
Hi, I'm new to Python and I want to create a script that will import contactitems into an Outlook Public Folder. Therefore I've installed the Python for Windows Extensions. This way I can access my personal contacts code import win32com.client OutlookObj =

Re: How to get started in GUI Programming?

2005-11-25 Thread Peter Decker
On 11/25/05, Sybren Stuvel [EMAIL PROTECTED] I'd go for wxPython ;-) I'd go for Dabo, which is a Pythonic wrapper around wxPython. They are even working on a visual design tool to lay out your UI, much as you would in Visual Basic. -- # p.d. --

Re: Python book for a non-programmer

2005-11-25 Thread Kent Johnson
Simon Brunning wrote: I have a non-programming friend who wants to learn Python. It's been so long since I've been in her shoes that I don't feel qualified to judge the books aimed at people in her situation. Python Programming for the absolute beginner

Re: How to get started in GUI Programming?

2005-11-25 Thread Szabolcs Nagy
have you tried gtk.MessageDialog ? http://www.pygtk.org/pygtk2reference/class-gtkmessagedialog.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Help need

2005-11-25 Thread Steve Holden
sr_sutar wrote: HI group, During doing some codeing with python i got the inline error, def my_word( offset ): try: j = ord(t[offset]) + 256*ord(t[offset+1])# + 65536*ord(t [offset+2]) + 16777216*ord(t[offset+3]) #return j except IndexError: #

Re: Python book for a non-programmer

2005-11-25 Thread Steve
I recommend The Quick Python Book by Daryl Harms. What makes it different from all other introductory books is that it is actually *readable*. You can just sit down and read it like a novel and enjoy it. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread Steve
Can anyone offer any suggestions as to the least painful way forwards? http://www.ferg.org/easygui/index.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Persist a class (not an instance)

2005-11-25 Thread Kent Johnson
Sybren Stuvel wrote: Kent Johnson enlightened us with: Is there a way to persist a class definition (not a class instance, the actual class) so it can be restored later? From the docs: Similarly, classes are pickled by named reference, so the same restrictions in the unpickling

Dynamic classes

2005-11-25 Thread Dave Rose
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? Why do I want to do this? I was just thinking if I had a

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,

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

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 within

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

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,

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

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 could

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

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 harm

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 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 are, and

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

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

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

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 the on-line

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

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 the list? If you

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

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 but I suggest the

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 main

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 the Python way. That

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

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

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

Re: Making immutable instances

2005-11-25 Thread Mike Meyer
Paul Rubin http://[EMAIL PROTECTED] 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 same string

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

  1   2   >