Re: How to write Smart Python programs?

2006-10-11 Thread Fredrik Lundh
Antoine De Groote wrote: > In the snippet above (taken from the Python doc > http://docs.python.org/lib/built-in-funcs.html), self.__x is > initialized, but never used. I would appreciate any explanation for this. looks like a typo. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write Smart Python programs?

2006-10-11 Thread Paul Rubin
Antoine De Groote <[EMAIL PROTECTED]> writes: > In the snippet above (taken from the Python doc > http://docs.python.org/lib/built-in-funcs.html), self.__x is > initialized, but never used. I would appreciate any explanation for > this. Looks like a typo, should say self._x . -- http://mail.pytho

Re: How to write Smart Python programs?

2006-10-11 Thread Antoine De Groote
Antoine De Groote wrote: > class C(object): > def __init__(self): self.__x = None > def getx(self): return self._x > def setx(self, value): self._x = value > def delx(self): del self._x > x = property(getx, setx, delx, "I'm the 'x' property.") > Altough I'm not the OP, thanks

Re: Python component model

2006-10-11 Thread Erik Max Francis
Ilias Lazaridis wrote: > http://dabodev.com > http://case.lazaridis.com/wiki/DaboAudit Who. Cares. What. You. Think? -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis Love is, above all, the gift of

Re: Standard Forth versus Python: a case study

2006-10-11 Thread bearophileHUGS
[EMAIL PROTECTED] wrote: > no sort() is needed to calculate the median of a list. > you just need one temp var. Can you show some actual code? (There is the median of 5 algorithm too). Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Experiences with Py2Exe

2006-10-11 Thread Fredrik Lundh
Isaac Rodriguez wrote: > I am asking this because I have a lot of experience using the Windows > Installer service, and I also have all the productivity tools available > to create an installer for my tools if I needed to just go ahead and use it. py2exe generates an EXE and (usually) a bunch of

Re: hundreds of seconds?

2006-10-11 Thread neoedmund
python's time is as old as glibc's time(). A more clear interface as Java should be implements! though i'm not has the ability to do this. maybe some "volenties" could do out the favor. On Oct 11, 10:38 pm, [EMAIL PROTECTED] wrote: > Hi all > > How can I access partial seconds on the system cloc

Re: python 2.5 & sqlite3

2006-10-11 Thread Fredrik Lundh
John Machin wrote: > The Activestate Python 2.5 distribution is not yet available. > > (1) Why is the effbot saying that a not-yet available distribution is > broken? because I misread the "waiting for" in the first paragraph; Python 2.5 has been out for some while, and the OP's post didn't app

Re: Experiences with Py2Exe

2006-10-11 Thread Ben Finney
Antoine De Groote <[EMAIL PROTECTED]> writes: > Isaac Rodriguez wrote: > > Do you have a specific reason for using Inno Setup and not a > > Windows Installer based setup? > > The main reason for using Inno Setup is that it is free. Then I > quickly saw that it is powerful and easy to use. And I do

Re: Standard Forth versus Python: a case study

2006-10-11 Thread Paul Rubin
"Paul McGuire" <[EMAIL PROTECTED]> writes: > Ok, I'll bite. How do you compute the median of a list using just a single > temp var? Well there's an obvious quadratic-time method... -- http://mail.python.org/mailman/listinfo/python-list

Re: Experiences with Py2Exe

2006-10-11 Thread Antoine De Groote
Isaac Rodriguez wrote: >> I did a project with wxPython and py2exe. Just great :-) I also used >> Inno Setup (http://www.jrsoftware.org/isinfo.php) to create an >> installer. You should be able to learn/use both in one day. >> > > Do you have a specific reason for using Inno Setup and not a Window

Re: Standard Forth versus Python: a case study

2006-10-11 Thread Ben Finney
"werty" <[EMAIL PROTECTED]> writes: > Browsers . There will be 2 columns , one on left will be main/orig > but on the Right will have hyperlink result . This way ya dont have > to go back to compare ! side by side . > Text editors will also work this way . You will read orig in left > colu

Re: Python component model

2006-10-11 Thread Ilias Lazaridis
Robert Kern wrote: > Ilias Lazaridis wrote: > > Robert Kern wrote: > >> Ilias Lazaridis wrote: > >>> Robert Kern wrote: > No, he's just a troll that enjoys telling everyone what to do. Don't try > to get > him to contribute anything useful; it won't work. > >>> Mr. Kern! Seeing you

Re: Standard Forth versus Python: a case study

2006-10-11 Thread werty
Apples/oranges ? programmers are making very little $$ today . Thats software ! No one is makin money on obsolete Forth , so why a comparisom ? Ultimately the best OpSys will be free and millions of lines of code obsoleted . Because no one can protect intellectual property , its simp

Re: Python component model

2006-10-11 Thread Robert Kern
Ilias Lazaridis wrote: > Robert Kern wrote: >> Ilias Lazaridis wrote: >>> Robert Kern wrote: No, he's just a troll that enjoys telling everyone what to do. Don't try to get him to contribute anything useful; it won't work. >>> Mr. Kern! Seeing you working on such a seemingly excelle

Re: Python component model

2006-10-11 Thread Ilias Lazaridis
Peter Decker wrote: > On 11 Oct 2006 20:08:12 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > > > > Well, then, why not contribute? Or are you waiting for everyone else > > > to do it for you? > > > > I've contributed already (my contructive criticism). > > > > It's up to the team to react. >

is there an easy way to create a database on the fly and let the user input values

2006-10-11 Thread [EMAIL PROTECTED]
I don't realy care what database I use wx.grid or whatever. I wan't it to look at a line 128 9023 23428 exc and create the database or pick something out of the file as some sort of a descrition line and then display and allow the user to change and add new lines. What is the easiest set o

Re: Python component model

2006-10-11 Thread Ilias Lazaridis
Robert Kern wrote: > Ilias Lazaridis wrote: > > Robert Kern wrote: > > >> No, he's just a troll that enjoys telling everyone what to do. Don't try > >> to get > >> him to contribute anything useful; it won't work. > > > > Mr. Kern! Seeing you working on such a seemingly excellent product, I > > am

Re: hundreds of seconds?

2006-10-11 Thread Blair P. Houghton
Tim Peters wrote: > On Windows 98, time.time() typically updates only once per 0.055 > seconds (18.2 Hz), but time.clock() typically updates more than a > million times per second. You do /not/ want to use time.time() for > sub-second time measurement on Windows. Use time.clock() for this > purp

Re: Python component model

2006-10-11 Thread Robert Kern
Ilias Lazaridis wrote: > Robert Kern wrote: >> No, he's just a troll that enjoys telling everyone what to do. Don't try to >> get >> him to contribute anything useful; it won't work. > > Mr. Kern! Seeing you working on such a seemingly excellent product, I > am really wondering about your tenor.

Re: Python component model

2006-10-11 Thread Peter Decker
On 11 Oct 2006 20:08:12 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > > Well, then, why not contribute? Or are you waiting for everyone else > > to do it for you? > > I've contributed already (my contructive criticism). > > It's up to the team to react. Wow! What a contribution! Amazing tha

Re: Standard Forth versus Python: a case study

2006-10-11 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [snip] > > no sort() is needed to calculate the median of a list. > > you just need one temp var. > Ok, I'll bite. How do you compute the median of a list using just a single temp var? -- Paul -- http://mail.python.org/mailman/l

Re: Python component model

2006-10-11 Thread Ben Finney
"Ilias Lazaridis" <[EMAIL PROTECTED]> writes: > Terrible this open source folks. > One cannot say one word without beeing asked to contribute. +1 QOTW, in a new category for kooks. -- \ "Say what you will about the Ten Commandments, you must always | `\ come back to the pleasant

Re: Standard Forth versus Python: a case study

2006-10-11 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: > no sort() is needed to calculate the median of a list. > you just need one temp var. Of course. But for a short enough list, the builtin sort() method may be faster than an O(n) algorithm coded in Python.

Re: Python component model

2006-10-11 Thread Ilias Lazaridis
Robert Kern wrote: > Peter Decker wrote: > > On 11 Oct 2006 18:56:30 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > > > >> yes, an interesting tool. > >> > >> But to get more attention and developers, the project needs to be > >> polished. > >> > >> really unattractive resources: > >> > >> htt

Re: Python component model

2006-10-11 Thread Ilias Lazaridis
Peter Decker wrote: > On 11 Oct 2006 18:56:30 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > > > yes, an interesting tool. > > > > But to get more attention and developers, the project needs to be > > polished. > > > > really unattractive resources: > > > > http://dabodev.com > > http://case.l

Re: python 2.5 & sqlite3

2006-10-11 Thread BartlebyScrivener
>> Looks like it could be from reading some >> build-Python-from-source instructions for Unix platforms ... Yes, Sorry. I read the doc too hastily. >> If you're compiling the Python source yourself, >> note that the source tree doesn't include the SQLite code, >> only the wrapper module. I'm

Re: Python component model

2006-10-11 Thread Robert Kern
Peter Decker wrote: > On 11 Oct 2006 18:56:30 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > >> yes, an interesting tool. >> >> But to get more attention and developers, the project needs to be >> polished. >> >> really unattractive resources: >> >> http://dabodev.com >> http://case.lazaridis

Re: Standard Forth versus Python: a case study

2006-10-11 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > John Doty: > > Yes. The efficient exact algorithms for this problem use *partial* > > sorts. The Forth one from the FSL is of this class (although I know of > > two better ones for big arrays). But it's tough to beat the efficiency > > of the approximate histogram-based m

Re: Python component model

2006-10-11 Thread Ed Leafe
On Oct 10, 2006, at 9:59 PM, Edward Diener No Spam wrote: > The Visual Studio RAD IDE environment actually modifies source code > constructors, via an InitializeComponent() function called from it, in > order to set properties and events in components. It does mark the > function as such with comm

Re: Python component model

2006-10-11 Thread Ed Leafe
On Oct 10, 2006, at 1:47 PM, fumanchu wrote: >> 4) Custom property and component editors: A component editor can >> present >> a property editor or an editor for an entire component which the >> visual >> design-time RAD environment can use to allow the programmer end- >> user of >> the compo

Re: Python component model

2006-10-11 Thread Peter Decker
On 11 Oct 2006 18:56:30 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > yes, an interesting tool. > > But to get more attention and developers, the project needs to be > polished. > > really unattractive resources: > > http://dabodev.com > http://case.lazaridis.com/wiki/DaboAudit Well, then,

Re: Python component model

2006-10-11 Thread Ilias Lazaridis
Peter Decker wrote: > On 10/10/06, Peter Maas <[EMAIL PROTECTED]> wrote: > > > I for my part would be happy to see a Delphi-like RAD tool for Python, > > a reference implementation for web programming as part of the standard > > library, Jython 2.5, Python for PHP or whatever attracts new programm

Re: How to be a good programmers?

2006-10-11 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I just started to learn python programming because I need to be in the > group when google come in Madagascar, So I want to know, what kind of > python programming I have to start to learn? Zope?...? > Sorry for My english! You can writ me on [EMAIL PROTECTED] > thanks!

self (was: Python component model)

2006-10-11 Thread Ilias Lazaridis
Peter Maas wrote: > Paul Boddie wrote: > > People who bring up stuff about self and indentation are just showing > > their ignorance, in my opinion, since Python isn't the first language > > to use self in such a way, and many C++ and Java programs use this > > pervasively in order to make attribut

Re: Python component model

2006-10-11 Thread Peter Decker
On 10/10/06, Peter Maas <[EMAIL PROTECTED]> wrote: > I for my part would be happy to see a Delphi-like RAD tool for Python, > a reference implementation for web programming as part of the standard > library, Jython 2.5, Python for PHP or whatever attracts new programmers. I think you should take

Re: python 2.5 & sqlite3

2006-10-11 Thread John Machin
Fredrik Lundh wrote: > BartlebyScrivener wrote: > > Fredrik Lundh wrote: > > > >> wasting time on broken distributions? > > > > It's not broken. > > of course it's broken; the official release ships with properly built > and properly tested versions of the stuff you're struggling to install. > > >

Re: Typing UTF-8 characters in IDLE

2006-10-11 Thread kazuo fujimoto
# I replied to this message by 'Reply' function of my mailer. So this message was not sent to python - list, so I put it again to the python-list. # - Thank you for your reply. On 30 Sep 2006 12:34:59 -0700 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > thanks, it is useful. > > but ,

Re: Adding Worksheets to an Excel Workbook

2006-10-11 Thread wesley chun
> just a small OT question coming from a linux openoffice > system... > > Does there exist something similar for powerpoint? Would be > nice, if anybody can direct me to more examples... fabian, see below for a PP example. you mentioned you were coming from a linux OOo system... are you trying

Re: dicts + amb

2006-10-11 Thread bearophileHUGS
[EMAIL PROTECTED]: > 456 ".itervalues()" lang:python > 415 ".iteritems()" lang:python > 403 ".iterkeys()" lang:python > 387 ".values()" lang:python > 385 ".clear()" lang:python > 256 ".update(" lang:python > 254 ".fromkeys(" lang:python > 224 ".has_key(" lang:python > 201 ".get(" lang:python > 200

Re: dicts + amb

2006-10-11 Thread bearophileHUGS
Marc 'BlackJack' Rintsch: > I don't know if this is documented somewhere but the `reversed()` function > looks for a `__reversed__()` method that returns an iterator. You are right, thank you, I have done some tests already, and I'll soon add that method too. --- Partially relat

Re: Standard Forth versus Python: a case study

2006-10-11 Thread jacko
[EMAIL PROTECTED] wrote: > John Doty: > > Yes. The efficient exact algorithms for this problem use *partial* > > sorts. The Forth one from the FSL is of this class (although I know of > > two better ones for big arrays). But it's tough to beat the efficiency > > of the approximate histogram-based

Re: python 2.5 & sqlite3

2006-10-11 Thread Fredrik Lundh
> > Either way I need to know where to put the sqlite files, right? > > not if you're using a proper release, no. the easiest way to unbreak your ActiveState installation is probably to install the python.org version, and copy c:\Python25\DLLs\_sqlite3.pyd and c:\Python25\DLLs\sql

Re: python 2.5 & sqlite3

2006-10-11 Thread Gabriel Genellina
At Wednesday 11/10/2006 18:45, BartlebyScrivener wrote: > wasting time on broken distributions? It's not broken. I like Pythonwin better than IDLE. Either way I need to know where to put the sqlite files, right? You can download Pythonwin (and the whole win32all packages) from http://sourcef

Re: python 2.5 & sqlite3

2006-10-11 Thread Fredrik Lundh
BartlebyScrivener wrote: > Fredrik Lundh wrote: > >> wasting time on broken distributions? > > It's not broken. of course it's broken; the official release ships with properly built and properly tested versions of the stuff you're struggling to install. > I like Pythonwin better than IDLE. l

Re: Standard Forth versus Python: a case study

2006-10-11 Thread bearophileHUGS
John Doty: > Yes. The efficient exact algorithms for this problem use *partial* > sorts. The Forth one from the FSL is of this class (although I know of > two better ones for big arrays). But it's tough to beat the efficiency > of the approximate histogram-based method the Python stats module > imp

Re: dicts + amb

2006-10-11 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, bearophileHUGS wrote: > I have implemented yet another Odict class: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498195 > It's very slow, but it is O(1) for get, set and del too. > > I have added ritervalues(), rkeys(), etc methods because I presume I > can't

Re: python 2.5 & sqlite3

2006-10-11 Thread BartlebyScrivener
Fredrik Lundh wrote: > wasting time on broken distributions? It's not broken. I like Pythonwin better than IDLE. Either way I need to know where to put the sqlite files, right? rd -- http://mail.python.org/mailman/listinfo/python-list

Re: dicts + amb

2006-10-11 Thread Diez B. Roggisch
> Something unrelated that I don't know where to put. > Recently I have seen the amb operator, it's not a simple operator. I > have seen a (very simple) Ruby implementation: > http://www.randomhacks.net/articles/2005/10/11/amb-operator > I think a good amb implementation is a very complex thing. Ca

python 2.5 build problem on AIX 5.3

2006-10-11 Thread George Trojan
Is there a known problem with ctypes module on AIX? Google did not help me to find anything. Here is part of the output from "make": building '_ctypes' extension xlc_r -q64 -DNDEBUG -O -I. -I/gpfs/m2/home/wx22gt/tools/src/Python-2.5-cc/./Include -Ibuild/temp.aix-5.3-2.5/libffi/include -Ibuild/t

Re: Dive Into Java?

2006-10-11 Thread Bjoern Schliessmann
Diez B. Roggisch wrote: > You don't seem to understand what is happening here. The fact that > string literals in java exist has nothing to do with an implicit > type casting as above example shows. Whoops. "10", arg and _arg /are/ integers, right? > C++ was new, nobody forced them to keep poin

Re: Newbie: trying to twist my head around twisted (and python)

2006-10-11 Thread Bjoern Schliessmann
Jan Bakuwel wrote: > Does anyone know how I need to complete the code below so it > returns this mysterious "Deferred result" and runs? Without having looked at your code at this late hour -- perhaps a short explanation of what a Deferred is will help. If a function wants to returns something th

dicts + amb

2006-10-11 Thread bearophileHUGS
I have implemented yet another Odict class: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498195 It's very slow, but it is O(1) for get, set and del too. I have added ritervalues(), rkeys(), etc methods because I presume I can't use the reversed(). So can an __riter__ hook be generally u

Re: Standard Forth versus Python: a case study

2006-10-11 Thread John Doty
Paul Rubin wrote: > John Doty <[EMAIL PROTECTED]> writes: >> I have a bunch of image files in FITS format. For each raster row in >> each file, I need to determine the median pixel value and subtract it >> from all of the pixels in that row, and then write out the results as >> new FITS files. > >

Re: Python component model

2006-10-11 Thread Peter Maas
Paul Boddie wrote: > People who bring up stuff about self and indentation are just showing > their ignorance, in my opinion, since Python isn't the first language > to use self in such a way, and many C++ and Java programs use this > pervasively in order to make attribute scope explicit, whereas th

Re: nntplib tutorial

2006-10-11 Thread hg
Gabriel Genellina wrote: > At Wednesday 11/10/2006 14:46, hg wrote: > >> Is there such a thing ? >> >> Trying to understand the various strings I get hereunder > > A basic understanding of the protocol would help a lot. The RFC 977 > itself is not so hard to read, but you could find some tutorial

Re: python 2.5 & sqlite3

2006-10-11 Thread Fredrik Lundh
BartlebyScrivener wrote: > Sorry, I have a knack for making things more difficult than they need > to be. I'm on Windows XP and waiting for the ActiveState release of > Python 2.5. I want to experiment with sqlite and I see that Python 2.5 > has the "wrapper" but sqlite itself must be downloaded

Re: Standard Forth versus Python: a case study

2006-10-11 Thread Paul Rubin
John Doty <[EMAIL PROTECTED]> writes: > I have a bunch of image files in FITS format. For each raster row in > each file, I need to determine the median pixel value and subtract it > from all of the pixels in that row, and then write out the results as > new FITS files. I dunno what FITS is, but i

Re: error handling

2006-10-11 Thread Gabriel Genellina
At Wednesday 11/10/2006 16:16, Bernard wrote: I just found this webpage showing the most common exceptions: http://pydoc.org/1.5.2/exceptions.html Why not refer to the *current* documentation? http://docs.python.org/lib/module-exceptions.html (You already have it installed with Python) 1.5.2

Standard Forth versus Python: a case study

2006-10-11 Thread John Doty
I realized that I have a little job on the table that is a fine test of the Python versus Standard Forth code availability and reusability issue. Note that I have little experience with either Python or Standard Forth (but I have much experience with a very nonstandard Forth). I've noodled arou

python 2.5 & sqlite3

2006-10-11 Thread BartlebyScrivener
Sorry, I have a knack for making things more difficult than they need to be. I'm on Windows XP and waiting for the ActiveState release of Python 2.5. I want to experiment with sqlite and I see that Python 2.5 has the "wrapper" but sqlite itself must be downloaded separately. I see no installation

Re: nntplib tutorial

2006-10-11 Thread Gabriel Genellina
At Wednesday 11/10/2006 14:46, hg wrote: Is there such a thing ? Trying to understand the various strings I get hereunder A basic understanding of the protocol would help a lot. The RFC 977 itself is not so hard to read, but you could find some tutorials using google. -- Gabriel Genellina

Re: sufficiently pythonic code for testing type of function

2006-10-11 Thread bruno de chez modulix en face
Theerasak Photha a écrit : > On 10/11/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > > Now the real question : what if the object is not an instance of any of > > the types, but still support the expected interface ? > > Perhaps: > > try: > for attribute in ['foo', 'bar', '__baz__']: >

Re: How to be a good programmers?

2006-10-11 Thread bruno de chez modulix en face
[EMAIL PROTECTED] a écrit : > I just started to learn python programming because I need to be in the > group when google come in Madagascar, So I want to know, what kind of > python programming I have to start to learn? Zope?...? Not sure what you mean about Google and "being in the group", but

Re: Adding Worksheets to an Excel Workbook

2006-10-11 Thread Fabian Braennstroem
Hi, just a small OT question coming from a linux openoffice system... * wesley chun <[EMAIL PROTECTED]> wrote: >> From: [EMAIL PROTECTED] >> Date: Tues, Oct 10 2006 2:08 pm >> >> I'm a Python newbie, and I'm just getting to the wonders of COM >> programming. > > > welcome to Python!! i too, have

Re: Python component model

2006-10-11 Thread Peter Maas
Bruno Desthuilliers wrote: > Peter Maas wrote: [...] >> a reference implementation for web programming as part of the standard >> library, > > wsgiref is part of the 2.5 stdlib. Yes, but it's not an implementation. Think of something like Tomcat for the Java Servlet Specification. -- Regards/G

Re: does raw_input() return unicode?

2006-10-11 Thread Martin v. Löwis
Neil Cerutti schrieb: > I'm all mindboggley. Just when I thought I was starting to > understand how this character encoding stuff works. Are > PythonWin's stdout and stdin implementations is incomplete? Simple and easy: yes, they are. Regards, Martin -- http://mail.python.org/mailman/listinfo/py

Re: Experiences with Py2Exe

2006-10-11 Thread Larry Bates
Isaac Rodriguez wrote: >> I did a project with wxPython and py2exe. Just great :-) I also used >> Inno Setup (http://www.jrsoftware.org/isinfo.php) to create an >> installer. You should be able to learn/use both in one day. >> > > Do you have a specific reason for using Inno Setup and not a Window

Re: error handling

2006-10-11 Thread Bernard
I just found this webpage showing the most common exceptions: http://pydoc.org/1.5.2/exceptions.html I hope this can help in some way. Fulvio wrote: > *** > Your mail has been scanned by InterScan MSS. > *** > > > Hello there, > > Simple question : how do

Re: Adding Worksheets to an Excel Workbook

2006-10-11 Thread wesley chun
> From: [EMAIL PROTECTED] > Date: Tues, Oct 10 2006 2:08 pm > > I'm a Python newbie, and I'm just getting to the wonders of COM > programming. welcome to Python!! i too, have (recently) been interested in COM programming, so much so that i added some material on Microsoft Office (Win32 COM Clien

Re: [Newbie] error handling

2006-10-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fulvio <[EMAIL PROTECTED]> wrote: >*** >Your mail has been scanned by InterScan MSS. >*** > > >Hello there, > >Simple question : how do I manage errors by the use "try/except" clause. >Example: >If I'd like to catch error comi

Re: Experiences with Py2Exe

2006-10-11 Thread Isaac Rodriguez
> > I did a project with wxPython and py2exe. Just great :-) I also used > Inno Setup (http://www.jrsoftware.org/isinfo.php) to create an > installer. You should be able to learn/use both in one day. > Do you have a specific reason for using Inno Setup and not a Windows Installer based setup? Wil

Re: MP3 files and Python...

2006-10-11 Thread Josh Bloom
Dive Into Python also has a little tutorial/code for reading and editing mp3 tags. http://www.diveintopython.org/object_oriented_framework/index.html -JBOn 10/10/06, Max Erickson <[EMAIL PROTECTED]> wrote: Karlo Lozovina <[EMAIL PROTECTED]> wrote:> I'm looking for a Python lib which can read and _w

Re: Alternative constructors naming convention

2006-10-11 Thread Steven Bethard
Will McGugan wrote: > Is there a naming convention regarding alternative constructors? ie > static methods where __new__ is called explicity. Are you really using staticmethod and calling __new__? It's often much easier to use classmethod, e.g.:: class Color(object): ...

Re: Dive Into Java?

2006-10-11 Thread Diez B. Roggisch
Bjoern Schliessmann schrieb: > Diez B. Roggisch wrote: > >> Yes. You can for example create a constructor for object Foo, >> which then is implicitly chosen when assigning an int to a >> variable of that kind. So it acts as a casting operator. I call >> that wicked, and subtle. >> >> class Foo { >

Re: Tkinter: populating Mac Help menu?

2006-10-11 Thread Edward K. Ream
Thanks for these replies. I'll try these ideas soon and report back on my experiences. Edward Edward K. Ream email: [EMAIL PROTECTED] Leo: http://webpages.charter.net/edreamleo/front.html

Re: error handling

2006-10-11 Thread Bernard
Hi Fulvio, I often use this try except to find out about what type of errors might happen in my code: I use it when I really don't know what might happen. try: # do something except: print "Unexpected error:", sys.exc_info()[0] continue once it catches an error, just take a good look

Re: hundreds of seconds?

2006-10-11 Thread Duncan Booth
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > However, be aware that your OS may limit the precision here. I'm not > sure, but I think Windows for example doesn't get faster than 10th or > 100th of a second. 1/100th of a second. > > For more precise timing, you might need a special library/ex

nntplib tutorial

2006-10-11 Thread hg
Hi, Is there such a thing ? Trying to understand the various strings I get hereunder Thanks, hg from nntplib import * s = NNTP('news.central.cox.net') resp, count, first, last, name = s.group('comp.lang.python') print 'Group', name, 'has', count, 'articles, range', first, 'to', last resp,

How to be a good programmers?

2006-10-11 Thread rijamoria
I just started to learn python programming because I need to be in the group when google come in Madagascar, So I want to know, what kind of python programming I have to start to learn? Zope?...? Sorry for My english! You can writ me on [EMAIL PROTECTED] thanks! -- http://mail.python.org/mailman/

Re: 3D Vector Type Line-Drawing Program

2006-10-11 Thread Scott David Daniels
Ron Adam wrote: > Scott David Daniels wrote: >> James Stroud wrote: I'm looking for a program to do line-drawings in 3d, with output to postscript or svg or pdf, etc. I would like to describe a scene with certain 1-3d elements oriented in 3d space with dashed or colored lines

ANN: Advanced Python training course, Nov 8-10, San Francisco

2006-10-11 Thread wesley chun
FINAL REMINDER... we still have some seats left! What: Advanced Python Programming When: Nov 8-10 2006 Where: San Francisco (SFO/San Bruno), CA, USA http://cyberwebconsulting.com (click on "Python Training") This course, meant to follow our in-depth introduction class, adds new tools to the Py

Re: Adding Worksheets to an Excel Workbook

2006-10-11 Thread e . h . doxtator
These are all excellent suggestions. Thanks everyone for your help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python component model

2006-10-11 Thread Paul Boddie
Kay Schluehr wrote: > Paul Boddie wrote: > > > I've never maintained that a monopoly on how Web programming is done > > would be a good thing. All I've ever tried to understand is why people > > haven't tried to improve the generic support for Web programming (and a > > whole load of other things)

Re: How to write Smart Python programs?

2006-10-11 Thread John Salerno
Bruno Desthuilliers wrote: > Now when it comes to GUI toolkits, they are usually coded in another > language, and usually come with language-agnostic GUI designers that use > XML. So the point is already solved somehow !-) > I'm thinking of hand-writing wxPython. I don't use a GUI designer for

Re: Funky file contents when os.rename or os.remove are interrupted

2006-10-11 Thread Fredrik Lundh
Russell Warren wrote: > One last non-python question... a few things I read seemed to vaguely > indicate that the journaling feature of NTFS is an extension/option. http://www.microsoft.com/whdc/system/winpreinst/ntfs-preinstall.mspx NTFS is a journaling file system. NTFS writes a log of chan

Re: Funky file contents when os.rename or os.remove are interrupted

2006-10-11 Thread Russell Warren
Thanks, guys... this has all been very useful information. The machine this is happening on is already running NTFS. The good news is that we just discovered/remembered that there is a write-caching option (in device manager -> HDD -> properties -> Policies tab) available in XP. The note right b

Re: hundreds of seconds?

2006-10-11 Thread Tim Peters
[EMAIL PROTECTED] > ... > G5-fiwihex:~ eur$ python > Python 2.3.5 (#1, Mar 20 2005, 20:38:20) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import time > >>> time.time() > 1160580871.258379 > >>> > > M

Re: what is this UnicodeDecodeError:....?

2006-10-11 Thread kath
John Machin wrote: > kath wrote: > > I have a number of excel files. In each file DATE is represented by > > different name. I want to read the date from those different file. Also > > the date is in different column in different file. > > > > To identify the date field in different files I have cr

[Newbie] error handling

2006-10-11 Thread Fulvio
*** Your mail has been scanned by InterScan MSS. *** Hello there, Simple question : how do I manage errors by the use "try/except" clause. Example: If I'd like to catch error coming from a function call that's using IMAP4 class, which error may raise such

Re: Regular expression worries

2006-10-11 Thread Bruno Desthuilliers
CSUIDL PROGRAMMEr wrote: > folks > I am new to python, so excuse me if i am asking stupid questions. >From what I see, you seem to be new to programming in general !-) > I have a txt file and here are some lines of it > > Document Keyword > Keyword Keyword > Keyword > Keyword Keyword Keyword

Re: Regular expression worries

2006-10-11 Thread Tim Chase
> for l in > open('/root/Desktop/project/chatlog_20060819_110043.xml.txt'): > > l=l.replace("Document", "DOC") > fh.close() > > But it does not replace Document with Doc in the txt file In addition to closing the file handle for the loop *within* the loop, you're changing "l" (s

Re: Regular expression worries

2006-10-11 Thread johnzenger
You are opening the same file twice, reading its contents line-by-line into memory, replacing "Document" with "Doc" *in memory*, never writing that to disk, and then discarding the line you just read into memory. If your file is short, you could read the entire thing into memory as one string usin

Re: How to write Smart Python programs?

2006-10-11 Thread Bruno Desthuilliers
John Salerno wrote: > Bruno Desthuilliers wrote: > >> Googling for "python is not java" may be a good start. > > I have a question about this section of a blog with that title. I'll ask > the question first so it doesn't get lost at the bottom: does the > following opinion of XML apply to GUIs? (

Re: Python component model

2006-10-11 Thread Kay Schluehr
Paul Boddie wrote: > I've never maintained that a monopoly on how Web programming is done > would be a good thing. All I've ever tried to understand is why people > haven't tried to improve the generic support for Web programming (and a > whole load of other things) even to the level of something

Call for Members of Panels on Web Technologies

2006-10-11 Thread Jeff Rush
Talks at previous PyCons have tended to be of the lecture format. I'd like to see if we can get some panel discussions going and am looking for participants. At PyCon 2005 in D.C. Michelle Levesque gave a wonderful talk, PyWebOff, contrasting a few of the web frameworks. However, it is a lot of

Regular expression worries

2006-10-11 Thread CSUIDL PROGRAMMEr
folks I am new to python, so excuse me if i am asking stupid questions. I have a txt file and here are some lines of it Document Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keyword Keywordhttp://mail.python.org/mailman/listinfo/python-list

Re: curses problem reading cursor keys

2006-10-11 Thread Thomas Dickey
Simon Morgan <[EMAIL PROTECTED]> wrote: > I'd also appreciate any pointers to good tutorials on curses, I've read > the one by awk and esr but found it rather brief and lacking in detail. esr only contributed his name - awk wrote the rest. (When I asked why, he only said it sounded like a good id

Re: Dive Into Java?

2006-10-11 Thread Bjoern Schliessmann
Diez B. Roggisch wrote: > Yes. You can for example create a constructor for object Foo, > which then is implicitly chosen when assigning an int to a > variable of that kind. So it acts as a casting operator. I call > that wicked, and subtle. > > class Foo { > int _arg; > public: > Foo(int arg

Re: How to write Smart Python programs?

2006-10-11 Thread Bruno Desthuilliers
Antoine De Groote wrote: > Bruno Desthuilliers wrote: >>> And what does property mean anyway? >> >> See above. A property is a computed attribute : you access it like a >> 'data' attribute, but it really uses getters/setters. The point here is >> that client code doesn't know nor need to know if i

  1   2   >