Re: Wheel-reinvention with Python

2005-08-05 Thread Torsten Bronger
Hallöchen! Mike Meyer <[EMAIL PROTECTED]> writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] > > I notice that the Wikipedia doesn't have a definition for "special > purpose language", instead preferring the phrase "Domain Specific > Langauge". That matches the definition that agree

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope'or'module' better?)

2005-08-05 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Are you sure If I were, I would not have started the statement 'I suspect...'. I do not insert such words accidentally. TJR -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN : dxPython 0.3.0

2005-08-05 Thread Joseph Garvin
Atila Olah wrote: >In my opinion, you shoud make an (100%) English version of the site, if >you want more developers to join worldwide. > > > Isn't there some sort of Python directx thingy already? Surprised. -- http://mail.python.org/mailman/listinfo/python-list

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread Joseph Garvin
[EMAIL PROTECTED] wrote: >I've heard 2 people complain that word 'global' is confusing. > >Perhaps 'modulescope' or 'module' would be better? > >Am I the first peope to have thought of this and suggested it? > >Is this a candidate for Python 3000 yet? > >Chris > > > Hmm.. instead of 'global', ho

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread Mike Meyer
"John Roth" <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > A much better idea would be to fix the underlying > situation that makes the global statement necessary. You can't "fix" this. This code (in some python-like langauge that isn't python): x =

Re: Problem with new python (2.4.1) installation

2005-08-05 Thread john . coppens
>Without the traceback for the first error Hello Peter... There was no traceback to the first error - in none of the cases the error appeared was a traceback present. I just found the error - the configuration of pygtk mentioned right in the middle somewhere that the atk version wasn't up-to-date

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or'module' better?)

2005-08-05 Thread [EMAIL PROTECTED]
I appreciate your comments. You give reasons why you think 'global' is a good idea. Are you sure that 'global' is widely assumed to mean global to a *file* in proper CS theory? Coming from CI assumed 'global' meant global to ENTIRE EXECUTABLE!?!? You even admitted you also thought 'global'

Re: GUI programming, embedding, real time plots, etc.

2005-08-05 Thread Madhusudan Singh
[EMAIL PROTECTED] wrote: > apt-get install python-pwm > this will get you python mega widgets > one of the dependencies that apt will take care of for you is the > python2.whatever-tk. > depending on which version of debian you are using. > i run sarge with python 2.3 Thanks for the help. I trie

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread [EMAIL PROTECTED]
Your solution is the best of them all. However, I don't have the foggiest idea how it would be accomplished. Are you *sure* you can change design so that there is no need for a keyword like 'global'? Please enlighten me. I'd really appreciate it. Chris -- http://mail.python.org/mailman/listi

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread [EMAIL PROTECTED]
Python 3000 is not worried about backward compatibility. It is worried more about what is *best* and getting it done. Trust me. Let me ask an academic questionIs 'global' the *best* choice of all choices in Webster's dictionary? If it is then I'll give up and go home. If not then well.

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread [EMAIL PROTECTED]
I'm not saying 'modulescope' and 'module' are the only alternatives or even the best anyone can come up with. 'global' has the connotation of being visible *EVERYWHERE* where in Python it is just visible in one module's space. Can you think of a better alternative or do you believe 'global' is th

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread EP
Mike Meyer writes: > > The only way ISPs will find out that Python is popular is if potential > customers tell them they need it. So if they say no, be *sure* and > tell them you won't be using them because of that. I think this is an issue of critical mass, but I know minds the like of this g

Point and click GUI builder for Python

2005-08-05 Thread Madhusudan Singh
Is there such a thing for python ? Like Qt Designer for instance ? -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI programming, embedding, real time plots, etc.

2005-08-05 Thread nephish
apt-get install python-pwm this will get you python mega widgets one of the dependencies that apt will take care of for you is the python2.whatever-tk. depending on which version of debian you are using. i run sarge with python 2.3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with new python (2.4.1) installation

2005-08-05 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > After installing python 2.4.1 (previous version 2.3.4), and installing > pygtk 2.6.2, I get the following error message (almost with any program > I try to run): > > ImportError: could not import atk [snip...] > "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/g

Re: Making a timebomb

2005-08-05 Thread Peter Hansen
Cantankerous Old Git wrote: > [EMAIL PROTECTED] wrote: > >> I have a server that right now runs infinitely. I'd like to make it >> die after some amount of time. > > The proper way to do it is to have the timer set a flag that the other > threads check regularly. The threads can then clean up

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Mike Meyer
"Paul McGuire" <[EMAIL PROTECTED]> writes: > Once you find your service based on price/support/etc., send them an > e-mail asking for Python support. The worst they can say is "no, and > we never will," but just as likely they might respond "yes, it's > already there" or "yes, we can add that".

Re: pain

2005-08-05 Thread Mike Meyer
Kent Johnson <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> The compiled jython will pay a performance penalty for being >> dynamic. Where Java knows the type of objects, and can deduce the >> correct method to call at compile time (well, some of the time, >> anyway), the jython code will have

Re: Wheel-reinvention with Python

2005-08-05 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Mike Meyer <[EMAIL PROTECTED]> writes: Torsten Bronger <[EMAIL PROTECTED]> writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten B

Problem with new python (2.4.1) installation

2005-08-05 Thread john . coppens
Hello people. After installing python 2.4.1 (previous version 2.3.4), and installing pygtk 2.6.2, I get the following error message (almost with any program I try to run): ImportError: could not import atk Trying to start PythonCAD, I also get: Traceback (most recent call last): File "/usr/lo

GUI programming, embedding, real time plots, etc.

2005-08-05 Thread Madhusudan Singh
Hi I am still a rookie at python (can do some basic programming with the language), and have been using python gpib and matplotlib to control my instruments and do real time plots. Since I have more than one instrument to control, I was thinking of writing a GUI using Tkinter (looked at Page, but

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or'module' better?)

2005-08-05 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've heard 2 people complain that word 'global' is confusing. I did to at first. > Perhaps 'modulescope' or 'module' would be better? Global is an somewhat short adjective that plausibly becomes a noun when pluralized. That is har

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread John Roth
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've heard 2 people complain that word 'global' is confusing. > > Perhaps 'modulescope' or 'module' would be better? > > Am I the first peope to have thought of this and suggested it? > > Is this a candidate for Python 3000 yet? > > Chr

Re: ANN : dxPython 0.3.0

2005-08-05 Thread Atila Olah
In my opinion, you shoud make an (100%) English version of the site, if you want more developers to join worldwide. -- http://mail.python.org/mailman/listinfo/python-list

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread Atila Olah
I think D H is right. Or even if you'd find out that most of the people would better like 'modulescope' or 'module', (what is, i think, imposible), you'd destroy the backward-compatibility with older versions of Puthon if you implement it. But it won't be implemented. Trust me. -- http://mail.pyt

Re: minidom xml & non ascii / unicode & files

2005-08-05 Thread Martin v. Löwis
webdev wrote: > 1. when fetching a web page from the net, how am i supposed to know how > it's encoded.. And can i decode it to unicode and encode it back to a > byte string so i can use it in my code, with the charsets i want, like > utf-8.. ? It depends on the content type. If the HTTP header de

Creating a virtual file system

2005-08-05 Thread Atila Olah
I'm working on a project to implement a simple cross-platform file sharing protocol (using Python) that is similar to HTTP, and I have to write a GUI for Windows and Linux. But let's start with the harder one: Windows. My question is: How do I implement a virtual partition that acts like a real fi

Re: Making a timebomb

2005-08-05 Thread Cantankerous Old Git
[EMAIL PROTECTED] wrote: > I have a server that right now runs infinitely. I'd like to make it > die after some amount of time. I was thinking of having a timebomb > thread that starts when the server starts. The timebomb sits, and > sleeps for the specified timeout period (e.g., 5 hours), then

Re: Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread D H
[EMAIL PROTECTED] wrote: > I've heard 2 people complain that word 'global' is confusing. > > Perhaps 'modulescope' or 'module' would be better? > > Am I the first peope to have thought of this and suggested it? > > Is this a candidate for Python 3000 yet? It is likely that more people would fin

ANN : dxPython 0.3.0

2005-08-05 Thread Gang Seong Lee
Just opened simple webpage. dxPython ~~ dxPython is a set of interface modules to use DirectX C++ libraries from standard Python programming language. http://dxpython.pythonworld.net/ Comments, suggestions are welcome. Gang Seong LEE [EMAIL PROTECTED] --

Re: socket and os.system

2005-08-05 Thread Peter Hansen
Donn Cave wrote: > Peter Hansen <[EMAIL PROTECTED]> wrote: >>PLEASE learn to format your questions more appropriately! Your post is >>simply _awful_ to read. ... > > For heaven's sake, it wasn't that hard to read. My apologies to the original poster. I did find it very hard to read with th

Re: Do I need to have site.py available or not ?

2005-08-05 Thread Reinhold Birkenfeld
Terry Reedy wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hi, >> on startup my embedded python comes up with "import site failed use >> -v". Later python crashes on Pyrun_file(). This is the first time I >> have used python and I would like to know does it require site.

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Daniel Schüle
[...] > I am aware of the usage of argument to mean the angle in polar > representation, but I don't like it. The word argument already has two > other meanings, one in common English, the other in math/CS. The latter > meaning is the inputs to a function, and that is how the word is used in

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Daniel Schüle
[...] > Derive your own subclass of complex and define those methods. I think something as basic as an angle/arg of complex number definetly belongs to the interface, and it would not even require a great effort to put it there most complex formulas out there use Euler representation it's a was

How to get ScrollRegion to adjust w/ window-size?

2005-08-05 Thread syed_saqib_ali
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust accordingly. However, what I really want to happen is that the area of the canvas that the scrollbars sho

Re: Syntax error after upgrading to Python 2.4

2005-08-05 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error: > import themes > Traceback (most recent call last): > File "", line 1, in ? > File "themes.py", line 564 >font = self.font.makeBlackAndWhite(), >

Re: Do I need to have site.py available or not ?

2005-08-05 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > on startup my embedded python comes up with "import site failed use > -v". Later python crashes on Pyrun_file(). This is the first time I > have used python and I would like to know does it require site.py to be > read in, and ha

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Terry Reedy
"Daniel Schüle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I agree that this is a deficiency. I would think .angle() should be a > > I don't know what nomenclature is used in english speaking > mathematical world for angle of a complex number > I learned it in german as Arg(

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Reinhold Birkenfeld
Erik Max Francis wrote: > Daniel Schüle wrote: > >> maybe I confuse, in german one would say "45 Grad" >> I took a freedom to translate it directly :) >> well, my calculator shows a "D" >> which most likely stands for Degree, I cannot tell for sure > > Probably. In English, you have degrees and

Re: Art of Unit Testing

2005-08-05 Thread Christoph Zwerschke
I had tested the above only with Python 2.4 but I just noticed it does not work with Python 2.3. The following works also with Python 2.3: import unittest class MyTestCase(unittest.TestCase): def setUp(self): print "setUp", def tearDown(self): print "tearDown", d

Replacement for keyword 'global' good idea? (e.g. 'modulescope' or 'module' better?)

2005-08-05 Thread [EMAIL PROTECTED]
I've heard 2 people complain that word 'global' is confusing. Perhaps 'modulescope' or 'module' would be better? Am I the first peope to have thought of this and suggested it? Is this a candidate for Python 3000 yet? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Erik Max Francis
Daniel Schüle wrote: > maybe I confuse, in german one would say "45 Grad" > I took a freedom to translate it directly :) > well, my calculator shows a "D" > which most likely stands for Degree, I cannot tell for sure Probably. In English, you have degrees and gradians, which aren't the same thi

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Erik Max Francis
Daniel Schüle wrote: > what do you think about it? > maybe there exists some proposals aiming this goal? Derive your own subclass of complex and define those methods. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfran

Re: Passing a variable number of arguments to a wrapped function.

2005-08-05 Thread stephen
Using 'plot(*args, **kwargs)' does seem to work just fine. Thanks to all for their suggestions. Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread D H
I would highly recommend user-mode linux (UML) hosting, like bytemark or Linode: http://user-mode-linux.sourceforge.net/uses.html Starting around the same price as average shared hosting, you get your own virtual linux box (i recommend debian), on which you can install java, mod_python, php, mo

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread fuzzylollipop
lazy newbie programmers, that is what the world needs more of for sure! -- http://mail.python.org/mailman/listinfo/python-list

Re: pain

2005-08-05 Thread Kent Johnson
Mike Meyer wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: > > >>On 2005-08-03, Mage <[EMAIL PROTECTED]> wrote: >> >> >>>Isn't jython slower (I mean performance) than java? As well as >>>I understand jython code will be interpreted twice. > > The compiled jython will pay a performance penalty

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-08-05 Thread Ruben Baumann
"windozbloz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Bye Bye Billy Bob... > > I'm back with one more question, then I'll chill. I have scoured the news > and net for info about Borlands KYLIX 3 and have found little technical > info about it. Their screen shots are very imp

Re: Suggestions for optimizing my code

2005-08-05 Thread Robert Kern
drife wrote: > Hello, > > I am looking for suggestions for how I might optimize my > code (make it execute faster), and make it more streamlined/ > elegent. But before describing my code, I want to state that > I am not a computer scientist (I am an atmospheric scientist), > and have but a rudimen

Re: socket and os.system

2005-08-05 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > mfaujour wrote: > > I HAVE THIS PYTHON PROGRAMM: > [snip] > > > socket.error: (98, 'Address already in use') > > > > DOES SOMEONE HAS AN IDEA ? > > PLE

Re: Suggestions for optimizing my code

2005-08-05 Thread Wojciech Mula
drife wrote: > [...] > for row in range(len(Y)): > for col in range(0,row): In this case you should use 'xrange' instead 'range'. w. -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing a variable number of arguments to a wrapped function.

2005-08-05 Thread Bengt Richter
On 5 Aug 2005 08:34:32 -0700, [EMAIL PROTECTED] wrote: >Is there a better way of doing this so that I don't have to go through >every permutation of possible arguments (the example here from the >matplotlib 'plot' function): > >def makeplot(self, xvalues, yvalues, linecolor='', linewidth=''): >

Re: Making a timebomb

2005-08-05 Thread Benjamin Niemann
[EMAIL PROTECTED] wrote: > I have a server that right now runs infinitely. I'd like to make it > die after some amount of time. I was thinking of having a timebomb > thread that starts when the server starts. The timebomb sits, and > sleeps for the specified timeout period (e.g., 5 hours), then

Re: minidom xml & non ascii / unicode & files

2005-08-05 Thread Benjamin Niemann
webdev wrote: > lo all, > > some of the questions i'll ask below have most certainly been discussed > already, i just hope someone's kind enough to answer them again to help > me out.. > > so i started a python 2.3 script that grabs some web pages from the web, > regex parse the data and stores

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Paul McGuire
Just because a hosting service doesn't list Python on their web page doesn't mean that it's not available. My company's service (LunarPages) supports Python, and only recently has it started appearing on their online literature. Once you find your service based on price/support/etc., send them an

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Martin P. Hellwig
Magnus Lycka wrote: > Martin P. Hellwig wrote: > >> Kevin wrote: >> >> >> Well, for some strange reason I have never found that to be a problem. > > > If you develop software for an external customer, and they have > an existing web site run by some ISP that you have no control over, > this mig

Re: Passing a variable number of arguments to a wrapped function.

2005-08-05 Thread John Hunter
> "stephen" == stephen <[EMAIL PROTECTED]> writes: stephen> Is there a better way of doing this so that I don't have stephen> to go through every permutation of possible arguments stephen> (the example here from the matplotlib 'plot' function): You can make linecolor=None and lin

Suggestions for optimizing my code

2005-08-05 Thread drife
Hello, I am looking for suggestions for how I might optimize my code (make it execute faster), and make it more streamlined/ elegent. But before describing my code, I want to state that I am not a computer scientist (I am an atmospheric scientist), and have but a rudimentary understanding of OO pr

Re: Passing a variable number of arguments to a wrapped function.

2005-08-05 Thread en.karpachov
On 5 Aug 2005 08:34:32 -0700 [EMAIL PROTECTED] wrote: > Is there a better way of doing this so that I don't have to go through > every permutation of possible arguments (the example here from the > matplotlib 'plot' function): > > def makeplot(self, xvalues, yvalues, linecolor='', linewidth=''):

Re: Making a timebomb

2005-08-05 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I have a server that right now runs infinitely. I'd like to make it > die after some amount of time. I was thinking of having a timebomb > thread that starts when the server starts. The timebomb sits, and > sleeps for the specified timeout period (e.g., 5 hours), then

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Magnus Lycka
Martin P. Hellwig wrote: > Kevin wrote: > > > Well, for some strange reason I have never found that to be a problem. If you develop software for an external customer, and they have an existing web site run by some ISP that you have no control over, this might well be a problem. Even if the cust

Syntax error after upgrading to Python 2.4

2005-08-05 Thread frr
Hi, After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error: >>> import themes Traceback (most recent call last): File "", line 1, in ? File "themes.py", line 564 font = self.font.makeBlackAndWhite(), additive = self.additive,

Re: Oreilly CodeZoo

2005-08-05 Thread Hamish Macpherson
A sexy design? But yes, there are quite a few out there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Euclid's Algorithm in Python?

2005-08-05 Thread jepler
On Thu, Aug 04, 2005 at 08:13:11PM -0700, Jordan Rastrick wrote: > Raising an assertion error for a < b is a bit of overkill, since its > not really a case of bad input. So normally you see Euclid done like > this: [snipped] My point was not so much that this was the ultimate implementation of GCD

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Daniel Schüle
>>c = 1+1j >>c.arg(angle_mode = cmath.GRAD) -> 45.0 > > > Is that right? The result looks more like Degrees... maybe I confuse, in german one would say "45 Grad" I took a freedom to translate it directly :) well, my calculator shows a "D" which most likely stands for Degree, I cannot tell

Re: newbie question; output from simple print statement

2005-08-05 Thread epost2
thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Daniel Schüle
Hi Terry, >>In my opinion it would also be nice to have the >>possibility to write it as >>c.abs() >>it looks more OO > > > Python is object based but not rigidly OO in syntax or looks. This is an > intentional design decision. Not being gratuitiously redundant is another. I agree, re

Do I need to have site.py available or not ?

2005-08-05 Thread marcus . obrien
Hi, on startup my embedded python comes up with "import site failed use -v". Later python crashes on Pyrun_file(). This is the first time I have used python and I would like to know does it require site.py to be read in, and has anyone got an idea how to pass in the -v without using the python -v c

Re: newbie question; output from simple print statement

2005-08-05 Thread Paul Watson
[EMAIL PROTECTED] wrote: > Can someone explain to me the output of this simple script? I wonder > why ['test1.txt'] is printed before "files in c:\", and also why None > shows up? > > > in file test.py: > > def main(): > > print "files in c:\ :%s" % ListFiles("c:\") > > de

Re: Passing a variable number of arguments to a wrapped function.

2005-08-05 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Is there a better way of doing this so that I don't have to go through > every permutation of possible arguments (the example here from the > matplotlib 'plot' function): Usually, you would just make the defaults for linecolor and linewidth the same as the defaults for

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Kevin
Thank you all for the messages. I agree with Bill on that I was just whining here. I should do a bit more research. I guess I am just getting accustomed to the endless supplies of asp/php hosting services. All I need to do is shopping for the lowest price/good service. But it's not the case for

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Dan Bishop
Terry Reedy wrote: > "Daniel Schüle" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] ... > > unfortunately there is no arg method to get the angle > > of the complex number > > I agree that this is a deficiency. I would think .angle() should be a > no-param method like .conjugate(),

Passing a variable number of arguments to a wrapped function.

2005-08-05 Thread stephen
Is there a better way of doing this so that I don't have to go through every permutation of possible arguments (the example here from the matplotlib 'plot' function): def makeplot(self, xvalues, yvalues, linecolor='', linewidth=''): if linecolor and linewidth: plot(xvalues, yvalues, li

minidom xml & non ascii / unicode & files

2005-08-05 Thread webdev
lo all, some of the questions i'll ask below have most certainly been discussed already, i just hope someone's kind enough to answer them again to help me out.. so i started a python 2.3 script that grabs some web pages from the web, regex parse the data and stores it localy to xml file for fu

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Dan Sommers
On Fri, 05 Aug 2005 15:42:41 +0200, Daniel Schüle <[EMAIL PROTECTED]> wrote: > Hello all, > I often have to deal with complex numbers > using python iteractive as calculator > I wonder why there are no methods like arg, abs > well one can use > c = 1+1j > abs(c) > In my opinion it would also be

Making a timebomb

2005-08-05 Thread callmebill
I have a server that right now runs infinitely. I'd like to make it die after some amount of time. I was thinking of having a timebomb thread that starts when the server starts. The timebomb sits, and sleeps for the specified timeout period (e.g., 5 hours), then does something to make the main t

newbie question; output from simple print statement

2005-08-05 Thread epost2
Can someone explain to me the output of this simple script? I wonder why ['test1.txt'] is printed before "files in c:\", and also why None shows up? in file test.py: def main(): print "files in c:\ :%s" % ListFiles("c:\") def ListFiles(path): for root,dirs,files in os.

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Terry Reedy
"Daniel Schüle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I wonder why there are no methods like arg, abs > well one can use > c = 1+1j > abs(c) > > In my opinion it would also be nice to have the > possibility to write it as > c.abs() > it looks more OO Python is object bas

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Martin P. Hellwig
Kevin wrote: Well, for some strange reason I have never found that to be a problem. But that is perhaps because I'm an administrator and I want full root access, install the OS as I see fit and don't want others on the same (virtual)box. So hosting doesn't work for me I need colo or dedicated.

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Roy Smith
Kevin <[EMAIL PROTECTED]> wrote: >The problem is that it's difficult to find hosting services with Python >installed and supported. I just googled for ["web hosting" python] and got 1,250,000 hits. I can personally recommend panix.com, but there's plenty of other choices too. -- http://mail.pyth

Oreilly CodeZoo

2005-08-05 Thread gene tani
http://radar.oreilly.com/archives/2005/08/codezoo_program_1.html http://python.codezoo.com/ Nice to see that python is in-demand, but what is the rationale for another ASPN cookbook/Parnassus / pypackage / dmoz type repository? -- http://mail.python.org/mailman/listinfo/python-list

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Terry Reedy
"Kevin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The problem is that it's difficult to find hosting services with Python > installed and supported. The Python Wiki has lists of both free and commercial hosting services. The top page is http://wiki.python.org/moin/PythonHos

Re: API class creation

2005-08-05 Thread kman3048
Thanks, that helped a lot. Anybody who wants to attempt the same might find the source code tree of Python i.e. file src/Modules/cdmodule.c helpful. --Matt Daniel Dittmar wrote: > kman3048 wrote: > > Hello, > > > > as a relative newcomer to Python API programming I've got a problem: > > > > To

Re: An editable buffer for the Python shell (similar to '\e' on sql prompts)

2005-08-05 Thread Robert Kern
Steve wrote: > Hi, > When working in the python command shell, I often end up writing more > than 10+ lines of indented code before making a stupid typo. This got > irritating enough for me to do something about it. So, here's an > 'InteractiveConsole with an editable buffer'. > > http://aspn.acti

An editable buffer for the Python shell (similar to '\e' on sql prompts)

2005-08-05 Thread Steve
Hi, When working in the python command shell, I often end up writing more than 10+ lines of indented code before making a stupid typo. This got irritating enough for me to do something about it. So, here's an 'InteractiveConsole with an editable buffer'. http://aspn.activestate.com/ASPN/Cookbook/P

Re: Filtering terminal commands on linux

2005-08-05 Thread Adriaan Renting
Thank you very much for you answer. We are using gear for a couple of reasons, the most improtant being that we use it in a production environment and it's the only package with commercial support under Linux that supports Dual Layer DVDs. (at least according to the person that made the decision to

Re: time.clock() or time.time()

2005-08-05 Thread Magnus Lycka
Shane Hathaway wrote: > However, isn't this thoroughly un-Pythonic? No wonder people have to > ask. Only if they've never read K&R, and I thought that was compulsory! ;^) There are a few python libraries, such as time and math, that are basically just thin wrappers around standard C libraries.

Help on Swig

2005-08-05 Thread Gurpreet Sachdeva
Hi, I am facing a problem with swig while using Pointers: #include void Array(int *ptr) {         int i;         for (i = 0; i < 6; i++)         {                 printf("Index: %d - %d\n",i, *(ptr + i));         } } %module Array %{ extern void Array(int *ptr); #include %} extern void Array(in

Re: Python's CSV reader

2005-08-05 Thread Andrew McLean
In article <[EMAIL PROTECTED]>, Stephan <[EMAIL PROTECTED]> writes >Thank you all for these interesting examples and methods! You are welcome. One point. I think there have been at least two different interpretations of precisely what you task is. I had assumed that all the different "header" l

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Istvan Albert
There are plenty of webhosts that offer python, do a little research. -- http://mail.python.org/mailman/listinfo/python-list

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Benji York
Kevin wrote: > I have been using java (jsp/servlets), vb/asp and perl for a few years. > Almost all my projects are web site development related, and many of my > clients' web sites are hosted on those shared web hosting services. > > The problem is that it's difficult to find hosting services wit

Re: why no arg, abs methods for comlex type?

2005-08-05 Thread Daniel Schüle
> I would also like to see some more functions to make > calculations with complex number more convenient > e.g. > c = 27 c = 27+0j -- http://mail.python.org/mailman/listinfo/python-list

why no arg, abs methods for comlex type?

2005-08-05 Thread Daniel Schüle
Hello all, I often have to deal with complex numbers using python iteractive as calculator I wonder why there are no methods like arg, abs well one can use c = 1+1j abs(c) In my opinion it would also be nice to have the possibility to write it as c.abs() it looks more OO unfortunately there is

Re: The ONLY thing that prevents me from using Python

2005-08-05 Thread Bill Mill
> I really wish Python could be more widely available on web server > machines. This is just my own experience and I would like to hear your > comments. > I would like a pony... no, wait, even better, a unicorn! Peace Bill Mill bill.mill at gmail.com PS (the gist is, why don't you offer some

The ONLY thing that prevents me from using Python

2005-08-05 Thread Kevin
I have been using java (jsp/servlets), vb/asp and perl for a few years. Almost all my projects are web site development related, and many of my clients' web sites are hosted on those shared web hosting services. The problem is that it's difficult to find hosting services with Python installed and

Re: Py: a very dangerous language

2005-08-05 Thread Michael Hudson
Benjamin Niemann <[EMAIL PROTECTED]> writes: > Luis M. Gonzalez wrote: > >> This is great! >> It's absolutely useless, like a real therapist, but it's free! > > Never heard of Eliza? Even Emacs has it built in (Menu Help -> Emacs > Psychiatrist). M-x psy return Cheers, mwh -- Gullible editor

Re: Newbie Program

2005-08-05 Thread Daniel Schüle
Eric schrieb: > I am reading a book on Python and ran across and exercise that I just > can't seem to figure out. Its pretty simple, but I just can't get > past a certain point. > > The task is to create a program that flips a coin 100 times and keeps > track of the total of heads and tails which

Re: Parallel arithmetic?

2005-08-05 Thread jburgy
Dennis Lee Bieber wrote: > On Thu, 04 Aug 2005 20:59:33 -0500, "Terrance N. Phillip" > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > > > Thank-you very much for all the excellent replies. I'm thinking of using > > this to determine if a sequence is a "run" (as in a card game)

Re: Some question about setuptools module

2005-08-05 Thread limodou
2005/8/5, Robert Kern <[EMAIL PROTECTED]>: > limodou wrote: > > > I'm sorry may be this letter is not suit for this maillist. > > You'll get better help on the Distutils-SIG list. > > http://mail.python.org/mailman/listinfo/distutils-sig/ > > Phillip Eby hangs out there for the care and feeding

Re: installing python2.4.1

2005-08-05 Thread TPJ
There are two things I don't like about messages you got. > checking for g++ ... no and > C++ compiler cannot create executables There are two possibilities I can think of now. The first is you have no g++ installed. In this case you should install it (I think it would be very easy, you could

  1   2   >