Re: xmlrpclib question

2004-12-21 Thread chris . lyon
Have you left localhost/127.0.0.1 in the server command? try replacing it with an empty string. -- http://mail.python.org/mailman/listinfo/python-list

memory leak

2004-12-21 Thread Daniel Wheeler
Can python leak memory even if the reference count for all the objects is not increasing? For example: for i in range(N): print ref_count_all_objects() do_something() and every iteration the ref count is constant but the memory usage is increasing. What are the likely problems?

Re: memory leak

2004-12-21 Thread Fredrik Lundh
Daniel Wheeler wrote: > Can python leak memory even if the reference count for all the objects is not > increasing? sure. > For example: > > for i in range(N): > print ref_count_all_objects() > do_something() > > and every iteration the ref count is constant but the memory usage

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Nick Vargish
Doug Holton <[EMAIL PROTECTED]> writes: > If you can't accept free speech and different perspectives, you're > going to be disappointed. But please do not react by trying to > intimidate and troll others here. Weren't you the one telling the rest of us what's appropriate for this group? Maybe yo

Re: memory leak

2004-12-21 Thread Daniel Wheeler
It's using a number of extension modules: scipy Numeric pysparse These are all c extensions and could all be leaking memory independently of course. However, I would like to understand first if pure python can leak without the reference count increasing? On Dec 21, 2004, at 11:41 AM

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Nick Vargish wrote: Doug Holton <[EMAIL PROTECTED]> writes: If you can't accept free speech and different perspectives, you're going to be disappointed. But please do not react by trying to intimidate and troll others here. Weren't you the one telling the rest of us what's appropriate for this g

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Carlos Ribeiro
On Mon, 20 Dec 2004 18:53:01 -0600, Doug Holton <[EMAIL PROTECTED]> wrote: > Let me say it again then, although I do not know why it threatens people > so much: the syntax of boo is indeed virtually identical to python's. > That is what I said and what is clear from the website. Doug, Boo seems t

Re: newbie question

2004-12-21 Thread Luis M. Gonzalez
Peter, Thank you for taking the time to reply in such a detailed and polite way. I'm satisfied by your last post and, although I beg to disagree in a few points, I'm glad to see that we are all slowly going back to a civil way of expressing ourselves. Regarding my first post in this thread, I hop

Re: Should I always call PyErr_Clear() when an exception occurs?

2004-12-21 Thread Timo Virkkala
Nick Coghlan wrote: Although coding in C when you have the Python API to lean on is a hell of a lot better than just coding in C. . . I've lately been coding in C for a Unix programming course in our Univ. Although I've run into many interesting problems, I feel that making the same programs in

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Roger Binns
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: > >> This I again agree with. I understand that Prothon is also a *different* >> though Python inspired language. Also that it is still >> under development. > > http://www.prothon.org/ > >"All

Re: memory leak

2004-12-21 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes However, I would like to understand first if pure python can leak without the reference count increasing? How are you determining that used memory is increasing? Stephen -- Stephen Kellett Object Media Limitedhttp://www

Re: input record sepArator (not sepErator)

2004-12-21 Thread Reinhold Birkenfeld
Peter Otten wrote: > Terry Reedy wrote: > >> 'separate' (se-parate == take a-part) and its derivatives are perhaps the >> most frequently misspelled English word on clp. Seems to be 'par' for the >> course. It has 2 e's bracketing 2 a's. It derives from the Latin >> 'parare', as does pare, so '

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread A.M. Kuchling
On Tue, 21 Dec 2004 08:22:51 -0800, Roger Binns <[EMAIL PROTECTED]> wrote: > That work died due to "a crisis of faith": > http://mylist.net/archives/spry-dev/2004-November/72.html Soon it will be possible to become a well-known programmer without writing any code at all; just issue

Re: Should I always call PyErr_Clear() when an exception occurs?

2004-12-21 Thread Jaime Wyant
On Tue, 21 Dec 2004 01:17:52 -0500, Tim Peters <[EMAIL PROTECTED]> wrote: > [Jaime Wyant] > > I've found that the code below will crash if I don't have the > > PyErr_Clear() function call. Should I always call PyErr_Clear()? > > That's not the right approach. Nearly all Python C API calls can >

Re: newbie question

2004-12-21 Thread Doug Holton
Fredrik Lundh wrote: "have you harrassed a Pythoneer today?" Yes, you have. I'll ask again that you stop. Just because you make a living in part off of a CPython module, doesn't mean we cannot discuss python-related things on this list, or discuss things from the perspective of a python user

Tuple Question

2004-12-21 Thread VanL
Hello, Why is this? >>> class MyTuple(tuple): ... def __getitem__(self, name): ... return tuple.__getitem__(self, name) ... >>> data = (1,2,3,4,5) >>> t = MyTuple(data) >>> t[0] Traceback (most recent call last): File "", line 1, in ? File "", line 3, in __getitem__ TypeError: descr

Re: Should I always call PyErr_Clear() when an exception occurs?

2004-12-21 Thread Fredrik Lundh
Jaime Wyant wrote: > What exactly "happens" if I leave the exception hanging out there? the user of your code will most likely get spurious exceptions raised in odd locations (many python operations assume that the exception state is cleared when you call them, and check the status afterwards) i

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Fredrik Lundh
Fredrik Lundh wrote: >> Do you have financial conflict of interest too like Fredrik? > > I suggest you do your homework, and post an apology. Immediately. oh, never mind. someone who has the necessary insights, and that I respect, has just apologized for your behaviour. -- http://mail.py

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Peter Hansen
A.M. Kuchling wrote: On Tue, 21 Dec 2004 08:22:51 -0800, Roger Binns <[EMAIL PROTECTED]> wrote: That work died due to "a crisis of faith": http://mylist.net/archives/spry-dev/2004-November/72.html Soon it will be possible to become a well-known programmer without writing any code at all; j

Re: input record sepArator (not sepErator)

2004-12-21 Thread Fredrik Lundh
Terry Reedy wrote: > My gripe for the day, just to let non-native writers know what not to imitate. are there any non-native languages where separate are spelled seperate? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Nick Vargish
Doug Holton <[EMAIL PROTECTED]> writes: > I never did any such thing. So it wasn't you that posted the following? > This is comp.lang.python, not comp.lang.logo. Please refrain from > discussing topics not related to CPython. Someone must be spoofing you, then. Or you're working towards a care

Re: Tuple Question

2004-12-21 Thread James Stroud
I don't think the tuple name is working as you expect. I don't know of any reason to redefine "__getitem__()" the way you have done: >>> class MyTuple(tuple): ... pass ... >>> data = (1,2,3,4,5) >>> t = MyTuple(data) >>> t[0] 1 >>> tuple >>> tuple.__getitem__ >>> tuple.__getitem__(0) Tracebac

Re: how to pass globals across modules (wxPython)

2004-12-21 Thread Jorge Luiz Godoy Filho
Fredrik Lundh, TerÃa 21 Dezembro 2004 14:02, wrote: > or a single "application context class" instance, which is passed to > various parts of the system as necessary. Wouldn't that cause a chicken & egg problem? How, then, would one pass such an instance across modules? I'm sorry for my ignoran

Re: Why are tuples immutable?

2004-12-21 Thread Jeff Shannon
Antoon Pardon wrote: Op 2004-12-21, Nick Coghlan schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Why then doesn't python think the same about sorted lists. When I have a sorted list and do operations on it that depend on it being sorted, I can mess things up just as easily by mutating an

HTML purifier using BeautifulSoup?

2004-12-21 Thread Dan Stromberg
Has anyone tried to construct an HTML janitor script using BeautifulSoup? My situation: I'm trying to convert a series of web pages from .html to palmdoc format, using plucker, which is written in python. The plucker project suggests passing html through "tidy", to get well-formed html for pluc

Re: Tuple Question

2004-12-21 Thread James Stroud
I forgot to mention: >>> mytup=("fred","barney") >>> tuple.__getitem__(mytup,0) 'fred' On Tuesday 21 December 2004 09:41 am, VanL wrote: > Hello, > > Why is this? > > >>> class MyTuple(tuple): > > ... def __getitem__(self, name): > ... return tuple.__getitem__(self, name) > ... > >

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Thomas Heller
"A.M. Kuchling" <[EMAIL PROTECTED]> writes: > On Tue, 21 Dec 2004 08:22:51 -0800, > Roger Binns <[EMAIL PROTECTED]> wrote: >> That work died due to "a crisis of faith": >> http://mylist.net/archives/spry-dev/2004-November/72.html > > Soon it will be possible to become a well-known pr

Re: how to pass globals across modules (wxPython)

2004-12-21 Thread Fredrik Lundh
Jorge Luiz Godoy Filho wrote: > > or a single "application context class" instance, which is passed to > > various parts of the system as necessary. > > Wouldn't that cause a chicken & egg problem? How, then, would one pass such > an instance across modules? well, in my applications, subsystems

Re: Tabnanny really useful?

2004-12-21 Thread Yet Another Mike
I'm told Tabnanny was inspired by lint, the Unix utiltity to check C sources (and probably others). Lint was primarily useful in days long ago when CPUs were slow and a compile used a significant amount of resources. In a multiuser environment (we ran an Intel 286 in multiuser mode!!), the com

Re: Why are tuples immutable?

2004-12-21 Thread Fredrik Lundh
Jeff Shannon wrote: > So show us a dictionary (i.e. hash table) implementation that can do this. > You'll need to be able > to derive the old hash from the new hash, of course, so that you can > correctly associate the > values already stored under that key. And you'll have to be able to do

Re: Why are tuples immutable?

2004-12-21 Thread Jeff Shannon
Antoon Pardon wrote: Op 2004-12-17, Jeff Shannon schreef <[EMAIL PROTECTED]>: Now, even if hash were made to equal id... suppose I then pass that dict to a function, and I want to get the value that I've stored under [1,2]. In order to do that, I'd *also* have to pass in the *exact* list tha

Re: Tabnanny really useful?

2004-12-21 Thread Fredrik Lundh
"Yet Another Mike" wrote: > I'm told Tabnanny was inspired by lint, the Unix utiltity to check C sources > (and probably > others). well, I'd say tabnanny was tim's attempt to show guido that it really was possible to create a perfect version of guido's original tabpolice script: http://gr

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Steven Bethard
[EMAIL PROTECTED] wrote: However, is there a good reason why default parameters aren't evaluated as the function is called? (apart from efficiency and backwards compatibility)? So, one of my really common use cases that takes advantage of the fact that default parameters are evaluated at function

Re: Is this a good use for lambda

2004-12-21 Thread Alan G Isaac
So as I understand it, so far the "best" proposal for a replacement of my function-composition function uses a (compatibility reducing) Python 2.4 feature that Nick suggests will end up on "Gotcha" lists. Hmmm: lambda is looking pretty good, I'd say. The readability issue is valid, of course. Bu

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Philippe C. Martin
Sorry but I really feel this incredible waste of energy is polluting an, otherwise, excellent and helpful mailing list. Best regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Change vars in the parent process

2004-12-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Thomas Guettler <[EMAIL PROTECTED]> wrote: >Am Tue, 21 Dec 2004 06:20:09 -0800 schrieb Markus Franz: > >> Hi! >> >> >> Is there any possibility to change vars inside a parent process from >> the inside of a child process? >> Thanks > >Hi, > >No, that's impossible.

Re: Parallelization with Python: which, where, how?

2004-12-21 Thread Irmen de Jong
Jp Calderone wrote: On 21 Dec 2004 05:04:36 -0800, Mike M?ller <[EMAIL PROTECTED]> wrote: Can someone recommend a parallelization approach? Are there examples or documentation? Has someone got experience with stability and efficiency? I am successfully using pyro http://pyro.sourceforge.net for my

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Alan Kennedy
[Roger Binns] That work died due to "a crisis of faith": http://mylist.net/archives/spry-dev/2004-November/72.html [A.M. Kuchling] Soon it will be possible to become a well-known programmer without writing any code at all; just issue grandiose manifestos and plans until everyone is suitably i

Re: Is this a good use for lambda

2004-12-21 Thread Jeff Shannon
Alan G Isaac wrote: So as I understand it, so far the "best" proposal for a replacement of my function-composition function uses a (compatibility reducing) Python 2.4 feature that Nick suggests will end up on "Gotcha" lists. Er, not as far as I can tell the 2.4 feature was what wouldn't wor

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Erik Max Francis
Michael Hoffman wrote: And Python uses the very best features of ABC. What's your point? ;-) Not that I've ever even used Prothon, although I thought the way the implementor dropped it into conversation was non-obnoxious. There could be a valuable lesson here. I'm not talking about the way the im

Re: memory leak

2004-12-21 Thread Daniel Wheeler
I'm on a linux platform and looking in proc/pid/status. Using top shows the same problem. I've actually just found the c routine where the memory is leaking by the painstaking process of taking the difference between memory consumption before and after each python routine. I guess that memory l

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread John Machin
Nick Coghlan wrote: [snip] > delimeter. Hey, Terry, another varmint over here! -- http://mail.python.org/mailman/listinfo/python-list

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Luis M. Gonzalez
Don't worry.. Now we'll make a big group hug therapy and friends again! Cheers, Luis Philippe C. Martin wrote: > Sorry but I really feel this incredible waste of energy is polluting an, > otherwise, excellent and helpful mailing list. > > > Best regards, > > Philippe -- http://mail.python.o

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Grant Edwards
On 2004-12-21, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wrote: > >> (the site is pointing to a new project, Pycs, whose site is pointing to a new >> project, Spry, "the first dynamic language to have all the best capabilities >> of >> Python, Prothon, and C# (actually C-Omega) i

Re: Tuple Question

2004-12-21 Thread Steven Bethard
VanL wrote: Why is this? >>> class MyTuple(tuple): ... def __getitem__(self, name): ... return tuple.__getitem__(self, name) ... >>> data = (1,2,3,4,5) >>> t = MyTuple(data) >>> t[0] Traceback (most recent call last): File "", line 1, in ? File "", line 3, in __getitem__ TypeErr

Re: Tuple Question

2004-12-21 Thread Lonnie Princehouse
> Why is this? It should work.Are you using an old version of Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Read word tables

2004-12-21 Thread Andrew Henshaw
Rameshwari wrote: > > Hi, > > I would like to read a ms-word document using python. > > Basically the word document contains number of tables and the rows > in each table do not have same number of columns. > > Does anyone have a sample code to read a table? > > Thank you > Best Regards, > R

break/continue - newbe

2004-12-21 Thread Ann
I have trouble sometimes figuring out where break and continue go to. Is there some easy way to figure it out, or a tool? TIA Ann -- http://mail.python.org/mailman/listinfo/python-list

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Dave Cook
On 2004-12-20, Bulba! <[EMAIL PROTECTED]> wrote: > I'll soon start development of a specialized small app and need > to choose GUI for it. I've had success with pygtk on win32 and Linux (and OS X with the X11 server installed.) http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ http://gladewin32.s

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Hans Nowak
Doug Holton wrote: Steve Holden wrote: 'Scuse me? This group has a long history of off-topic posting, and anyway who decided that CPython should be the exclusive focus? Even on-topic we can talk about Jython and PyPy as well as CPython. I agree with your point, although Hans Nowak and others may

Re: Parsing apache log files

2004-12-21 Thread SnaiL
Maybe some utilites exists, but I do not know. Now I am writing IDS which will audit apache log files. -- http://mail.python.org/mailman/listinfo/python-list

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Erik Max Francis
Grant Edwards wrote: That seems to imply that you think market sucess == technical merits. Unless you mean that Prothon was a technical failure rather than a market-share failure... Since it was clearly both, I'm not sure why you're making this false dichotomy. Trying to sell Spry, Pycs, or what

Re: extending python with a C-written dll

2004-12-21 Thread Scott David Daniels
Jean-Baptiste PERIN wrote: I can already conclude that either I don't know how to use lcc or it doesn't suit my needs .. I plan to first test the cygwin's gcc compiler before goign to MinGW32 MinGW32 is "Minimalist Gnu for Windows -- 32-bit," and _works_ at being ABI compatible with Microsoft's ABI

[ANNOUNCE] Twentieth release of PythonCAD now available

2004-12-21 Thread Art Haas
Hi. I'm pleased to announce the twentieth development release of PythonCAD, a CAD package for open-source software users. As the name implies, PythonCAD is written entirely in Python. The goal of this project is to create a fully scriptable drafting program that will match and eventually exceed fe

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: Now you're trying to make it seem like I am against free speech on this list, and against people's rights to discuss whatever they want. I never said that, and I in fact enjoy the fact that c.l.py posters are an eclectic bunch who have knowledge of, and like to talk about, a g

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Dave Cook
On 2004-12-20, Paul Rubin wrote: > I think I can put together a useable (but not visually stunning) web > interface faster than I can put together any pure client-side > interface. Web browser "widgets" seem pretty limited to me, though. You don't even have something as simple as a combo box

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Hans Nowak
Doug Holton wrote: Hans Nowak wrote: Now you're trying to make it seem like I am against free speech on this list, and against people's rights to discuss whatever they want. I never said that, and I in fact enjoy the fact that c.l.py posters are an eclectic bunch who have knowledge of, and like

Re: break/continue - newbe

2004-12-21 Thread Jeff Shannon
Ann wrote: I have trouble sometimes figuring out where break and continue go to. Is there some easy way to figure it out, or a tool? Break and continue always operate on the most-nested loop that's currently executing. To show an example, let's add some line numbers to some code... 1) while

Re: break/continue - newbe

2004-12-21 Thread Ann
"Jeff Shannon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ann wrote: > > >I have trouble sometimes figuring out where > >break and continue go to. Is there some easy > >way to figure it out, or a tool? > > > > > > Break and continue always operate on the most-nested loop that's

Re: A reception desk in a sort of office building

2004-12-21 Thread Fredrik Lundh
/.../ Hans: [Boo] may *look* like Python, but its inner workings are nothing like Python /.../ Pointing out the difference is not trolling. Doug: Hans Nowak and others were the ones unsuccessfully trying to control what people could talk about here. Hans: I never said that. Doug: You s

Re: break/continue - newbe

2004-12-21 Thread Fredrik Lundh
"Ann" <[EMAIL PROTECTED]> wrote: > Thanks Jeff, that solves my problem. BTW: is there an easy way to > break/continue out more than one level? not really; to continue more than one level, you have to break out of the inner loop, and make sure the logic in that loop body brings you back to the top

Re: [Mingw-users] Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Danny Smith
From: "Gerhard Haering" >Is there any way I can force mingw to not link in msvcr for things >like strdup? mdkdir /mingw/lib/msvcr71 cp -f libmsvcr71.a /mingw/lib/msvcr71/libmsvcrt.a gcc ${OBJECTS} -L /mingw/lib/msvcr71 Or you could hand edit gcc's specs file, replacing -lmsvcrt with -lwhatever..

Re: Lazy argument evaluation (was Re: expression form of one-to-many dict?)

2004-12-21 Thread Steven Bethard
Nick Coghlan wrote: def lazy(x, *args, **kwds): """Executes x(*args, **kwds) when called""" if args or kwds: return lambda : x(*args, **kwds) else: return x # No arguments, so x must be callable by itself [snip] Huh. I think I like the idea of lazy() much better than I like the curre

Re: Writev

2004-12-21 Thread Adam DePrince
On Sun, 2004-12-19 at 23:43, Jp Calderone wrote: > On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote: > > [snip] > > > > Of course, to take advantage of this requires that writev be exposed. I > > have an implementation of writev. This implementation is reasonably > > s

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Jarek Zgoda
Fredrik Lundh wrote: (and by the way, comp.lang.python isn't "the community". most python pro- grammers are elsewhere, and will only read what we post when googling for the answer to some specific problem...) They are busy writing programs in Python, some of them even do it for the money, 9 AM -

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread Steven Bethard
John Machin wrote: Nick Coghlan wrote: [snip] delimeter. Hey, Terry, another varmint over here! No, no. He's talking about a deli-meter. It's the metric standard for measuring subs and sandwiches. ;) Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: memory leak

2004-12-21 Thread Jean Brouwers
Since you are on Linux, one thing which could be helpful is to lower the virtual memory limit. Before running your program, use the Csh limit command to set the upper limit for vmemory. If there is a leak in your program or in any of the extensions, it will run out of memory earlier. But settin

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread Lenard Lindstrom
Steve Holden <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > > Hi Fredrik, > > Thank you for the suggestion. > > I tried different from/to settings and guess what? The mail came > > thru. > > The script is now.. > > import win32com.client > > s = win32com.client.Dispatch('CDO.Message')

Re: temp file name

2004-12-21 Thread Artur M. Piwko
In the darkest hour on Fri, 17 Dec 2004 17:21:53 +0530, km <[EMAIL PROTECTED]> screamed: > Is there a way to create a unique file name; safely > i have used os.tmpnam() with python2.4, i warns that the usage is a potential > security risk. > Security risk comes from posix tmpnam itself. >From t

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Ed Leafe
On Dec 20, 2004, at 7:25 AM, Bulba! wrote: The long lists of invoices, subcontractors and tasks (possibly hundreds or thousands) will have to be displayed - which toolkit is better for that in your experience? I would appreciate anybody sharing their experiences with relevant toolkits in developmen

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: You said that boo should not be mentioned on this newsgroup. Please point me to the post where I said that. Since everything is stored in Google Groups, it should be easy for you to come up with an URL... if such a post existed. Quote: "this is comp.lang.python, not comp.lan

[ANN] rpncalc-1.1 RPN Calculator For Python

2004-12-21 Thread Raymond L. Buvel
The rpncalc package adds an interactive Reverse Polish Notation (RPN) interpreter to Python. This interpreter allows the use of Python as an RPN calculator. You can easily switch between the RPN interpreter and the standard Python interpreter. Home page: http://calcrpnpy.sourceforge.net/ Changes

Re: break/continue - newbe

2004-12-21 Thread John Machin
Ann wrote: > I have trouble sometimes figuring out where > break and continue go to. Is there some easy > way to figure it out, or a tool? > TIA > Ann You need a tool called py2ftn. It would convert statements like "if a > b: break" to e.g. "IF(A.GT.B)GOTO12345". A longer example; this: while 1

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Hans Nowak
Doug Holton wrote: Hans Nowak wrote: You said that boo should not be mentioned on this newsgroup. Please point me to the post where I said that. Since everything is stored in Google Groups, it should be easy for you to come up with an URL... if such a post existed. Quote: "this is comp.lang.

Re: break/continue - newbe

2004-12-21 Thread John Machin
Ann wrote: > I have trouble sometimes figuring out where > break and continue go to. Is there some easy > way to figure it out, or a tool? > TIA > Ann You need a tool called py2ftn. It would convert a sequence of statements like: while 1: blah1 if cond1: break blah2 if cond2: continue blah3 to:

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Jarek Zgoda
Bulba! wrote: - QT seems to be industrial-strength, but.. it's probably more complex/difficult to use. - wxPython/PythonCard is probably simple to use, but.. are there not some pitfalls that development will fall into once the app starts growing (they all do)? From my point of view, PyQt is easie

File locking is impossible in Windows?

2004-12-21 Thread Pekka Niiranen
Hi, I have used the following example from win32 extensions: -SCRIPT STARTS import win32file import win32con import win32security import pywintypes class Flock: def __init__(self,file): self.file=file secur_att = win32security.SECURITY_ATTRIBUTES()

how to force HTTP 1.1 when using urllib2?

2004-12-21 Thread jacob c.
When I request a URL using urllib2, it appears that urllib2 always makes the request using HTTP 1.0, and not HTTP 1.1. I'm trying to use the "If-None-Match"/"ETag" HTTP headers to conserve bandwidth, but if I'm not mistaken, these are HTTP 1.1 headers, so I can't reasonably expect a web server to

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: Quote: "this is comp.lang.python, not comp.lang.boo." Which is obviously not the same as "Boo should not be mentioned on this newsgroup". I used the exact same phrase in another note except using the term "logo" instead of "boo", and that is the exact interpretation I immedi

Re: input record sepArator (not sepErator)

2004-12-21 Thread Reinhold Birkenfeld
Peter Otten wrote: > Reinhold Birkenfeld wrote: > >>> the web: 4% >>> python: 9% >>> slashdot: 26% >>> perl: 29% * >> >> How did you get these data points? > > I copied the numbers from these pages: > > http://www.google.com/search?q=separate > http://groups-beta.google.com/group/comp.lang.pyth

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Reinhold Birkenfeld
Doug Holton wrote: > Hans Nowak wrote: >>> Quote: >>> "this is comp.lang.python, not comp.lang.boo." >> >> >> Which is obviously not the same as "Boo should not be mentioned on this >> newsgroup". > > I used the exact same phrase in another note except using the term > "logo" instead of "boo

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Erik Max Francis
Doug Holton wrote: I'm not going to dignify that or the rest of your note with a response. Please stop dignifying the whole group, then. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis There was one thing I didn't

Re: input record sepArator (not sepErator)

2004-12-21 Thread Peter Otten
Reinhold Birkenfeld wrote: >> the web: 4% >> python: 9% >> slashdot: 26% >> perl: 29% * > > How did you get these data points? I copied the numbers from these pages: http://www.google.com/search?q=separate http://groups-beta.google.com/group/comp.lang.python/search?group=comp.lang.python&q=sepa

How do I cut parts from a text file

2004-12-21 Thread Rigga
Hi, I am new to Python and need to parse a text file and cut parts out i.e. say the text file contained 5 rows of text: line 1 of the text file line 2 of the text file line 3 of the text file line 4 of the text file line 5 of the text file And the text I want starts at line 2 and goes through to

Re: File locking is impossible in Windows?

2004-12-21 Thread Fredrik Lundh
Pekka Niiranen wrote: > Is there a way around this? How can I stop file being COPIED OVER while > it is being open? you could rename the file before you start updating it, and rename it back when done. -- http://mail.python.org/mailman/listinfo/python-list

Re: input record sepArator (not sepErator)

2004-12-21 Thread Reinhold Birkenfeld
Reinhold Birkenfeld wrote: > Peter Otten wrote: >> Reinhold Birkenfeld wrote: >> the web: 4% python: 9% slashdot: 26% perl: 29% * >>> >>> How did you get these data points? >> >> I copied the numbers from these pages: >> >> http://www.google.com/search?q=separate >> http://g

Re: memory leak

2004-12-21 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes I'm on a linux platform and looking in proc/pid/status. Using top shows the same problem. OK, If you were on Windows I could give you some detailed advice - but for Linux, better that somebody else does it. Linux is not my

Re: convert \uXXXX to native character set?

2004-12-21 Thread Bengt Richter
On Mon, 20 Dec 2004 12:49:39 +0200, Miki Tebeka <[EMAIL PROTECTED]> wrote: >Hello Joe, > >> Is there any library to convert HTML page with \u encoded text to >>native character set, e.g. BIG5. >Try: help("".decode) > But the OP wants to en-code, I think. E.g. (I don't know what Chinese

Re: When was extended call syntax introduced?

2004-12-21 Thread "Martin v. Löwis"
Edward K. Ream wrote: Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html state that the apply function has been deprecated since 2.3. Can anyone tell me when extended call syntax was actually introduced? That was in Python 2.0, see http://www.py

Re: When was extended call syntax introduced?

2004-12-21 Thread Jim Sizelove
Edward K. Ream wrote: Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html state that the apply function has been deprecated since 2.3. Can anyone tell me when extended call syntax was actually introduced? Neither googling nor brief checks of the

Re: When was extended call syntax introduced?

2004-12-21 Thread Fredrik Lundh
Edward K. Ream wrote: > Various documentation pages, e.g. > http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html > state that the apply function has been deprecated since 2.3. > > Can anyone tell me when extended call syntax was actually introduced? Neither > googling nor brief

Re: How do I cut parts from a text file

2004-12-21 Thread Fredrik Lundh
"Rigga" <[EMAIL PROTECTED]> wrote: > I am new to Python and need to parse a text file and cut parts out i.e. say > the text file contained 5 rows of text: > > line 1 of the text file > line 2 of the text file > line 3 of the text file > line 4 of the text file > line 5 of the text file > > And the

Re: A rational proposal

2004-12-21 Thread Mike Meyer
Nick Coghlan <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> I'm willing to do the work to get >> decimals working properly with it. > > Facundo's post reminded me of some of the discussion about the > interaction between floats and Decimal that went on when he was > developing the module that

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Paul Rubin
Dave Cook <[EMAIL PROTECTED]> writes: > Web browser "widgets" seem pretty limited to me, though. You might not care. > You don't even have something as simple as a combo box (i.e. an > editable entry with a drop down), Just put an input field and a dropdown on the page. > let alone the rich se

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread John Machin
Steven Bethard wrote: > John Machin wrote: > > Nick Coghlan wrote: > > [snip] > > > >>delimeter. > > > > Hey, Terry, another varmint over here! > > No, no. He's talking about a deli-meter. It's the metric standard for > measuring subs and sandwiches. ;) > Nobody mention the wurst! I did once, b

When was extended call syntax introduced?

2004-12-21 Thread Edward K. Ream
Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html state that the apply function has been deprecated since 2.3. Can anyone tell me when extended call syntax was actually introduced? Neither googling nor brief checks of the 'What's new in Python

Re: Installing new version, erasing previous versions of Python

2004-12-21 Thread Fredrik Lundh
David Smith wrote: > If I understand the above correctly, 1) "make install" and "make altinstall" > use > the same process, the only difference being the man page update, and the hard > link correct. > 2) that previous versions of python are not deleted. Therefore I should be > able > to inst

Installing new version, erasing previous versions of Python

2004-12-21 Thread David Smith
I currently have Python 2.2 and 2.3.4 installed. I want to install Python 2.4, and erase 2.3.4, but retain 2.2, for I need it for my connectivity program. According to the the documentation: If you have a previous installation of Python that you don't want to replace yet, use make altin

Re: BASIC vs Python

2004-12-21 Thread Mike Meyer
Doug Holton <[EMAIL PROTECTED]> writes: > This is comp.lang.python, not comp.lang.logo. Please refrain from > discussing topics not related to CPython. Doug, please quit trolling this newsgroup. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consult

Re: BASIC vs Python

2004-12-21 Thread Alan Gauld
On Tue, 21 Dec 2004 16:26:57 GMT, Scott Robinson <[EMAIL PROTECTED]> wrote: Speaking of Forth... > was making the point it would be good for general purpose. I suspect > that it would quickly run up against memory limitations and would go > no faster than the machine driving the memory market (wit

<    1   2   3   >