SPE 0.7.0.a Python IDE now with UML Viewer

2004-12-21 Thread www.stani.be
Spe is a python IDE with auto-indentation, auto completion, call tips, syntax coloring, uml viewer, syntax highlighting, class explorer, source index, auto todo list, sticky notes, integrated pycrust shell, python file browser, recent file browser, dragdrop, context help, ... Special is its

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

2004-12-21 Thread Ville Vainio
Doug == Doug Holton [EMAIL PROTECTED] writes: Doug I already stated that I will not mention boo again, to Doug comply with Fredrik's wishes and yours. I will refer to Relax, and go ahead talking about Boo all you want. I for one enjoy reading about it, and probably many others as well.

Re: Operators as functions

2004-12-21 Thread Anders Andersson
Steve Holden wrote: Anders Andersson wrote: Hello I want to concatinate (I apologize for bad English, but it is not my native language) a list of strings to a string. I could use (I think): s = map(lambda x: s.append(x), theList) But I want to do something like (I think that the code above is

Re: Operators as functions

2004-12-21 Thread Anders Andersson
Peter Hansen wrote: Anders Andersson wrote: I want to concatinate (I apologize for bad English, but it is not my native language) a list of strings to a string. I could use (I think): s = map(lambda x: s.append(x), theList) But I want to do something like (I think that the code above is

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread ian
Heavy sigh... grin == This script WILL send the email import win32com.client s = win32com.client.Dispatch('CDO.Message') c = win32com.client.Dispatch('CDO.Configuration') cdoSourceOutlookExpress = 2 c.Load(cdoSourceOutlookExpress) s.Configuration = c s.From = [EMAIL PROTECTED] s.To = [EMAIL

Re: Is this a good use for lambda

2004-12-21 Thread Roel Schroeven
Alan G Isaac wrote: I need a clarification of the argument. Are the opponents saying that I should not be able to: def compose(list_of_functions): return reduce(lambda f, g: lambda x: f(g(x)), list_of_functions) Personally, I think something like this is a place where lambdas are probably better

Re: convert \uXXXX to native character set?

2004-12-21 Thread Christian Ergh
Miki Tebeka 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) I use HTMLFilter.py, you can download it at http://www.shearersoftware.com/software/developers/htmlfilter/ Cheers Chris --

Re: Is this a good use for lambda

2004-12-21 Thread Roel Schroeven
Replying to myself, with a simpler version: Roel Schroeven wrote: Alan G Isaac wrote: def compose(list_of_functions): return reduce(lambda f, g: lambda x: f(g(x)), list_of_functions) def compose(list_of_functions): def compose2(f, g): def func(x): return f(g(x))

Re: Tabnanny really useful?

2004-12-21 Thread Franz Steinhaeusler
On Mon, 20 Dec 2004 13:00:39 -0600, John Roth [EMAIL PROTECTED] wrote: Tabnanny is intended to check whether indentation has mixed tabs and spaces. Files with mixed tabs and spaces _can_ compile just fine if the editor that produced them agrees with the compiler about the number of spaces that a

Re: Operators as functions

2004-12-21 Thread Fredrik Lundh
Anders Andersson wrote: I want to concatinate (I apologize for bad English, but it is not my native language) fast det stavas iofs inte konkatinera på svenska heller ;-) a list of strings to a string. And here is the questions: What to replace concatinating function with? Can I in some

Re: Tabnanny really useful?

2004-12-21 Thread Fredrik Lundh
Franz Steinhaeusler wrote: Thanks for your explanation. I tried an found: def a(): -print -.print where point is a space. tabnanny here complains and python compile it just fine. really? that's a syntax error (you cannot change indentation nillywilly inside a block), and the Python

Re: extending python with a C-written dll

2004-12-21 Thread Jean-Baptiste PERIN
That's got nothing to do with Python. You have to compile extensions using a compiler that has an ABI that's compatible with the ABI of the compiler used to compile Python. You appear to be using a binary distribution of Python that was compiled with MSVS 6.0, therefore, you have to compile

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Phil Thompson
I admit that I don't know much about Qt in Windows. As, I said, I've never seen it. The fact that they don't offer a GPLed version for Windows is a deterrent for me. I have heard very nice things about Qt's api. I even bought a book on it, but since the apps I've needed to write, had to

Re: Why are tuples immutable?

2004-12-21 Thread Antoon Pardon
Op 2004-12-17, Jeff Shannon schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2004-12-17, Jeff Shannon schreef [EMAIL PROTECTED]: (And I have to reiterate, here, that I have *never* felt it a hardship to be unable to use lists as dictionary keys; it's just never come up that the data

Re: extending python with a C-written dll

2004-12-21 Thread Jean-Baptiste PERIN
Steve Holden a écrit : Jean-Baptiste PERIN wrote: error: Python was built with version 6 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed. How do you expect to be able to write your own extension if you don't have the environment

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

2004-12-21 Thread Michael Hoffman
Erik Max Francis wrote: How bizarre is it that they're trying to sell Spry by indicating it uses the very best features of Prothon, given that Prothon was a failed project? And Python uses the very best features of ABC. What's your point? ;-) Not that I've ever even used Prothon, although I

Keyword arguments - strange behaviour?

2004-12-21 Thread brian . bird
Can anyone explain the behaviour of python when running this script? def method(n, bits=[]): ... bits.append(n) ... print bits ... method(1) [1] method(2) [1, 2] It's the same in python 1.5, 2.3 and 2.4 so it's not a bug. But I expected the variable bits to be re-initialised to an

Re: extending python with a C-written dll

2004-12-21 Thread Jean-Baptiste PERIN
Jean Brouwers a écrit : First, you might check the calldll module available here http://www.nightmare.com/software.html I have one or two things to try before ..but it looks interesting .. thank you very much .. Take a look at Pyrex, it may fit your requirements to access C from Python.

Re: Why are tuples immutable?

2004-12-21 Thread Antoon Pardon
Op 2004-12-18, Nick Coghlan schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Would you have us construct two related classes each time we find ourselves in such a situation and copy an object from one class to the other depending on the circumstances? Python itself seems to think so, given

Re: extending python with a C-written dll

2004-12-21 Thread Jean-Baptiste PERIN
Note that MinGW32 is a tested path for building (free) C extensions. I don't know if anyone has a tested way of using lcc. Yes, very interesting I can already conclude that either I don't know how to use lcc or it doesn't suit my needs .. in both case I have to quickly get rid of it .. before I

wxPython documentation [was: Best GUI for small-scale accounting app?]

2004-12-21 Thread Richie Hindle
[Gerhard, quoting a blog] wxPython doesn't seem bad, but it lacks any documentation I see this a lot, and it baffles me. wxPython is a thin wrapper over wxWidgets, which is very well documented. Where they differ, the wxWidgets documentation discusses those differences. Add the excellent

Re: Is this a good use for lambda

2004-12-21 Thread Nick Coghlan
Alan G Isaac wrote: I need a clarification of the argument. Are the opponents saying that I should not be able to: def compose(list_of_functions): return reduce(lambda f, g: lambda x: f(g(x)), list_of_functions) As things stand, I can live with lambda. However, if something can't be said in a

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread deelan
[EMAIL PROTECTED] wrote: Can anyone explain the behaviour of python when running this script? (...) Is there a good reason why these scripts are not the same? I can understand how/why they are different, it's just not what I expected. (It seems strange to me that the result of the first method can

Re: extending python with a C-written dll

2004-12-21 Thread Jean-Baptiste PERIN
John Machin a écrit : Jean-Baptiste PERIN wrote: Hi, I'm trying to make a windows dll reachable from a python script .. and I'm encountering troubles during link step .. I use lcc to compile and link I use python 2.3 under win XP [snip] Here are the errors : - Error

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: Can anyone explain the behaviour of python when running this script? the language reference has the full story: http://www.python.org/doc/2.4/ref/function.html Default parameter values are evaluated when the function definition is executed /F --

Re: A rational proposal

2004-12-21 Thread Nick Coghlan
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 eventually made it into the standard library. Perhaps

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

2004-12-21 Thread Fredrik Lundh
Michael Hoffman wrote: How bizarre is it that they're trying to sell Spry by indicating it uses the very best features of Prothon, given that Prothon was a failed project? And Python uses the very best features of ABC. did you learn that from reading Python marketing material, or by

Re: List limits

2004-12-21 Thread Nick Coghlan
Raymond Hettinger wrote: How many items can be stored in a Python list? I have close to 70,000 items... is this within a lists limits? Lists store pointers to objects. Unless you have a lot of duplicates, it is the objects themselves that will consume most of your memory. The list itself will

Re: Why are tuples immutable?

2004-12-21 Thread Antoon Pardon
Op 2004-12-17, Jeff Shannon schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Op 2004-12-17, Jeff Shannon schreef [EMAIL PROTECTED]: To take another approach -- given some function that allows lists to (pretend to be) hashable: . key = [1,2] . d[key] = 'foo' . d[[1,2]] . key.append(3) .

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Duncan Booth
wrote: Can anyone explain the behaviour of python when running this script? def method(n, bits=[]): ... bits.append(n) ... print bits ... method(1) [1] method(2) [1, 2] It's the same in python 1.5, 2.3 and 2.4 so it's not a bug. But I expected the variable bits to be

Re: Why are tuples immutable?

2004-12-21 Thread Antoon Pardon
Op 2004-12-18, Nick Coghlan schreef [EMAIL PROTECTED]: Jp Calderone wrote: On Fri, 17 Dec 2004 11:21:25 -0800, Jeff Shannon [EMAIL PROTECTED] wrote: The correct characterization is that Python makes user-defined mutable classes hashable (arguably correctly so) as the default behavior.

Re: Is this a good use for lambda

2004-12-21 Thread Steven Bethard
Nick Coghlan wrote: def compose(list_of_functions): application_order = reversed(list_of_functions) def composed(x): for f in application_order: x = f(x) return x return composed reversed returns an iterator to the list in reverse order, not a copy of the list: lst =

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

2004-12-21 Thread Nick Coghlan
Tim Peters wrote: Note that the Python implementation itself uses the Python C API heavily, in its C files. You can study those to get many examples of best practice. It will help to remember that coding in C isn't supposed to fun 0.9 wink. That's right. Coding in C is supposed to remind you why

Re: Tabnanny really useful?

2004-12-21 Thread Franz Steinhaeusler
On Tue, 21 Dec 2004 10:24:40 +0100, Fredrik Lundh [EMAIL PROTECTED] wrote: Franz Steinhaeusler wrote: Thanks for your explanation. I tried an found: def a(): -print -.print where point is a space. tabnanny here complains and python compile it just fine. really? that's a syntax error

Read word tables

2004-12-21 Thread Rameshwari
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, Rameshwari --

Re: Is this a good use for lambda

2004-12-21 Thread Nick Coghlan
Steven Bethard wrote: Nick Coghlan wrote: def compose(list_of_functions): application_order = reversed(list_of_functions) def composed(x): for f in application_order: x = f(x) return x return composed so you either need to call reversed each time in 'composed' or copy the

Re: Why are tuples immutable?

2004-12-21 Thread Antoon Pardon
Op 2004-12-18, Roy Smith schreef [EMAIL PROTECTED]: Nick Coghlan [EMAIL PROTECTED] wrote: [quoting from the Reference Manual] If a class defines mutable objects and implements a __cmp__() or __eq__() method, it should not implement __hash__(), since the dictionary implementation requires

Re: Read word tables

2004-12-21 Thread Peter Nuttall
On Tuesday 21 Dec 2004 11:24, 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

Parallelization with Python: which, where, how?

2004-12-21 Thread Mike M?ller
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 parallelization task (8 node Linux cluster, embarrassing parallel). It comes with a

Re: List limits

2004-12-21 Thread Fredrik Lundh
Nick Coghlan wrote: Given the size of the counter, is it actually physically possible for a list to run out of room before the application runs out memory? depends on the system architecture, of course: consider an 64-bit computer with 32-bit integers and 256 GB of memory... /F --

Python, VB and COM

2004-12-21 Thread Nick Leaton
I have a class built as a class library. It makes a Test.dll, and I can call this from other VB projects class PyTest private _name as string Public Property Name() as string Get return _name End Get Set (byval value as string) _name = value End Set End Property End Class Then I was expecting

Re: BASIC vs Python

2004-12-21 Thread Steve Holden
Doug Holton wrote: Mike Meyer wrote: Logo (my pick) has been called Lisp without the parenthesis. It has the advantage of using standard algebraic notation for formulas, instead of operator post or pre. mike This is comp.lang.python, not comp.lang.logo. Please refrain from discussing

Re: odbc script

2004-12-21 Thread Peter Hansen
Steve Holden wrote: Please note that the odbc module is a bit long in the totth now, though it surely is convenient to get it with win32all. If this work is being done for personal use you might want to look at www.egenix.com and think about installing the mxODBC module, which I have used with

Re: Easy here documents ??

2004-12-21 Thread Jim Sizelove
Doug Holton wrote: Bengt Richter wrote: variable1 = 1 variable2 = 2 s = v = ${variable1} v2's value is: ${variable2} However, Python 3.0 is likely years away. If you want to know how to run code like this today, consult Fredrik Lundh. Or replace ${...} with equally simple %(...)s in the

Re: Tabnanny really useful?

2004-12-21 Thread Steve Holden
Franz Steinhaeusler wrote: On Tue, 21 Dec 2004 10:24:40 +0100, Fredrik Lundh [EMAIL PROTECTED] wrote: Franz Steinhaeusler wrote: Thanks for your explanation. I tried an found: def a(): -print -.print where point is a space. tabnanny here complains and python compile it just fine. really? that's

Re: better lambda support in the future?

2004-12-21 Thread Antoon Pardon
Op 2004-12-17, Terry Reedy schreef [EMAIL PROTECTED]: Jason Zheng [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Steven Bethard wrote: Jason Zheng wrote: I'm wondering why python still has limited lambda support. What's stopping the developers of python to support more

Re: Easy here documents ??

2004-12-21 Thread Steve Holden
Doug Holton wrote: Bengt Richter wrote: variable1 = 1 variable2 = 2 s = v = ${variable1} v2's value is: ${variable2} However, Python 3.0 is likely years away. If you want to know how to run code like this today, consult Fredrik Lundh. Or replace ${...} with equally simple %(...)s in the

Re: xmlrpclib question

2004-12-21 Thread Fredrik Lundh
writeson [EMAIL PROTECTED] wrote: I tried the xmlrpclib examples from the Python Cookbook and had a problem. The example works fine so long as the server and client are on the same machine. But as soon as I try to run the client from another machine (all linux machines on the same network) I

Re: Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Gerhard Haering
Of not so much interest to most Pythoneers, but ... I cross-posted this to python-list to make people aware that thare are *real* problems with mingw + Python 2.4, not only theoretical ones. -- Gerhard signature.asc Description: Digital signature --

Re: Easy here documents ??

2004-12-21 Thread Fredrik Lundh
Steve Holden wrote: If you would like to use % instead of $, I recommend requesting that feature for Python 3.0: http://www.python.org/cgi-bin/moinmoin/Python3.0 Or use boo - it's probably in there already ;-) weren't you supposed to ask me about it? /F --

python cookbook

2004-12-21 Thread emami
L.S., I have heard that Python cookbook is free! Could somebody tell me where I can find it? The second one is that I am busy to translate some csh/bash scripts to Python script. Where can I find a good reference to do easy this work? with regards, Nader --

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread brian . bird
Thanks, this makes perfect sense. The phrase which sums it up neatly is Default parameter values are evaluated when the function definition is executed However, is there a good reason why default parameters aren't evaluated as the function is called? (apart from efficiency and backwards

Re: Python, VB and COM

2004-12-21 Thread Steve Holden
Nick Leaton wrote: I have a class built as a class library. It makes a Test.dll, and I can call this from other VB projects class PyTest private _name as string Public Property Name() as string Get return _name End Get Set (byval value as string) _name = value End Set End Property End Class Then I

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Fredrik Lundh
[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)? how would you handle this case: def function(arg=otherfunction(value)): return arg /F --

Re: Why are tuples immutable?

2004-12-21 Thread Nick Coghlan
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 element in that sorted list as I can mess things up by mutating a dictionary key.

Re: Tabnanny really useful?

2004-12-21 Thread Franz Steinhaeusler
On Tue, 21 Dec 2004 08:36:31 -0500, Steve Holden [EMAIL PROTECTED] wrote: Franz Steinhaeusler wrote: [...] Oh sorry, I meant def a(): -print ..-print C:\Python23\Libtabnanny.py -v c:\franz.py 'c:\\franz.py': *** Line 3: trouble in tab city! *** offending line: ' \tprint\n' indent not

Re: Change vars in the parent process

2004-12-21 Thread Thomas Guettler
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. At least on unix. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ --

Re: Python, VB and COM

2004-12-21 Thread Nick
Thanks Steve. I eventually found the library. Running makepy over the library produced the requisite file. Its working. Help appreciated. Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabnanny really useful?

2004-12-21 Thread Steve Holden
Franz Steinhaeusler wrote: On Tue, 21 Dec 2004 08:36:31 -0500, Steve Holden [EMAIL PROTECTED] wrote: Franz Steinhaeusler wrote: [...] Oh sorry, I meant def a(): -print ..-print C:\Python23\Libtabnanny.py -v c:\franz.py 'c:\\franz.py': *** Line 3: trouble in tab city! *** offending line: '

Re: Easy here documents ??

2004-12-21 Thread Steve Holden
Fredrik Lundh wrote: Steve Holden wrote: If you would like to use % instead of $, I recommend requesting that feature for Python 3.0: http://www.python.org/cgi-bin/moinmoin/Python3.0 Or use boo - it's probably in there already ;-) weren't you supposed to ask me about it? /F Aah, right, sorry

Re: newbie question

2004-12-21 Thread Luis M. Gonzalez
Fredrik Lundh wrote: it's the new Boo marketing motto: have you harrassed a Pythoneer today? Fredrik, I think you're being a little bit injust. As far as I could see, everythime the word boo is typed, some sort of censorship or plain bashing comes up, and I think this is not fair. In my case,

xmlrpclib question

2004-12-21 Thread writeson
Hi, I tried the xmlrpclib examples from the Python Cookbook and had a problem. The example works fine so long as the server and client are on the same machine. But as soon as I try to run the client from another machine (all linux machines on the same network) I get a socket.error 111, connection

Re: python cookbook

2004-12-21 Thread Steve Holden
emami wrote: L.S., I have heard that Python cookbook is free! Could somebody tell me where I can find it? In your stocking this Christmas, I hope, otherwise you'll probably have to pay for the printed version. The recipes are extracted from the ActiveState web site, however - see

Re: Change vars in the parent process

2004-12-21 Thread Steve Holden
Markus Franz wrote: Hi! Is there any possibility to change vars inside a parent process from the inside of a child process? Thanks Not without adopting some specific inter-process mechanism such as a network socket. The idea is that processes are *intended* to provide protection boundaries

Re: python cookbook

2004-12-21 Thread Fredrik Lundh
emami [EMAIL PROTECTED] wrote: I have heard that Python cookbook is free! http://aspn.activestate.com/ASPN/Python/Cookbook/ Could somebody tell me where I can find it? google? /F -- http://mail.python.org/mailman/listinfo/python-list

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

2004-12-21 Thread Nick Coghlan
Mike Meyer wrote: Personally, I'd love a language feature that let you create a function that didn't evaluate arguments until they were actually used - lazy evaluation. That lets you write the C ?: operator as a function, for a start. The basic idea is to just specify that those arguments must be

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread brian . bird
def function(arg=otherfunction(value)): return arg My expectation would have been that otherfunction(value) would be called if (and only if) the arg keyword parameter was missing from the function() call (ie. the optional value is evaluated the lazy way). Also, otherfunction would be called each

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: def function(arg=otherfunction(value)): return arg My expectation would have been that otherfunction(value) would be called if (and only if) the arg keyword parameter was missing from the function() call (ie. the optional value is evaluated the lazy way). what

Re: Tabnanny really useful?

2004-12-21 Thread Franz Steinhaeusler
On Tue, 21 Dec 2004 09:34:47 -0500, Steve Holden [EMAIL PROTECTED] wrote: Hello Steve, I've used drpython, and liked it. thank you, I'm sure, our project Admin will be pleased to hear this :) I think it would be a good way for people to start to use the language, yes, this project is

Change vars in the parent process

2004-12-21 Thread Markus Franz
Hi! Is there any possibility to change vars inside a parent process from the inside of a child process? Thanks Markus -- http://mail.python.org/mailman/listinfo/python-list

How to extend inner classes?

2004-12-21 Thread harold fellermann
Thank you very much. Of course I know how to do it in python. The problem is that I want to reimplement these classes as a python extension in C. The question is: how can I add class members (like e.g. inner classes) to a PyTypeObject defined in a C extension? - harold - You can define a class

Re: BASIC vs Python

2004-12-21 Thread Ruben Baumann
Doug Holton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mike Meyer wrote: Logo (my pick) has been called Lisp without the parenthesis. It has the advantage of using standard algebraic notation for formulas, instead of operator post or pre. mike This is

Re: Processes and their childs

2004-12-21 Thread Jeff Epler
flush your files before forking. For me, this program gives the correct output 'hello\n' when correct=1. When correct=0, I get either 'hello\nhello' or 'hellohello\n' as output. correct = 0 import sys, os

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

2004-12-21 Thread Jp Calderone
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: Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Thomas Heller
Gerhard Haering [EMAIL PROTECTED] writes: Hello, I used to build Python extension modules with mingw. Now, Python has switched to the MSVCR71 runtime with version 2.4, and I thought mingw has support for this. But I get problems with symbols being referenced from the wrong DLLs. You can

Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Gerhard Haering
Hello, I used to build Python extension modules with mingw. Now, Python has switched to the MSVCR71 runtime with version 2.4, and I thought mingw has support for this. But I get problems with symbols being referenced from the wrong DLLs. You can see the problem by compiling this:

Re: python cookbook

2004-12-21 Thread Franz Steinhaeusler
On Tue, 21 Dec 2004 14:54:23 +0100, emami [EMAIL PROTECTED] wrote: L.S., I have heard that Python cookbook is free! Could somebody tell me where I can find it? [...] You mean, the whole cookbook as chm archive? It was published first, but then removed again. For reasons:

Processes and their childs

2004-12-21 Thread Markus Franz
Hi! Inside a Python script (I use Python 2.4) several different child processes are created by using os.fork(). My problem: I want only the parent process to print some output and then create the child processes. But even If I use print BEFORE using os.fork, everything that was printed by the

Re: Tabnanny really useful?

2004-12-21 Thread John Roth
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do you think tabnanny is a useful piece of code now? I used it a lot when I first started using Python, and still run it over code from unknown sources (no pun intended) from time to time. I think it's a lot less useful

Re: Read word tables

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 11:24:35 + schrieb Rameshwari: 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? Hi,

Re: Tabnanny really useful?

2004-12-21 Thread Steve Holden
John Roth wrote: [...] I know what I would like to see in an editor: First, it autodetects whether the module uses tabs consistently, spaces consistently or a mixture. If it uses tabs consistently, it then uses the current default. If it uses spaces consistently, it should also autodetect the

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread harold fellermann
Hi, I cannot see any strange behavior. this code works exacly as you and I suspect: def otherfunction(x) : ... return x ... def function(arg=otherfunction(5)) : ... return arg ... function(3) 3 function() 5 Or is this not what you excepted? - harold - On 21.12.2004, at 15:47, [EMAIL

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

2004-12-21 Thread Aahz
In article [EMAIL PROTECTED], Michael Hoffman [EMAIL PROTECTED] wrote: Doug Holton wrote: Istvan Albert wrote: All that boo does is borrows a few syntactical constructs from python. Calling it virtually identical is *very* misleading. The syntax is indeed virtually identical to python.

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Fredrik Lundh
harold fellermann wrote: I cannot see any strange behavior. this code works exacly as you and I suspect: you seem to have missed some of the posts that led up to the one you replied to. (most importantly, the first one). /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Keyword arguments - strange behaviour?

2004-12-21 Thread Steve Holden
harold fellermann wrote: Hi, I cannot see any strange behavior. this code works exacly as you and I suspect: def otherfunction(x) : return x def function(arg=otherfunction(5)) : return arg function(3) 3 function() 5 Or is this not what you excepted?

Re: atmosphere on c.l.py (WAS: How about pure virtual methods?)

2004-12-21 Thread Aahz
In article [EMAIL PROTECTED], Doug Holton [EMAIL PROTECTED] wrote: Unfortunately, I may have jumped the gun on that one. He does not even acknowledge his behavior outside of the three instances he referred to. From my POV, your use of a munged e-mail address makes you far more antisocial than

Re: newbie question

2004-12-21 Thread Peter Hansen
Luis M. Gonzalez wrote: As far as I could see, everythime the word boo is typed, some sort of censorship or plain bashing comes up, and I think this is not fair. Luis, your defense of the genial nature of the newsgroup/mailing list is admirable, and I thank you for it. I think doing this by

Re: Tabnanny really useful?

2004-12-21 Thread Franz Steinhaeusler
On Tue, 21 Dec 2004 09:06:12 -0600, John Roth [EMAIL PROTECTED] wrote: Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do you think tabnanny is a useful piece of code now? I used it a lot when I first started using Python, and still run it over code from unknown

Re: Why are tuples immutable?

2004-12-21 Thread Antoon Pardon
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 element in that sorted

Re: how to pass globals across modules (wxPython)

2004-12-21 Thread Jorge Luiz Godoy Filho
Peter Hansen, Segunda 20 Dezembro 2004 08:01, wrote: An even better approach might be to find a way to avoid having to access the main window through a global, but I'll have to leave this up to you, as it may depend on your program structure. This might be a problem also to share a database

getting env variable from bourne shell script

2004-12-21 Thread biner
Hello, I have file called PARAMETRES that is used in bourne shell script to define variable. In order to do so I put a . PARAMETRES line and the script has acces to all the variable defined in the PARAMETRES file. Now, I would like to be able to get the same thing in python. I googled and

Re: how to pass globals across modules (wxPython)

2004-12-21 Thread Fredrik Lundh
Jorge Luiz Godoy Filho wrote: An even better approach might be to find a way to avoid having to access the main window through a global, but I'll have to leave this up to you, as it may depend on your program structure. This might be a problem also to share a database connection, where one

Re: getting env variable from bourne shell script

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 07:51:53 -0800 schrieb biner: Hello, I have file called PARAMETRES that is used in bourne shell script to define variable. In order to do so I put a . PARAMETRES line and the script has acces to all the variable defined in the PARAMETRES file. Hi, you can run .

Re: getting env variable from bourne shell script

2004-12-21 Thread Fredrik Lundh
Thomas Guettler wrote: you could use '^(.*?)=(.*)$' as regex to parse each line group(1) is the variable name group(2) the value. may I recommend: key, value = line.split(=, 1) /F -- http://mail.python.org/mailman/listinfo/python-list

PyCon is coming - we need your help

2004-12-21 Thread Steve Holden
Dear Python User: I wonder if you would be kind enough to take the time to read this email and help us to publicize PyCon DC 2005, being held March 23-26 at the Cafritz Conference Center of George Washington University. The Call for Participation went out some time ago, but it is a good time to

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

2004-12-21 Thread Doug Holton
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 not. Anything

Re: BASIC vs Python

2004-12-21 Thread Scott Robinson
On Mon, 20 Dec 2004 08:46:14 + (UTC), Alan Gauld [EMAIL PROTECTED] wrote: was too late). A machine designed to be run on Forth would have been unbelievably powerful from the late 70s to the mid 90s (it would be more painful now than the x86 legacy, but still). A small data point here

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 is

  1   2   3   >