ReSend: ANN: EasyGuider 0.1 Released!

2005-12-14 Thread limodou
I'm sorry for resend the letter again. Because the whole project is rename to a new name. = What's it = It's a GUI toolkit based on wxPython. So if you want to use it you need to install wxPython on your box. The main idea of it is Data Driven. Because I found many times, what I want just a GUI

Re: 0 in [True,False] returns True

2005-12-14 Thread Antoon Pardon
Op 2005-12-13, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-12-13, Chris Mellon schreef [EMAIL PROTECTED]: [...] If you have a consistent API and you're checking for error values from your GTK functions, then you already have a lot more code than using 2 varaibles will

Windows Services

2005-12-14 Thread Mondal
Hi, Can anybody tell me how to develop Windows Services (which are actually daemons) using Python. Also what protocol is most suitable for developing a server-client application with the server running as a Windows Service. Thanks in advance Bye --

Re: IsString

2005-12-14 Thread Steven D'Aprano
Mike Meyer wrote: So Python behaves demonstrably different from BOTH call by value and call by reference. Consequently, it is neither of them. Right. *Python* behaves differently. That's not the same thing as Python's calling behaving differently. If you choose objects that are behave the

Re: 0 in [True,False] returns True

2005-12-14 Thread Steve Holden
Antoon Pardon wrote: Op 2005-12-13, Steve Holden schreef [EMAIL PROTECTED]: [...] But lets make an effort to make the code more readable. What about the following suggestion. I use a kind of EnumType with two values: NotRegistered and Registerd. And the name of the type is NotConnected. So I can

Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread [EMAIL PROTECTED]
I am writing a C extension with python 2.3.5 and need constructs similar to python func(*args, **kwds) What's a neat way to do that? I found pyrex has a __Pyx_GetStarArgs - is there something I'm missing from the regular C/API maybe using one of the PyArg_Parse.. calls ? Thanks, M. --

Re: ActivePython and Amara

2005-12-14 Thread Steve Holden
Jay wrote: Ok, ok, i over-reacted. When first reading it seemed as an attack and i quickly put up a defense because i dont like being attacked for no reason. I was actually quite obnoxious and i apoligize. And again, thx James for pointing that out. Once again, i apoligize for my actions

Re: writing a Mail Server

2005-12-14 Thread Manlio Perillo
[EMAIL PROTECTED] ha scritto: Hello, I have to implement a mail server type program for a project using python. I have already implemented smtp and pop3 protocol to send and retrieve mail at the client side. I used an existing mail server account to test the code. Now, I need to write the

Re: 0 in [True,False] returns True

2005-12-14 Thread bonono
Steve Holden wrote: It would be somewhat more self-documenting, but why not just use one name to indicate the state and another, only meaningful in certain states, to indicate the callback? Why should I do that? Checking the type of a variable is conceptually no different form testing

Re: Still Loving Python

2005-12-14 Thread Steve Holden
Mike Meyer wrote: Peter Decker [EMAIL PROTECTED] writes: A GUI builder is more pleasant to work with, at least with a good one like Delphi or Qt designer. That is your opinion, and I'm sure it's true for you. It isn't true for me. Why, then, do you disparage those who like to do things

Re: 0 in [True,False] returns True

2005-12-14 Thread Antoon Pardon
Op 2005-12-14, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: It would be somewhat more self-documenting, but why not just use one name to indicate the state and another, only meaningful in certain states, to indicate the callback? Why should I do that? Checking the type of

Re: OO in Python? ^^

2005-12-14 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: Magnus Lycka wrote: The static typing means that you either have to make several implementations of many algorithms, or you need to work with those convoluted templates that were added to the language as an afterthought. I don't see this in Haskell. No, I was

Re: Developing a network protocol with Python

2005-12-14 Thread Laszlo Zsolt Nagy
Try Pyro http://pyro.sourceforge.net before rolling your own Python-specific protocol. You are right. I wanted to use pyro before, because it is well tested and it has nice features. Unfortunately, it is not good for me. :-( I already have my own classes. My objects are in object ownership

Re: Still Loving Python

2005-12-14 Thread Steve Holden
Alex Martelli wrote: Jérôme Laheurte [EMAIL PROTECTED] wrote: ... Sorry for the harsh tone, I just think GUI builders are *evil*. Except maybe for QT Designer, which has a nice model where you implement callbacks by subclassing the generated classes. At least you don't have to look at the

Re: OO in Python? ^^

2005-12-14 Thread bonono
Magnus Lycka wrote: I don't really know Haskell, so I can't really compare it to Python. A smarter compiler can certainly infer types from the code and assemble several implementations of an algorithm, but unless I'm confused, this makes it difficult to do the kind of dynamic linking / late

Re: Developing a network protocol with Python

2005-12-14 Thread Paul Rubin
Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: I already have my own classes. My objects are in object ownership trees, and they are referencing to each other (weakly and strongly). These classes have their own streaming methods, and they can be pickled safely. Standard warning: if you're

Re: How do (not) I distribute my Python progz?

2005-12-14 Thread Ben Sizer
Tolga wrote: Let's suppose that I have written a Python program and, of course, want to show it to the world ;-) So, do I have to distrubute my source code? Or is there a way to hide my code? Suggested solutions to this in the past have including using Py2exe (or something like it) to create

Re: newbie-one more example of difficulty in van Rossum's tutorial

2005-12-14 Thread Steve Holden
[EMAIL PROTECTED] wrote: Thanks Brian, now I get it. BTW there is no fuzzuness in your explanaition it is crystal clear. You might also want to note that name-mangling and the reason for it are pretty advanced topics for an introductory tutorial. Having got thus far, further learning might

Re: IsString

2005-12-14 Thread Ben Sizer
Steven D'Aprano wrote: def modify_in_place(obj): Modify an arbitrary object in place. obj = None x = [1, 2, 3] # mutable object modify_in_place(x) assert x is None Doesn't work either. To be fair, this isn't because the function is not pass by reference, but because the

Re: writing a Mail Server

2005-12-14 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hello, I have to implement a mail server type program for a project using python. I have already implemented smtp and pop3 protocol to send and retrieve mail at the client side. I used an existing mail server account to test the code. Now, I need to write the

Re: Puzzling output when executing .pyc file directly

2005-12-14 Thread Steve Holden
Steven D'Aprano wrote: I created a simple test file called tester.py: def dostuff(obj): print Doing stuff with %s now... % obj return len(str(obj)) x = things if __name__ == __main__: print dostuff(x) imported it into Python, then exited the current Python session.

const objects (was Re: Death to tuples!)

2005-12-14 Thread Gabriel Zachmann
I was wondering why python doesn't contain a way to make things const? If it were possible to declare variables at the time they are bound to objects that they should not allow modification of the object, then we would have a concept _orthogonal_ to data types themselves and, as a by-product,

Re: OO in Python? ^^

2005-12-14 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: Magnus Lycka wrote: I don't really know Haskell, so I can't really compare it to Python. A smarter compiler can certainly infer types from the code and assemble several implementations of an algorithm, but unless I'm confused, this makes it difficult to do the kind of

Re: how can i change the default python?

2005-12-14 Thread [EMAIL PROTECTED]
Thanks for the hint Xavier. I made the default interpreter ipython. # rm /usr/bin/python # ln -s /usr/bin/python2.4-ipython /usr/bin/python ipython is better i think .. and another question; When i type sudo aptitude install python-jabber for example, it brings the python2.3-jabber package. But

Re: List text files showing LFs and expanded tabs (was: Colorize expanded tabs)

2005-12-14 Thread qwweeeit
Hi Gene, thank you for your reply, also if my post was meant to be only an exercise to apply color to lfs and expanded tabs in listing files and not to apply it to an editor. However your comment has directed me to consider more deeply other editors (I use kwrite). I am inclined to change to vim

Re: OO in Python? ^^

2005-12-14 Thread bonono
Magnus Lycka wrote: [EMAIL PROTECTED] wrote: Magnus Lycka wrote: I don't really know Haskell, so I can't really compare it to Python. A smarter compiler can certainly infer types from the code and assemble several implementations of an algorithm, but unless I'm confused, this makes it

definition of 'polymorphism' and python

2005-12-14 Thread Gabriel Zachmann
I understand the Wikipedia article on Polymorphism ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 ) that it doesn't make sense to talk about polymorphism in a fully dynamically typed language -- does the Python community agree? cheers, gabriel. --

Re: How do (not) I distribute my Python progz?

2005-12-14 Thread Juergen Kareta
Hi Steven, For many purposes, you can just distribute the .pyc compiled byte-code. That will discourage the casual user from reading the source code, but of course a serious programmer will be able to disassemble the .pyc code very easily. very easily ? I tried it with my own code a year

Re: OO in Python? ^^

2005-12-14 Thread bonono
Magnus Lycka wrote: Assume that you didn't use Python, but rather something with static typing. How could you make a module such as my_module.py, which is capable of working with any type that supports some standard copy functionality and the +-operator? The following is a very short Haskell

Re: definition of 'polymorphism' and python

2005-12-14 Thread Kay Schluehr
Gabriel Zachmann wrote: I understand the Wikipedia article on Polymorphism ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 ) that it doesn't make sense to talk about polymorphism in a fully dynamically typed language -- does the Python community agree? Maybe you should

Re: Still Loving Python

2005-12-14 Thread Bengt Richter
On Tue, 13 Dec 2005 20:33:36 -0500, Mike Meyer [EMAIL PROTECTED] wrote: Peter Maas [EMAIL PROTECTED] writes: Mike Meyer schrieb: I agree. I've tried a number of different gui builders. I find it much faster to type something like: ui.add_button(New, self.new) ui.add_button(Open,

Re: Developing a network protocol with Python

2005-12-14 Thread Laszlo Zsolt Nagy
Paul Rubin wrote: Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: I already have my own classes. My objects are in object ownership trees, and they are referencing to each other (weakly and strongly). These classes have their own streaming methods, and they can be pickled safely. Standard

Re: const objects (was Re: Death to tuples!)

2005-12-14 Thread Steven D'Aprano
On Wed, 14 Dec 2005 10:57:05 +0100, Gabriel Zachmann wrote: I was wondering why python doesn't contain a way to make things const? If it were possible to declare variables at the time they are bound to objects that they should not allow modification of the object, then we would have a

Re: ActivePython and Amara

2005-12-14 Thread James
If you are having problems installing Amara, ElementTree is another option http://effbot.org/downloads/elementtree-1.2.6-20050316.win32.exe from elementtree import ElementTree as ET from urllib import urlopen rss = ET.parse(urlopen('index.xml')) title = rss.find('//channel/title').text articles

Re: ActivePython and Amara

2005-12-14 Thread James
OK! The story so far ... You wanted to parse an RSS feed and wanted a simple library. You tried Amara. The binary installer had a problem. Not sure what was the issue with installing the source via distutils. Since you have way too many options to do this, it is probably better to switch to

Re: PyQt not working well on Mac OS X

2005-12-14 Thread Dan Sommers
On 13 Dec 2005 19:03:47 -0800, Michael McGarry [EMAIL PROTECTED] wrote: Hi, I am running a Python/Qt app I developed that runs flawlessly in Linux on my Mac. It is unfortunate not running properly on the Mac OS X. The window will not come into focus and is grayed out. Does anyone have any

Re: Amara (XML) problem on Solaris

2005-12-14 Thread Doru-Catalin Togea
On Wed, 14 Dec 2005, Alan Franzoni wrote: Also, are you sure the code is correct? I've taken a peek at the Amara's website, and the create_document() function seems to lie within the binderytools module. I think the line should look like: depending on the way you imported the module, but

Re: How do (not) I distribute my Python progz?

2005-12-14 Thread Steven D'Aprano
On Wed, 14 Dec 2005 11:41:25 +0100, Juergen Kareta wrote: Hi Steven, For many purposes, you can just distribute the .pyc compiled byte-code. That will discourage the casual user from reading the source code, but of course a serious programmer will be able to disassemble the .pyc code

Re: Puzzling output when executing .pyc file directly

2005-12-14 Thread Peter Otten
Steven D'Aprano wrote: bash-2.03$ python tester.pyc Doing stuff with things now... 6 run_pyc_file: nested_scopes: 0 Can anyone tell me what the run_pyc_file line is doing in the output of the .pyc file? Is that normal behaviour when calling a .pyc file? For my sins, I am using

Re: const objects (was Re: Death to tuples!)

2005-12-14 Thread Steve Holden
Gabriel Zachmann wrote: [...] It seems to me that implementing that feature would be fairly easy. All that would be needed is a flag with each variable. It seems to me like it should be quite easy to add a sixth forward gear to my car, but I'm quite sure an auto engineer would quickly be

openings on java with japanese language

2005-12-14 Thread suresh . reddy
send your profile to [EMAIL PROTECTED] Job Code: JJ1 Job Description: Skills: Experience in Java, J2EE, Struts and servlets. This is for onsite (Japan) and should be proficient at Japanese Knowledge (Level 3/4). Number of positions : 6 Experience: 3-5 years on

Re: definition of 'polymorphism' and python

2005-12-14 Thread Steven D'Aprano
On Wed, 14 Dec 2005 02:47:40 -0800, Kay Schluehr wrote: Gabriel Zachmann wrote: I understand the Wikipedia article on Polymorphism ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 ) that it doesn't make sense to talk about polymorphism in a fully dynamically typed language

Re: ElementTree - Why not part of the core?

2005-12-14 Thread Gregory Petrosyan
[EMAIL PROTECTED]:~$ python Python 2.5a0 (#1, Dec 14 2005, 14:11:55) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type help, copyright, credits or license for more information. import xml.etree.ElementTree as ET Traceback (most recent call last): File stdin, line 1, in module File

Re: ElementTree - Why not part of the core?

2005-12-14 Thread Gregory Petrosyan
This I've got after make install and [EMAIL PROTECTED]:~$ python When launching ./python from ./trunk, everything is OK. Is it a problem with me or with installation? -- http://mail.python.org/mailman/listinfo/python-list

Re: definition of 'polymorphism' and python

2005-12-14 Thread Ben Sizer
Gabriel Zachmann wrote: I understand the Wikipedia article on Polymorphism ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 ) that it doesn't make sense to talk about polymorphism in a fully dynamically typed language -- does the Python community agree? In computer science,

Re: OO in Python? ^^

2005-12-14 Thread Antoon Pardon
Op 2005-12-14, Magnus Lycka schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Magnus Lycka wrote: I don't really know Haskell, so I can't really compare it to Python. A smarter compiler can certainly infer types from the code and assemble several implementations of an algorithm, but unless

First practical Python code, comments appreciated

2005-12-14 Thread planetthoughtful
Hi All, I've written my first piece of practical Python code (included below), and would appreciate some comments. My situation was that I had a directory with a number of subdirectories that contained one or more zip files in each. Many of the zipfiles had the same filename (which is why they

Re: How do i read line from an input file, without the /n

2005-12-14 Thread doritrieur
thanks all for your replies! it did helped me! by the way, i am really new to phyton and to programming, can anyone refer me to an online source that supplies the relevant data for syntax ect? thanks, Dorit. -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I load python script into Html ??

2005-12-14 Thread PatPoul
Sorry I was not clear, my setup is functionnal with Pywin32. Python 2.4 + pywin32 and actually, I can do this kind of script on client side : HTML SCRIPT Language=Python alert('test') /SCRIPT /HTML but I want to include external python script with the HTML tag SCRIPT --

Re: First practical Python code, comments appreciated

2005-12-14 Thread Steve Holden
planetthoughtful wrote: Hi All, I've written my first piece of practical Python code (included below), and would appreciate some comments. My situation was that I had a directory with a number of subdirectories that contained one or more zip files in each. Many of the zipfiles had the same

Re: How do i read line from an input file, without the /n

2005-12-14 Thread Gerard Flanagan
doritrieur wrote: can anyone refer me to an online source that supplies the relevant data for syntax http://rgruet.free.fr/PQR2.3.html http://www.google.com -- http://mail.python.org/mailman/listinfo/python-list

Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
How can I get rid of recursive call __getattr__ inside this method, if i need to use method or property of the class? -- http://mail.python.org/mailman/listinfo/python-list

Re: Still Loving Python

2005-12-14 Thread Peter Decker
On 12/13/05, Mike Meyer [EMAIL PROTECTED] wrote: Why this need to have everyone do things the way you do? Whatever makes you think I have this need? I said I hated them. I'm pretty sure I didn't say everyone should have to use them. Sorry, but there is a world of difference between saying I

Re: Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread Raymond L. Buvel
[EMAIL PROTECTED] wrote: I am writing a C extension with python 2.3.5 and need constructs similar to python func(*args, **kwds) What's a neat way to do that? I found pyrex has a __Pyx_GetStarArgs - is there something I'm missing from the regular C/API maybe using one of the PyArg_Parse..

Re: Get rid of recursive call __getattr__

2005-12-14 Thread bruno at modulix
Pelmen wrote: How can I get rid of recursive call __getattr__ inside this method, if i need to use method or property of the class? Sorry, but I don't understand your question. Which recursive calls to __getattr__ ? __getattr__ is only called if a/ it's defined and b/ the attribute has not

Re: Developing a network protocol with Python

2005-12-14 Thread Paul Rubin
Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: But how can I transfer pure python objects otherwise? Pyro also uses Pickle and it also transfers bytecode. Pyro in the past used pickle in an insecure way. I'd heard it had been fixed and I didn't realize it still uses pickle. I read somewhere

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Tim N. van der Leeuw
Pelmen wrote: How can I get rid of recursive call __getattr__ inside this method, if i need to use method or property of the class? Hi Pelmen, Having read the docs included with my Python distribution on __getattr__, I don't see yet how you will get recursive calls to the method... (It's

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, i should been read more closely -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, i understood my mistake i try to get attribute, that wasn't defined -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
as __repr__ for example? -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, i found the problem -- http://mail.python.org/mailman/listinfo/python-list

Re: Still Loving Python

2005-12-14 Thread Daniel Crespo
Lawrence Oluyede wrote: ps. the customer wants Windows as a platform, we develop on Linux using PyGTK, postgre and sql server for some old data. This is the true power of cross-platform :) PyGTK is crossplatform, that's true, but it looks very ugly under Windows and don't know under MacOS (if

Re: Still Loving Python

2005-12-14 Thread TwistyCreek
Peter Decker wrote: On 12/13/05, Mike Meyer [EMAIL PROTECTED] wrote: Why this need to have everyone do things the way you do? Whatever makes you think I have this need? I said I hated them. I'm pretty sure I didn't say everyone should have to use them. Sorry, but there is a world of

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
class Test: def __getattr__(self, attr): print attr def foo(x): print x t = Test() print t __str__ Traceback (most recent call last): File pyshell#23, line 1, in -toplevel- print t TypeError: 'NoneType' object is not callable what i have to

Re: ElementTree - Why not part of the core?

2005-12-14 Thread Istvan Albert
$ python Python 2.5a0 (#1, Dec 12 2005, 19:26:49) import xml.etree.ElementTree as ET hip hip hurray! http://svn.python.org/view/python/trunk/Lib/xml/etree/ don't know how this works, the link now seems to be: http://svn.python.org/view/python/trunk/Lib/xmlcore/etree/ --

Re: Still Loving Python

2005-12-14 Thread Peter Decker
On 14 Dec 2005 13:49:39 -, TwistyCreek [EMAIL PROTECTED] wrote: And by the by... visual tools ARE evil. nfgaa It's like your dad getting his drunken bar buddies to plow your mother because he's too fat to do it himself. The unfortunate offspring of any such union is equally the bastard

Re: Still Loving Python

2005-12-14 Thread Lawrence Oluyede
Il 2005-12-14, Daniel Crespo [EMAIL PROTECTED] ha scritto: PyGTK is crossplatform, that's true, but it looks very ugly under Windows and don't know under MacOS (if it's supported). You can use themes. Under MacOSX you have to install X11, but a native version in on the way. I couldn't find

Re: Still Loving Python

2005-12-14 Thread Martin Christensen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bengt == Bengt Richter [EMAIL PROTECTED] writes: Bengt De gustibus non disputandum, or whatever ;-) Yeah, and quidquid latine dictum sit, altum viditur. :-) Martin -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Steve Holden
Pelmen wrote: How can I get rid of recursive call __getattr__ inside this method, if i need to use method or property of the class? The usual mistake here is to write a __getattr__() implementation that references an undefined self-relative name, which leads to a recursive call of

Re: First practical Python code, comments appreciated

2005-12-14 Thread Paul McGuire
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] That form is non-portable. You might argue I'm never going to run this program on anything other than Windows, and indeed for throwaway programs it's often easier to write something non-portable. It's surprising, though,

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Peter Otten
Pelmen wrote: class Test:   def __getattr__(self, attr): print attr   def foo(x): print x t = Test() print t __str__ Traceback (most recent call last):   File pyshell#23, line 1, in -toplevel- print t TypeError: 'NoneType' object is

Re: Which Python web framework is most like Ruby on Rails?

2005-12-14 Thread DH
Alex Martelli wrote: Alternatively, counting Google hits: rails python django 112,000 rails python subway 81,600 rails python turbogears 32,000 This isn't exactly buzz, of course, but it's SOME measure of critical mass -- and with django about equal to

Re: Which Python web framework is most like Ruby on Rails?

2005-12-14 Thread Luis M. Gonzalez
As fas as I know, TurboGears is not very different. But it is a project that unifies many different third party components into one integrated package. Its main component is CherryPy, which is a known python web framework. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, now all clear -- http://mail.python.org/mailman/listinfo/python-list

Re: First practical Python code, comments appreciated

2005-12-14 Thread planetthoughtful
Thanks to both Steve and Paul! I actually come from a PHP background, and I'm learning Python, oddly enough, as a result of recently purchasing a USB Flash Drive, and through wanting to be able to carry a portable programming language on the drive so that I have the capability of developing /

Re: Visual Python, really Visual?

2005-12-14 Thread Maurice LING
Tolga wrote: After a very rapid entrance into the Python, I have immediately looked for a good IDE. Komodo and Wing IDE look very good and I think they are enough. But now, I am searching for a Pyhton environment which should look like Delphi / Kylix, Borland's C++ builder or Allegro Common

Re: ElementTree - Why not part of the core?

2005-12-14 Thread Steve Holden
Istvan Albert wrote: $ python Python 2.5a0 (#1, Dec 12 2005, 19:26:49) import xml.etree.ElementTree as ET hip hip hurray! http://svn.python.org/view/python/trunk/Lib/xml/etree/ don't know how this works, the link now seems to be:

Re: Windows Services

2005-12-14 Thread Peter Hansen
Mondal wrote: Can anybody tell me how to develop Windows Services (which are actually daemons) using Python. Yes, anyone can tell you. Anyone who can use Google that is. Can you? http://www.google.com/search?q=python+windows+service (There are directly relevant answers on the first page of

Re: First practical Python code, comments appreciated

2005-12-14 Thread Steve Holden
Paul McGuire wrote: [...] portability is an n-way street. +1 QOTW regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ --

Re: disassemble, was(How do (not) I distribute my Python progz?)

2005-12-14 Thread Juergen Kareta
Hi Steven, What makes you think I'm a serious programmer? *wink* Ok, it's not a 'serious' investigation, but maybe it could be, that you (sometimes) quote something usefull ;-) Python's byte-code is not exactly as easy to understand as native Python, but it is still understandable. And I

Re: First practical Python code, comments appreciated

2005-12-14 Thread Steve Holden
Paul McGuire wrote: [...] portability is an n-way street. +1 QOTW regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ --

Re: 0 in [True,False] returns True

2005-12-14 Thread Grant Edwards
On 2005-12-14, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, as you might argue, I'm not tryng to effect a change in your behaviour, I'm simply trying to point out how it could be made more rational. What would be the difference in his usage and allowing Null in a RDBMS column? Don't

Optimize function similiar to dict.update() but adds common values

2005-12-14 Thread Gregory Piñero
Hey guys, I thought I'd throw this out there since everyone loves optimization questions (it's true, check out the number of replies to those type of questions!) Right now I have a function shown below. I want to combine two dictionaries and add the values together where-ever there is overlap.

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Steve Holden
Peter Otten wrote: Pelmen wrote: class Test: def __getattr__(self, attr): print attr def foo(x): print x t = Test() print t __str__ Traceback (most recent call last): File pyshell#23, line 1, in -toplevel- print t TypeError: 'NoneType'

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Peter Hansen
Pelmen wrote: class Test: def __getattr__(self, attr): print attr def foo(x): print x t = Test() print t __str__ Traceback (most recent call last): File pyshell#23, line 1, in -toplevel- print t TypeError: 'NoneType' object is not

Re: Still Loving Python

2005-12-14 Thread Mike Meyer
[EMAIL PROTECTED] (Bengt Richter) writes: A single click compiles, links and runs the resulting independent windows .exe in a fraction of a second for the above, and I can see the hint, kill the .exe, and go on where I was. Click? Yuck. If I wanted it, I've had environments where a single

Re: 0 in [True,False] returns True

2005-12-14 Thread Antoon Pardon
Op 2005-12-14, Grant Edwards schreef [EMAIL PROTECTED]: On 2005-12-14, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, as you might argue, I'm not tryng to effect a change in your behaviour, I'm simply trying to point out how it could be made more rational. What would be the difference in

Re: Still Loving Python

2005-12-14 Thread Mike Meyer
Peter Decker [EMAIL PROTECTED] writes: On 12/13/05, Mike Meyer [EMAIL PROTECTED] wrote: Why this need to have everyone do things the way you do? Whatever makes you think I have this need? I said I hated them. I'm pretty sure I didn't say everyone should have to use them. Sorry, but there is

Re: Still Loving Python

2005-12-14 Thread Steve Holden
TwistyCreek wrote: Peter Decker wrote: On 12/13/05, Mike Meyer [EMAIL PROTECTED] wrote: Why this need to have everyone do things the way you do? Whatever makes you think I have this need? I said I hated them. I'm pretty sure I didn't say everyone should have to use them. Sorry, but there

Newbie needs help with regex strings

2005-12-14 Thread Catalina Scott A Contr AFCA/EVEO
I have a file with lines in the following format. pie=apple,quantity=1,cooked=yes,ingredients='sugar and cinnamon' Pie=peach,quantity=2,ingredients='peaches,powdered sugar' Pie=cherry,quantity=3,cooked=no,price=5,ingredients='cherries and sugar' I would like to pull out some of the values and

Re: definition of 'polymorphism' and python

2005-12-14 Thread Grant Edwards
On 2005-12-14, Gabriel Zachmann [EMAIL PROTECTED] wrote: I understand the Wikipedia article on Polymorphism ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 ) that it doesn't make sense to talk about polymorphism in a fully dynamically typed language -- does the Python

Re: Which Python web framework is most like Ruby on Rails?

2005-12-14 Thread gene tani
DH wrote: Alex Martelli wrote: Because of course if other languages have 1 or two frameworks, python needs a dozen. [there are still fewer %s than py keywords%x for x in [IDEs,web app frameworks,GUI frameworks]] and 37000 google hits for Snakes and Rubies?! --

Re: writing IM bots

2005-12-14 Thread Amit Khemka
thank you all for ur suggestions .. I got msnp and curfoo(for yahoo) customized and working :-) .. though they are pretty slow in responding to messages ... will try jabber based protocols, cheers, amit. On 12/14/05, Linsong [EMAIL PROTECTED] wrote: Why not twisted.words, for me, twisted

Re: definition of 'polymorphism' and python

2005-12-14 Thread gene tani
Grant Edwards wrote: On 2005-12-14, Gabriel Zachmann [EMAIL PROTECTED] wrote: I understand the Wikipedia article on Polymorphism ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 ) that it doesn't make sense to talk about polymorphism in a fully dynamically typed

Re: const objects (was Re: Death to tuples!)

2005-12-14 Thread Christopher Subich
Gabriel Zachmann wrote: I was wondering why python doesn't contain a way to make things const? If it were possible to declare variables at the time they are bound to objects that they should not allow modification of the object, then we would have a concept _orthogonal_ to data types

Re: OO in Python? ^^

2005-12-14 Thread Christopher Subich
Antoon Pardon wrote: Suppose we would add type declarations in python. So we could do things like int: a object: b Some people seem to think that this would introduce static typing, but the only effect those staments need to have is that each time a variable is rebound an assert

How to get the local mac address?

2005-12-14 Thread Daniel Crespo
Hi, I tried: import ctypes import socket import struct def get_macaddress(host): Returns the MAC address of a network host, requires = WIN2K. # Check for api availability try: SendARP = ctypes.windll.Iphlpapi.SendARP except: raise NotImplementedError('Usage

Re: const objects (was Re: Death to tuples!)

2005-12-14 Thread Magnus Lycka
Gabriel Zachmann wrote: I was wondering why python doesn't contain a way to make things const? If it were possible to declare variables at the time they are bound to objects that they should not allow modification of the object, then we would have a concept _orthogonal_ to data types

Re: Difference between ActivePython and Python.org

2005-12-14 Thread Daniel Crespo
Good question, I have the same anxiety. Thanks Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: First practical Python code, comments appreciated

2005-12-14 Thread Kent Johnson
planetthoughtful wrote: Hi All, I've written my first piece of practical Python code (included below), and would appreciate some comments. My situation was that I had a directory with a number of subdirectories that contained one or more zip files in each. Many of the zipfiles had the same

  1   2   3   4   >