pyExcelerator 0.6.1a is now available

2005-09-30 Thread Roman V. Kiseliov
I'm pleased to announce that pyExcelerator 0.6.1a is now available for download. --- What can you do with pyExcelerator: Generating Excel 97+ files with Python 2.4+ (need decorators), importing Excel 95+ files, support for UNICODE in Excel

Re: threads, periodically writing to a process

2005-09-30 Thread Fredrik Lundh
Adam Monsen wrote: I have a program that, when run, (1) does some task, then (2) prompts for input: Press ENTER to continue..., then repeats for about ten different tasks that each take about 5 minutes to complete. There is no way to disable this prompt. How would I go about writing a Python

Re: Straight line detection

2005-09-30 Thread Tim Roberts
PyPK [EMAIL PROTECTED] wrote: Does anyone know of a simple implementation of a straight line detection algorithm something like hough or anything simpler.So something like if we have a 2D arary of pixel elements representing a particular Image. How can we identify lines in this Image. for

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-29, Bill Mill schreef [EMAIL PROTECTED]: But, if your users can't figure out that they shouldn't be changing the variable called t._test__i without expecting side effects, what do you think of the users of your class? Python is for consenting adults. No it is not. Consenting

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-29, Simon Brunning schreef [EMAIL PROTECTED]: On 9/29/05, could ildg [EMAIL PROTECTED] wrote: **Encapsulation** is one of the 3 basic characteristics of OOP. Pyhton has encapsulation. On objetcts members are encapsulated in a namespace all of its own. You can't change these by

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Dennis Lee Bieber [EMAIL PROTECTED] writes: They did? Fine... Add another that Python names beginning with _ or __ are not to be accessed from outside the module/class that defined them. And if one is not the owner of that module/class, they should contact the responsible person and

Re: PyWin SendMessage

2005-09-30 Thread Gonzalo Monzón
g.franzkowiak escribió: Thomas Heller schrieb: g.franzkowiak [EMAIL PROTECTED] writes: Thomas Heller schrieb: g.franzkowiak [EMAIL PROTECTED] writes: Hello everybody, I've tryed to use an interprocess communication via SendMessage on Windows. Unfortunately,

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-29, Rocco Moretti schreef [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: On Fri, 30 Sep 2005 00:16:02 +1000 Steven D'Aprano wrote: Say you have written a class, with a private variable. I decide that I need access to that variable, for reasons you never foresaw. What if the access

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Steve Holden
Delaney, Timothy (Tim) wrote: Bugs wrote: It says ActivePython 2.4.1 but I downloaded the 2.4.2 binary installer from python.org and the python.exe executable I'm running is timestamped 9/28/2005 12:41PM... Any ideas what I'm doing wrong? Visit this site:

Re: A quick c.l.p netiquette question

2005-09-30 Thread Steve Holden
Peter Hansen wrote: Fredrik Lundh wrote: Peter Hansen wrote: Does it really have to be 158 lines to demonstrate these few issues? I for one almost never take the time to dig through 158 lines of someone else's code, partly on the assumption that almost any interesting issue can be covered

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-29, Steve Holden schreef [EMAIL PROTECTED]: Think about it: we have a language that has an eval() function and an exec statement, and people are concerned that some service consumer shouldn't be allowed to go poking around inside namespaces? What do we have to do, put up signs

Turning off syntax warnings?

2005-09-30 Thread Ivan Shevanski
Here's a noob question for everyone which i can't seem to find the answer to on google. . .Is there a way to turn off syntax warnings? -Ivan _ FREE pop-up blocking with the new MSN Toolbar – get it now!

Re: Moronicity Xha Lee, Jargonizer

2005-09-30 Thread James Stroud
On Thursday 29 September 2005 19:07, Raymond Hettinger wrote: The tried-and-true solution is both simple and civil, Don't feed the trolls. This will also ease all suffering in the world and give us world peace and end hunger. If we could all just get along. If the bad men would just not be

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Fri, 30 Sep 2005 06:31:44 +0200 Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: Looks like you must know every one of the base classes of the NotSoSecret, whether there is some base class named Secret? And, if so, you must also know these classes _implementation_

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steve Holden
Antoon Pardon wrote: Op 2005-09-29, Bill Mill schreef [EMAIL PROTECTED]: But, if your users can't figure out that they shouldn't be changing the variable called t._test__i without expecting side effects, what do you think of the users of your class? Python is for consenting adults. No it

Re: Writing EXIF data

2005-09-30 Thread Roel Schroeven
Larry Bates schreef: I've used jhead and wrapped it with os.system call. http://www.sentex.net/~mwandel/jhead/ Looks like it can do what I was looking for. Thanks a lot! -- If I have been able to see further, it was only because I stood on the shoulders of giants. -- Isaac Newton Roel

ANN: SciPy Core (Numeric Python Replacement) Version 0.4.X (beta) released

2005-09-30 Thread Travis Oliphant
Background: Numeric is an add-on Python module that has seen widespread adoption. It enables Python to be used as a Scientific Computing Environment similar to MATLAB or IDL. Numeric was originally written nearly 10 years ago, and while still performing admirably needed much updating to

Re: 1 Million users.. I can't Scale!!

2005-09-30 Thread Christos Georgiou
On Wed, 28 Sep 2005 21:58:15 -0400, rumours say that Jeff Schwab [EMAIL PROTECTED] might have written: For many (most?) applications in need of serious scalability, multi-processor servers are preferable. IBM has eServers available with up to 64 processors each, and Sun sells E25Ks with 72

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Steve Holden [EMAIL PROTECTED] writes: Good grief, the ultimate choice is to use Python because you like it, or not to use it because you don't. Enough with the picking every available nit, please. Consent or stop complaining :-) Riiight. If she was walking in that neighborhood she must have

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Christos Georgiou
On Fri, 30 Sep 2005 07:50:45 +1000, rumours say that Delaney, Timothy (Tim) [EMAIL PROTECTED] might have written: You have to admit though, he's remarkably good at getting past Spambayes. Despite classifying *every* Xah Lee post as spam, he still manages to get most of his posts classified as 0%

Re: scope of socket.setdefaulttimeout?

2005-09-30 Thread Steve Holden
Russell Warren wrote: Does anyone know the scope of the socket.setdefaulttimeout call? Is it a cross-process/system setting or does it stay local in the application in which it is called? I've been testing this and it seems to stay in the application scope, but the paranoid side of me

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: So you have read every line of the python std library, I guess? yes, but that's irrelevant. in python, you don't need the source to find hidden stuff. finding out is a matter of writing a very small program, or tinkering at the interactive prompt for a couple of

Hello gnome-terminal

2005-09-30 Thread egbert
When I start the following script in a gnome-terminal: #!/usr/bin/env python import os print hello gnome-terminal print os.environ[PYTHONPATH] I see the expected results in the same gnome-terminal window. However starting this same script via a launcher in a panel, a new

A problem while using anygui

2005-09-30 Thread Johnny Lee
Hi, I've met a problem while using anygui to create a GUI. Here is a brief example from Dave: ### def guidialog(): def ok(**kw): win.destroy() app.remove(win) #snip anygui.link(btn_ok, ok) #snip app.run() return n #qtgui will NEVER get here ### As you can see,

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steve Holden
Antoon Pardon wrote: Op 2005-09-29, Steve Holden schreef [EMAIL PROTECTED]: Think about it: we have a language that has an eval() function and an exec statement, and people are concerned that some service consumer shouldn't be allowed to go poking around inside namespaces? What do we have

Re: File Upload Script

2005-09-30 Thread Fuzzyman
On 29 Sep 2005 21:41:21 -0700, Chuck [EMAIL PROTECTED] wrote: Hi, can anyone provide or point me in the direction of a simple python file upload script? I've got the HTML form part going but simply putting the file in a directory on the server is what I'm looking for. Any help would be greatly

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Fuzzyman
On Thu, 29 Sep 2005 17:53:47 -0700, Bugs [EMAIL PROTECTED] wrote: I downloaded the 2.4.2 Windows Binary Installer from python.org but when I try to run python.exe I get the following in the console: ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on Python 2.4.1 (#65,

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steve Holden
Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: Good grief, the ultimate choice is to use Python because you like it, or not to use it because you don't. Enough with the picking every available nit, please. Consent or stop complaining :-) Riiight. If she was walking in that

Re: Fixes since 2.4.2c1?

2005-09-30 Thread Michael Ströder
Martin v. Löwis wrote: Michael Ströder wrote: Does that differ from 2.4.2c1? On Monday I noticed a crash in the test suite on a box running Solaris 8. It seems I can build Python 2.4.1 and run make test there without problems. There is also a chance that you found a compiler bug. So

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Fredrik Lundh
Steve Holden wrote: 1) Allow keywords like private (or implemetation) to mark certain variables, functions or classes as an implementation detail. Personnally I would prefer the opposite such as a interface to mark objects which are not private, but that would break too much code. Just an

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Gregor Horvath [EMAIL PROTECTED] writes: Real open source live example from yesterdays mailinglists: I don't see any use of name mangling in that example. Someone has a problem and tweaks a private variable as a workaround. They should have patched the source instead. No python program

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-30, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-09-29, Steve Holden schreef [EMAIL PROTECTED]: Think about it: we have a language that has an eval() function and an exec statement, and people are concerned that some service consumer shouldn't be allowed

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-30, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-09-29, Bill Mill schreef [EMAIL PROTECTED]: But, if your users can't figure out that they shouldn't be changing the variable called t._test__i without expecting side effects, what do you think of the users of

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Antoon Pardon
Op 2005-09-30, Fredrik Lundh schreef [EMAIL PROTECTED]: Steve Holden wrote: 1) Allow keywords like private (or implemetation) to mark certain variables, functions or classes as an implementation detail. Personnally I would prefer the opposite such as a interface to mark objects which are not

Re: Soap Question (WSDL)

2005-09-30 Thread Adriaan Renting
You need the WSDL file if you want external probrams to be able to discover what WebService you are running, so it depends on your need if you need to use one. You can perfectly run a SOAP service without a WSDL file, using SOAPpy, only then external programs do not have a way to find out how

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Gregor Horvath
Paul Rubin wrote: Gregor Horvath [EMAIL PROTECTED] writes: Someone has a problem and tweaks a private variable as a workaround. They should have patched the source instead. I think they are going to do that. In the meantime our friend has a working solution otherwise he would have

return (PyObject*)myPyType; ...segmentation fault!

2005-09-30 Thread elho
I called a own python type 'PyType' with a c function and returned it into my python programm - there it fault. It is said that the object has a NULL-Pointer when I try to debug it? Here are the importent snips from my code: // == test.py

Re: Self reordering list in Python

2005-09-30 Thread zooko
I've implemented such an LRU Cache in Python. My technique was to weave a doubly-linked list into the dict, so that it is O(dict) for all LRU operations. I benchmarked it against someone's Python-list-based implementation from the ActiveState cookbook and noted that on my machine the better

Re: Self reordering list in Python

2005-09-30 Thread Paul Rubin
zooko [EMAIL PROTECTED] writes: I haven't benchmarked it against Evan Podromou's heap implementation yet, but obviously inserting and removing things from a heapq heap is O(N). Good heavens, I should hope not. The whole point of heaps is that those operations are O(log(N)). --

Re: Font management under win32

2005-09-30 Thread Stefano Masini
On 9/30/05, Roger Upole [EMAIL PROTECTED] wrote: Here's an example of how to use EnumFontFamilies: I'm trying the code you just posted, which works (thanks a lot), but I'm having another problem now. As I stated in my first post, the reason why I need to know the list of installed fonts is that

Re: return (PyObject*)myPyType; ...segmentation fault!

2005-09-30 Thread Fredrik Lundh
elho [EMAIL PROTECTED] wrote: It is said that the object has a NULL-Pointer when I try to debug it? what object? Here are the importent snips from my code: where's the PySDLXMLNode code? is the PySDLXMLNode constructor really doing a proper PyObject initialization? (PyObject subtypes are

Re: Hello gnome-terminal

2005-09-30 Thread gnukid
Hi Launcher may spawn a new shell to execute your program. The new shell wont have your PYTHONPATH environment variable. Cheers, Noorul egbert wrote: When I start the following script in a gnome-terminal: #!/usr/bin/env python import os print hello gnome-terminal print

Re: Soap Question (WSDL)

2005-09-30 Thread Fredrik Lundh
Armin wrote: I am trying to write a web app. that connects to flickr using SOAP. The book 'Dive into python' says I need to have a WSDL file to connect, while the only useful soap related url flickr api (flickr.com/services/api) provides is the following: The SOAP Server Endpoint URL is

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 06:31:44 +0200, Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: Looks like you must know every one of the base classes of the NotSoSecret, whether there is some base class named Secret? And, if so, you must also know these classes _implementation_ that information isn't

Re: portable way to get process infos

2005-09-30 Thread gnukid
Try cygwin (http://www.cygwin.com) -- http://mail.python.org/mailman/listinfo/python-list

Re: Font management under win32

2005-09-30 Thread Fredrik Lundh
Stefano Masini wrote: Do you think that is possible with win32 extensions? you can do this via PIL's ImageFont module: import ImageFont f = ImageFont.truetype(arial.ttf) f.font.family 'Arial' f.font.style 'Regular' or, if you don't want to ship the entire PIL library with your app, you

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Steve Holden
Fuzzyman wrote: On Thu, 29 Sep 2005 17:53:47 -0700, Bugs [EMAIL PROTECTED] wrote: I downloaded the 2.4.2 Windows Binary Installer from python.org but when I try to run python.exe I get the following in the console: ActivePython 2.4.1 Build 247 (ActiveState Corp.) based

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steve Holden
Antoon Pardon wrote: Op 2005-09-30, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2005-09-29, Bill Mill schreef [EMAIL PROTECTED]: But, if your users can't figure out that they shouldn't be changing the variable called t._test__i without expecting side effects, what do you

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 06:52:50 +, Antoon Pardon wrote: Op 2005-09-29, Bill Mill schreef [EMAIL PROTECTED]: But, if your users can't figure out that they shouldn't be changing the variable called t._test__i without expecting side effects, what do you think of the users of your class?

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: Still, [EMAIL PROTECTED]'s point that you must know the base classes is correct. It is *easy* to find them out (NotSoSecret.__bases__ should do it), but if you don't you are taking a chance that your class name doesn't clash with one of the bases.

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 00:58:17 -0700, Paul Rubin wrote: Steve Holden [EMAIL PROTECTED] writes: Good grief, the ultimate choice is to use Python because you like it, or not to use it because you don't. Enough with the picking every available nit, please. Consent or stop complaining :-)

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Gerrit Holl
Tony Meyer wrote: X-Spambayes-Classification: ham; 0.048 X-Spambayes-Evidence: '*H*': 0.90; '*S*': 0.00; 'bug.': 0.07; 'flagged': 0.07; i'd: 0.08; 'bayes': 0.09; 'from:addr:ihug.co.nz': 0.09; 'really,': 0.09; 'cc:no real name:2**0': 0.14; 'from:addr:t-meyer': 0.16;

Re: Python-list Digest, Vol 24, Issue 451

2005-09-30 Thread Elke Hohls
Sorry, the last line is wrong: PySDLXMLNodeType = PyMyType ..above the correction // == PyMyExtention.c = . : typedef struct { PyObject_HEAD long lAttribute; } PyMyObject; static PyObject* PyMyObject_NewC (long lAttribute) {

Re: Problem with long strings in the Boost.Python getting_started2 sample ?

2005-09-30 Thread Sylvain MARIE
Well, answering my own question here... See http://mail.python.org/pipermail/c++-sig/2002-November/002415.html 8-) Sylvain Sylvain MARIE [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hi all, I am discovering Boost.Python, and weird exceptions in my dummy extension

Re: return (PyObject*)myPyType; ...segmentation fault!

2005-09-30 Thread elho
It is said that the object has a NULL-Pointer when I try to debug it? what object? the python one 'myNewPyType' Sorry, I forgot to change: PySDLXMLNodeType = PyMyType ..above the corrections // == PyMyExtention.c = . : typedef struct {

Virus Found in message Returned mail: see transcript for details

2005-09-30 Thread Post Office
Symantec AntiVirus found a virus in an attachment from Post Office [EMAIL PROTECTED]. Attachment: mail.zip Threat: [EMAIL PROTECTED] Action taken: Delete succeeded File status: Deleted Message could not be delivered -- http://mail.python.org/mailman/listinfo/python-list

Re: replacments for stdio?

2005-09-30 Thread Ido . Yehieli
Thanks martin, I'll give it a shot as soon as i get back from work! -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-09-30 Thread Tor Erik S�nvisen
Erik Max Francis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tor Erik Sønvisen wrote: I need to browse the socket-module source-code. I believe it's contained in the file socketmodule.c, but I can't locate this file... Where should I look? The source tarball, available on

Re: Help with syntax warnings

2005-09-30 Thread Peter Hansen
Robert Kern wrote: Peter Hansen wrote: Not sure... what's a syntax warning? In [1]: SyntaxWarning? Type: classobj String Form:exceptions.SyntaxWarning Namespace: Python builtin Docstring: Base class for warnings about dubious syntax. Wow... Python detects dubious

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 07:37:14 +, Antoon Pardon wrote: Well I have the following reasons not to like the current python way: 1) Beginning all your private variables with an underscore is like starting all your integers with an 'i' or all your dictionary with a 'd' etc. Three points: (1)

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Peter Hansen
Martin v. Löwis wrote: Trent Mick wrote: It is possible that the python.org installer didn't overwrite the python24.dll in the system directory (C:\WINDOWS\system32). Try doing this: Even though this is apparently what happened, I'm puzzled as to why it happened: shouldn't the version

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Peter Hansen
Gerrit Holl wrote: True. However, most mail to this mailinglist has less than 0.001 spam probability. As you can see, this one had 0.048 - a vast score, almost enough to put it in my unsure box. It seems to be just not hammy enough. It's interesting to see that no none of the foul language

Re: Moronicity Xha Lee, Jargonizer

2005-09-30 Thread Peter Hansen
Kay Schluehr wrote: By the way I noticed also a few reasonable non-troll postings of Xah without any response in the forum. Not even Xahs posting strategy is coherent. Really? Every one I've noticed has actually had a response, and a reasonably civil one at that. Usually from Steve Holden,

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: 2) Allow the client access to these private variables, through a special construct. Maybe instead of from ... import ... from ... spy What you are suggesting is that you have private variables that are only private by convention, since

Compile fails on x86_64

2005-09-30 Thread Neal Becker
In file included from scipy/base/src/multiarraymodule.c:44: scipy/base/src/arrayobject.c: In function 'array_frominterface': scipy/base/src/arrayobject.c:5151: warning: passing argument 3 of 'PyArray_New' from incompatible pointer type error: Command gcc -pthread -fno-strict-aliasing -DNDEBUG -O2

how to stop info output on screen

2005-09-30 Thread midday . hu
Hi, Does someone know how to stop the information output on screen? Now when I run my code, it outputs a lot of message when calling other libraries, together with the info with the print command I used. How can I mask these info on screen when calling other libraries and how I can mask the info

compile fails on x86_64 (more)

2005-09-30 Thread Neal Becker
In file included from scipy/base/src/multiarraymodule.c:44: scipy/base/src/arrayobject.c:41: error: conflicting types for 'PyArray_PyIntAsIntp' build/src/scipy/base/__multiarray_api.h:147: error: previous declaration of 'PyArray_PyIntAsIntp' was here --

Re: Help with syntax warnings

2005-09-30 Thread Roel Schroeven
Ivan Shevanski schreef: Here's a noob question for everyone (I'm not sure if my first message got through, is had a suspicious header so sorry for double post is so), is there a way to turn off syntax warnings or just make them not visible? Those warnings are something I have never seen and

Re: how to stop info output on screen

2005-09-30 Thread Ido . Yehieli
maybe you can try replaceing sys.stdout and/or sys.stderr with a just a simple file? then everything will be written to that file instead of desplayed on the console. Cheers, Ido. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to stop info output on screen

2005-09-30 Thread Ido . Yehieli
more on the subject: your print statments will also be written to that file that sys.stdout directs to, so maybe that wasn't exactly the solution you wanted to hear. ok, not the nicest solution but maybe it will help you anyway: bind sys.stdout at the begining of the program to a file (don't

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 03:42:32 -0700, Paul Rubin wrote: Steven D'Aprano [EMAIL PROTECTED] writes: Still, [EMAIL PROTECTED]'s point that you must know the base classes is correct. It is *easy* to find them out (NotSoSecret.__bases__ should do it), but if you don't you are taking a chance that

Re: Straight line detection

2005-09-30 Thread Juho Schultz
PyPK wrote: Does anyone know of a simple implementation of a straight line detection algorithm something like hough or anything simpler.So something like if we have a 2D arary of pixel elements representing a particular Image. How can we identify lines in this Image. for example: ary =

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: It's not easy if the base classes change after you check your code in. You shouldn't need to know about that if it happens. Modularity, remember? Yes. And if you are relying on a public method in a class, and somebody dynamically modifies that

Re: Zope3 Examples?

2005-09-30 Thread Markus Wankus
Jean-François Doyon wrote: Markus, Zope 3 is mature as a framework, but does not provide much out of the box. It's a basis upon which to build applications like Plone ... If you are looking for something that provides Plone-like features on top of Zope 3, it doesn't exist (yet).

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Steve Holden
[off-list] Peter Hansen wrote: Gerrit Holl wrote: True. However, most mail to this mailinglist has less than 0.001 spam probability. As you can see, this one had 0.048 - a vast score, almost enough to put it in my unsure box. It seems to be just not hammy enough. It's interesting to see that

Re: how to stop info output on screen

2005-09-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hi, Does someone know how to stop the information output on screen? Now when I run my code, it outputs a lot of message when calling other libraries, together with the info with the print command I used. How can I mask these info on screen when calling other

[Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Reinhold Birkenfeld
Hi, after Guido's pronouncement yesterday, in one of the next versions of Python there will be a conditional expression with the following syntax: X if C else Y which is the same as today's (Y, X)[bool(C)] or C and X or Y (only if X is True) Reinhold --

Google Not Universal Panacea [was: Re: Where to find python c-sources]

2005-09-30 Thread Steve Holden
Tor Erik Sønvisen wrote: Erik Max Francis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tor Erik Sønvisen wrote: I need to browse the socket-module source-code. I believe it's contained in the file socketmodule.c, but I can't locate this file... Where should I look? The

Overloading __init__ Function overloading

2005-09-30 Thread Iyer, Prasad C
I am new to python. I have few questions a. Is there something like function overloading in python? b. Can I overload __init__ method Thanks in advance regards prasad chandrasekaran --- Cancer cures smoking -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steve Holden
Paul Rubin wrote: Steven D'Aprano [EMAIL PROTECTED] writes: 2) Allow the client access to these private variables, through a special construct. Maybe instead of from ... import ... from ... spy What you are suggesting is that you have private variables that are only private by convention,

'ascii' codec can't encode character u'\u2013'

2005-09-30 Thread thomas Armstrong
Hi Using Python 2.3.4 + Feedparser 3.3 (a library to parse XML documents) I'm trying to parse a UTF-8 document with special characters like acute-accent vowels: ?xml version=1.0 encoding=UTF-8 standalone=yes? ... --- But I get this error message: --- UnicodeEncodeError: 'ascii'

Re: Zope3 Examples?

2005-09-30 Thread Gerhard Häring
Markus Wankus wrote: [...] Thanks for the reply - maybe I'll give it another shot. I'm currently demoing Snakelets. Quite a turn in the opposite direction, but small and super-easy to get going with. [...] I also found Snakelets a pleasure to use and chose it for implementing a clan

Re: return (PyObject*)myPyType; ...segmentation fault!

2005-09-30 Thread Fredrik Lundh
elho wrote: It is said that the object has a NULL-Pointer when I try to debug it? what object? the python one 'myNewPyType' Sorry, I forgot to change: PySDLXMLNodeType = PyMyType ..above the corrections self = new PyMyObject self-lAttribute = lAttribute; return

Re: 'ascii' codec can't encode character u'\u2013'

2005-09-30 Thread Fredrik Lundh
Thomas Armstrong wrote: I'm trying to parse a UTF-8 document with special characters like acute-accent vowels: ?xml version=1.0 encoding=UTF-8 standalone=yes? ... --- But I get this error message: --- UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in

Re: 'ascii' codec can't encode character u'\u2013'

2005-09-30 Thread deelan
thomas Armstrong wrote: (...) when trying to execute a MySQL query: query = UPDATE blogs_news SET text = ' + text_extrated + 'WHERE id=' + id + ' cursor.execute (query) #--- error line well, to start it's not the best way to do an update, try this instead: query = UPDATE

Re: Overloading __init__ Function overloading

2005-09-30 Thread Fredrik Lundh
Iyer, Prasad C wrote: a. Is there something like function overloading in python? not in the usual sense, no. function arguments are not typed, so there's nothing to dispatch on. there are several cute tricks you can use to add dispatching on top of raw python, but that's nothing you should

Re: Overloading __init__ Function overloading

2005-09-30 Thread Steve Holden
Iyer, Prasad C wrote: I am new to python. I have few questions a. Is there something like function overloading in python? Not in the same way as Java: you can't write several functions and have the compiler or run-rime system work out which one to call according to argument types. Don't

Overloading Overriden

2005-09-30 Thread Iyer, Prasad C
Hi, Does python supports Overloading Overriding of the function? regards prasad chandrasekaran This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not

Re: Overloading __init__ Function overloading

2005-09-30 Thread Larry Bates
I may be reading this question different than Fredrik. This example is with old-style classes. class baseclass: def __init__(self, arg): # # Do some initialization # def method1(self, arg): # # baseclass method goes here # class

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Fredrik Lundh
Reinhold Birkenfeld wrote: after Guido's pronouncement yesterday, in one of the next versions of Python there will be a conditional expression with the following syntax: X if C else Y which is the same as today's (Y, X)[bool(C)] hopefully, only one of Y or X is actually evaluated ? C

Re: how to stop info output on screen

2005-09-30 Thread Ido . Yehieli
forget my posts, Steve's solution is much more maintanable when you(or someone else)'ll revisit the code in a couple of years. i would go with what he wrote. Cheers, Ido. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Richie Hindle
[Fredrik] X if C else Y hopefully, only one of Y or X is actually evaluated ? Yes. From Guido's announcement at http://mail.python.org/pipermail/python-dev/2005-September/056846.html: The syntax will be A if C else B This first evaluates C; if it is true, A is evaluated to give

Re: New Python chess module

2005-09-30 Thread Pekka Karjalainen
Its still rough around the edges and not fully tested. I'll eventualy release a more polished version and possibly put it on Sourceforge. In the meantime I would be grateful for any feedback.. Somebody ought to comment this in more detail... I have one minor point. It looks like your test

Re: Overloading __init__ Function overloading

2005-09-30 Thread Michael Hoffman
Larry Bates wrote: class myclass(baseclass): def __init__(self, arg): # # This method gets called when I instantiate this class. # If I want to call the baseclass.__init__ method I must # do it myself. # baseclass.__init__(arg) This is

what does 0 mean in MyApp(0)

2005-09-30 Thread Alex
I'm looking at a tutorial with the code below from wxPython.wx import * class MyApp(wxApp): def OnInit(self): frame = wxFrame(NULL, -1, winApp, size = (800,640)) frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop() Everything

Re: what does 0 mean in MyApp(0)

2005-09-30 Thread Ido . Yehieli
i see you inherit from wxApp. mybe the constructor of that object takes an int value? -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloading Overriden

2005-09-30 Thread Fredrik Lundh
Iyer, Prasad C wrote: Does python supports Overloading Overriding of the function? Please avoid posting the same question over and over again with different subjects. Please read the replies to your original question before reposting the question. This is a mail list, not a chat channel; it

RE: Overloading __init__ Function overloading

2005-09-30 Thread Iyer, Prasad C
Thanks a lot for the reply. But I want to do something like this class BaseClass: def __init__(self): # Some code over here def __init__(self, a, b): # Some code over here def __init__(self, a, b, c): # some code here

Re: Help with syntax warnings

2005-09-30 Thread Fredrik Lundh
Peter Hansen wrote: Wow... Python detects dubious syntax? And here I thought programming was rather black and white, it's right or it's wrong. SyntaxWarnings are issued for things that has never been valid nor well- defined nor especially clever, but has been handled (in some more or less

LZW decompressor

2005-09-30 Thread Jim Melton
OK, so the LZW patent has expired. Now does anybody have a package to read LZW compressed files? Despite the patent issues, Unix compress is still widely used to compress files. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >