Re: Overloading __init__ & Function overloading

2005-09-30 Thread Paul Rubin
"Iyer, Prasad C" <[EMAIL PROTECTED]> writes: > But I want to do something like this > > class BaseClass: > def __init__(self): > # Some code over here > def __init__(self, a, b): > # Some code over here > def __init__(self, a, b, c): > #

Re: Overloading __init__ & Function overloading

2005-09-30 Thread Fredrik Lundh
Larry Bates wrote: >I may be reading this question different than Fredrik. it looks like you're using a non-standard definition of the word "overloading". here are the usual definitions (quoting from a random google page): "Overloading a method refers to having two methods which share the

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

2005-09-30 Thread Paul Rubin
Richie Hindle <[EMAIL PROTECTED]> writes: > Yes. From Guido's announcement at > http://mail.python.org/pipermail/python-dev/2005-September/056846.html: > > The syntax will be > > A if C else B Wow, I thought this was a prank at first. Congratulations to Guido. I think the introduction of lis

How to learn DNS Server's IP address

2005-09-30 Thread Abdullah Yoldas
How can I learn the DNS Server's IP address for my network, programmatically? The idea is to learn DNS Server IP and initialize medusa.resolver accordingly. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: what does 0 mean in MyApp(0)

2005-09-30 Thread vincent wehren
"Alex" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | I'm looking at a tutorial with the code below | | from wxPython.wx import * | | class MyApp(wxApp): |def OnInit(self): |frame = wxFrame(NULL, -1, "winApp", size = (800,640)) |frame.Show(true) |se

Re: New Python chess module

2005-09-30 Thread Will McGugan
Pekka Karjalainen wrote: > > I have one minor point. It looks like your test whether the location is on > the board is needlessly complex. Python understands multiple comparisons > like in mathematical notation, and not like in e.g. C language. This > snippet shows what I mean: > > [x for x

Re: grouping array

2005-09-30 Thread pkilambi
fredrick's solutions seems to be more closer to what I was looking for.But I am still not sure if that could be done without the use of Image module. Also in your solution I cannot follow this [[1, 1, 2, 1, 2, 0], [2, 0, 0, 2, 0, 1], [1, 2, 2, 0, 2, 0], [0, 1, 0, 0, 0, 0], [2, 0, 0, 1,

where to post python code?

2005-09-30 Thread Ido . Yehieli
Hi all, i have written a small python game (about 300 lines of code) that i think other people might enjoy poking around (being a python programmer for the past 4 years or so (some of it professionally) I believe I could say it's not badly written either). the question it - where should i post

Re: where to post python code?

2005-09-30 Thread Alessandro Bottoni
[EMAIL PROTECTED] wrote: > the question it - where should i post the code to? > It's not big enough to justify a source forge project, nor is it small > enough to be considered a receipt fit for ASPN's Python Cookbook. Maybe "The Vaults of Parnassus" at www.vex.net is the right place for it. HTH

Python <=> Excel question

2005-09-30 Thread Gerry Blais
Newbie questions: Suppose abc.xls has sheets a, b, c. How can I find, in Python, the sheet names? Given a sheet name, how can I export the sheet as a csv file? Finally, how can I, in Python, make a .txt version of a Word document? Thanks, Gerry -- http://mail.python.org/mailman/listinfo/pyt

Re: Overloading __init__ & Function overloading

2005-09-30 Thread Istvan Albert
in python you can provide default values for your parameters: class BaseClass: def __init__(self, a=None): if a is None: #no parameter pass else: #one parameter pass baseclass1=BaseClass() baseclass2=BaseClass(1) --

Re: Overloading __init__ & Function overloading

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

Re: pywordnet install problems

2005-09-30 Thread Steven Bethard
vdrab wrote: > hello pythoneers, > > I recently tried to install wordnet 2.0 and pywordnet on both an ubuntu > linux running python 2.4 and a winXP running activePython 2.4.1, and I > get the exact same error on both when I try to "from wordnet import *" > : > > running install > error: invalid P

output events on select

2005-09-30 Thread Tor Erik S�nvisen
Hi When using select, what exactly will trigger an output-event? I have a socket registered in the output-list of the select but an output-event is never generated for that socket. I know the socket is ready to send data, so how can I make select return with an output-event? regards tores --

Re: What python idioms for private, protected and public?

2005-09-30 Thread Sion Arrowsmith
Michael Schneider <[EMAIL PROTECTED]> wrote: >I have been coding in C++ since the late 80's and Java since the late 90's. > >I do use private in these languages, with accessors to get at internal >data. > >This has become an ingrained idiom for me. The question is, has it become a purely instinc

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

2005-09-30 Thread thomas Armstrong
Hi. Thank you both for your answers. Finally I changed my MySQL table to UTF-8 and changed the structure of the query (with '%s'). It works. Thank you very much. 2005/9/30, deelan <[EMAIL PROTECTED]>: > thomas Armstrong wrote: > (...) > > when trying to execute a MySQL query: > > > > query

Re: Cleveland Ohio Python Meeting

2005-09-30 Thread David Stanek
On Wed, Sep 28, 2005 at 07:10:15AM -0400, David Stanek wrote: > October 6 from 18:30-20:30 > > A presentation will be given on Django and I am sure that we will > discuss web frameworks in general. Everyone is welcome. For more > details take a look at > http://www.clepy.org/meetings/2005_10_06_mt

Re: Python <=> Excel question

2005-09-30 Thread Simon Brunning
On 9/30/05, Gerry Blais <[EMAIL PROTECTED]> wrote: > Finally, how can I, in Python, make a .txt version of a Word document? http://www.brunningonline.net/simon/blog/archives/001299.html -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mai

Re: Overloading __init__ & Function overloading

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

getattr

2005-09-30 Thread [EMAIL PROTECTED]
This question is regarding the __getattr__ function defined for every object. Consider the following example Assume that foo is an instance of class Foo, and the following are references to foo's field "bar" which is an instance of class Bar a) foo.bar b) foo.bar.spam - spam is a member of "bar"

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

2005-09-30 Thread Rocco Moretti
Antoon Pardon wrote: >>What if the class author removes a non-private variable or changes a >>method's documented parameters in the next version of the class, because >>he think it'll work better, or just because he can? > > Changing an interface is different from changing the implementation.

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

2005-09-30 Thread Rocco Moretti
Paul Rubin wrote: > I don't know of a single program that's actually relying on the > non-enforcement. I've asked for examples but have only gotten > theoretical ones. As far as I can tell, the feature is useless. I'd like to turn the question around on you - can you come up with an instance w

Re: Self reordering list in Python

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

Opinion on Pyrex

2005-09-30 Thread Carl
I have recently started to use Pyrex and am amazed by it's useability. Are there any alternatives to Pyrex? One thing that I haven't figured out is how to embed pure C/C++ source code into Pyrex. For example, if you have a bunch of C files that you want to use together with some Python code snip

Re: getattr

2005-09-30 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Is there any way by which the __getattr__(self,attr) method can > determine that in > case a) attr == 'bar' is the final component in the reference unlike in > case b) where attr=='bar' is NOT the ultimate(final) component of > reference and is an intermediate component

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread Terry Reedy
"David Murmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> def join(sep, seq): >> return reduce(lambda x, y: x + sep + y, seq, type(sep)()) > > damn, i wanted too much. Proper implementation: > > def join(sep, seq): > if len(seq): > return reduce(lambda x, y: x

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

2005-09-30 Thread Steve Holden
Rocco Moretti wrote: > Antoon Pardon wrote: [...] >>It helps, just as locks wont save you from burglars if they really >>want to rob you, but the locks do help. > > > Right, but like doors that automatically lock when they close, items > which are there to protect you can be a nusaince, especial

Re: grouping array

2005-09-30 Thread Michael Spencer
[EMAIL PROTECTED] wrote: > fredrick's solutions seems to be more closer to what I was looking > for.But I am still not sure if that could be done without the use of > Image module. What do you mean by "closer to what I was looking for"? For the single test case you provided: > say x = [[2,2,0,0

Re: getattr

2005-09-30 Thread Fredrik Lundh
> if you want to control further accesses, your __getattr__ has to return a > proxy object, and use a suitable syntax to get the final value. message.insert(index, "your users have to ") -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread Michael Spencer
Terry Reedy wrote: > "David Murmann" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>>def join(sep, seq): >>>return reduce(lambda x, y: x + sep + y, seq, type(sep)()) >> >>damn, i wanted too much. Proper implementation: >> >>def join(sep, seq): >>if len(seq): >>r

Re: PyWin SendMessage

2005-09-30 Thread g.franzkowiak
Gonzalo Monzón schrieb: > g.franzkowiak escribió: > >> Thomas Heller schrieb: >> >> >>> "g.franzkowiak" <[EMAIL PROTECTED]> writes: >>> >>> >>> >>> Thomas Heller schrieb: > "g.franzkowiak" <[EMAIL PROTECTED]> writes: > > > > > >> Hel

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread Jp Calderone
On Fri, 30 Sep 2005 09:38:25 -0700, Michael Spencer <[EMAIL PROTECTED]> wrote: >Terry Reedy wrote: >> "David Murmann" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> def join(sep, seq): return reduce(lambda x, y: x + sep + y, seq, type(sep)()) >>> >>>damn, i wanted too

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Trent Mick
[Peter Hansen wrote] > Couldn't it also happen if the first time someone did an "admin" install > which (I believe) puts the DLLs in the system folder, and the next time > did just a non-admin install which doesn't do that? (Or am I > misunderstanding the conditions under which c:\windows\syste

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Trent Mick
[Fuzzyman wrote] > I had problems updating from activestate 2.4 to activestate 2.4.1 > > I think it was caused by not uninstalling the original. This does mean > that even a *minor* version upgrade is a PITA. To do it cleanly all > extension modules have to be uninstalled and re-installed. > > *s

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread David Murmann
Michael Spencer wrote: > Terry Reedy wrote: >> "David Murmann" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> def join(sep, seq): return reduce(lambda x, y: x + sep + y, seq, type(sep)()) >>> >>> damn, i wanted too much. Proper implementation: >>> >>> def join(sep,

Re: PEP 350: Codetags

2005-09-30 Thread François Pinard
[Tom Anderson] > ISO 8601 suggests writing date-and-times like 2005-09-26T12:34:56 - > using a T as the separator between date and time. I don't really like > the look of it, but it is a standard, so i'd suggest using it. ISO 8601 suggests a few alternate writings, and the ``T`` you mention is fo

2.4.2 compilation

2005-09-30 Thread pnm
I have a standard Debian x86 system with Python 2.4.1 (compiled from source). Attempts to compile 2.4.2 fail with references to Unicode -- is there a basic system library that's missing? ++ output from make: libpython2.4.a(funcobject.o)(.text+0x96): In function `PyFunction_New': Objects/funcob

Re: what does 0 mean in MyApp(0)

2005-09-30 Thread Alex
Thanks for the replies. It seems that I have three options 1. app=MyApp() 2. app=MyApp(0) 3. app=MyApp('myfile.txt') 1. In the first case the output stream will be set to stdout/stderr, which means that errors will be sent to a window which will be closed when the app crashes. 2. In the second cas

Duplicating Modules

2005-09-30 Thread Misto .
Hi folks! Short: There is a way to dumplicate a module ? I tried copy.deepcopy(module) but hangs with an error (also with standard modules ). The only solution that I have by now is creating two files and importing them. I.E: > cp module.py module1.py >> import module >> import module1 Any

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Kalle Anke
On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote (in article <[EMAIL PROTECTED]>): > OK... your post seems to indicate a belief that everyone else is > somehow incompetent. Sounds a bit like the "I am sane, it is everyone > else who is crazy" concept. Can you suggest a technology or > technologist w

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread axel
In comp.lang.perl.misc Kalle Anke <[EMAIL PROTECTED]> wrote: > On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote > (in article <[EMAIL PROTECTED]>): >> OK... your post seems to indicate a belief that everyone else is >> somehow incompetent. Sounds a bit like the "I am sane, it is everyone >> else wh

Sybase Python WinXP

2005-09-30 Thread len
Before posting I did search through the newsgroup and saw several references to people requesting the binaries to the Sybase module. However I did not see in these requests answers as to where they might be found. Could someone please point me to them (if they exist). I do not have a C compiler a

Re: Duplicating Modules

2005-09-30 Thread kimes
Why don't you do like this.. import module import mudule as module2 -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python chess module

2005-09-30 Thread Will McGugan
There is a new version if anyone is interested... http://www.willmcgugan.com/chess.py It contains optimizations and bugfixes. Can anyone suggest a name for this module? pyChess is already taken... Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-

ASCII

2005-09-30 Thread Tuvas
Is there a function that will take a char. and return the ascii value? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

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

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

Re: ASCII

2005-09-30 Thread Will McGugan
Tuvas wrote: > Is there a function that will take a char. and return the ascii value? > Thanks! > ord Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-lis

Re: 2.4.2 compilation

2005-09-30 Thread Reinhold Birkenfeld
pnm wrote: > I have a standard Debian x86 system with Python 2.4.1 (compiled from > source). Attempts to compile 2.4.2 fail with references to Unicode -- > is there a basic system library that's missing? > > ++ output from make: > libpython2.4.a(funcobject.o)(.text+0x96): In function `PyFuncti

Re: ASCII

2005-09-30 Thread Steve Horsley
Tuvas wrote: > Is there a function that will take a char. and return the ascii value? > Thanks! > >>> print ord('A') 65 >>> Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Duplicating Modules

2005-09-30 Thread Peter Otten
kimes wrote: > Why don't you do like this.. > > import module > import mudule as module2 >>> import module as a >>> import module as b >>> b is a True You have to remove the module from the cache before the second import: >>> import sys >>> import module as a >>> del sys.modules["module"] >>>

Re: Parser suggestion

2005-09-30 Thread François Pinard
[Jorge Godoy] > You're someone [...] You make me shy! :-) Nevertheless, thanks for the appreciation! :-) > > > It looks like it stopped being developed circa 2002... > How can I be sure that if I find a bug I'll be able to discuss it with > the developer if it's 3 years since the last release

Re: ASCII

2005-09-30 Thread Tuvas
Thanks alot! -- http://mail.python.org/mailman/listinfo/python-list

Python 3! Finally!

2005-09-30 Thread Stefan Behnel
Hi! I just firefoxed to Python.org and clicked on the bz2 link at http://python.org/2.4.2/ and what did I get? Python-3.4.2.tar.bz2 !! Python 3 - what we've all been waiting for, finally, it's there! Weird, though, the md5sum is the same as for the Python-2.4.2.tar.bz2 that I downloaded late (l

Re: Sybase Python WinXP

2005-09-30 Thread Larry Bates
You can use ODBC interface to the database. Sybase should ship with ODBC drivers. Just create a DSN and use odbc and dbi modules. Larry Bates len wrote: > Before posting I did search through the newsgroup and saw several > references to people requesting the binaries to the Sybase module. > Ho

Re: where to post python code?

2005-09-30 Thread Ido . Yehieli
thanks, decided to post it to the python cheese shop over python.org instead. damn, that site is _slow_ today... -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinion on Pyrex

2005-09-30 Thread George Sakkis
"Carl" <[EMAIL PROTECTED]> wrote: > I have recently started to use Pyrex and am amazed by it's useability. > > Are there any alternatives to Pyrex? > > One thing that I haven't figured out is how to embed pure C/C++ source code > into Pyrex. For example, if you have a bunch of C files that you wan

Re: Opinion on Pyrex

2005-09-30 Thread Robert Kern
Carl wrote: > I have recently started to use Pyrex and am amazed by it's useability. > > Are there any alternatives to Pyrex? > > One thing that I haven't figured out is how to embed pure C/C++ source code > into Pyrex. For example, if you have a bunch of C files that you want to > use together

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

2005-09-30 Thread Rocco Moretti
Reinhold Birkenfeld wrote: > Hi, > > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C else Y Any word on chaining? That is, what would happen with the following constructs: A if B else C

Re: Sybase Python WinXP

2005-09-30 Thread len
Thanks I will do that. Len Sumnler -- http://mail.python.org/mailman/listinfo/python-list

Re: Overloading __init__ & Function overloading

2005-09-30 Thread John J. Lee
Paul Rubin <"http://phr.cx"@NOSPAM.invalid> writes: > "Iyer, Prasad C" <[EMAIL PROTECTED]> writes: > > But I want to do something like this > > > > class BaseClass: > > def __init__(self): > > # Some code over here > > def __init__(self, a, b): > > # Some code over

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

2005-09-30 Thread John J. Lee
deelan <[EMAIL PROTECTED]> writes: [...] > query = "UPDATE blogs_news SET text = %s WHERE id=%s" > cursor.execute(query, (text_extrated, id)) > > so mysqldb will take care to quote text_extrated automatically. this > may not not your problem, but it's considered "good style" when dealing > with db

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Anonymous Coward
[EMAIL PROTECTED] wrote: > In comp.lang.perl.misc Kalle Anke <[EMAIL PROTECTED]> wrote: > >>On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote >>(in article <[EMAIL PROTECTED]>): > > > >>>OK... your post seems to indicate a belief that everyone else is >>>somehow incompetent. Sounds a bit like the

Re: New Python chess module

2005-09-30 Thread Tim Churches
Will McGugan wrote: > There is a new version if anyone is interested... > > http://www.willmcgugan.com/chess.py > > It contains optimizations and bugfixes. > > Can anyone suggest a name for this module? pyChess is already taken... Pyawn??? Tim C -- http://mail.python.org/mailman/listinfo/pyt

Re: Duplicating Modules

2005-09-30 Thread Dave Benjamin
Misto . wrote: > Hi folks! > > Short: > > There is a way to dumplicate a module ? Here's one way... it doesn't quite work with modules inside of packages, unfortunately, but it does avoid defeating module caching and tries to keep sys.modules in a predictable state. I don't know what the thre

Re: Python 3! Finally!

2005-09-30 Thread Dan Sommers
On Fri, 30 Sep 2005 20:50:06 +0200, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi! > I just firefoxed to Python.org and clicked on the bz2 link at > http://python.org/2.4.2/ and what did I get? > Python-3.4.2.tar.bz2 !! > Python 3 - what we've all been waiting for, finally, it's there! > Weird,

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

2005-09-30 Thread Dave Benjamin
Reinhold Birkenfeld wrote: > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C else Y Hooray! After years of arguing over which syntax to use, and finally giving up since nobody could agree,

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

2005-09-30 Thread Jules Dubois
On Friday 30 September 2005 01:58, Paul Rubin (<[EMAIL PROTECTED]>) wrote: > Steve Holden <[EMAIL PROTECTED]> writes: >> Good grief, the ultimate choice is to use Python because you like it, >> or not to use it because you don't. Enough with the picking every >> availabl

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

2005-09-30 Thread Erik Max Francis
Steve Holden wrote: > While a snappish "go and look it up on Google" might suffice for a > mouthy apprentice who's just asked their thirteenth question in the last > half hour, it's (shall we say) a little on the brusque side for someone > who only appears on the group last February, and has a

Re: Opinion on Pyrex

2005-09-30 Thread Lisandro Dalcin
That's the reason I am using SWIG http://www.swig.org For C++ classes, you can get a working Python module autmatically. It also has advanced features, like "directors", enablig subclassing from Python (to be used in de C++ side). However, I should warn you SWIG is not as friendly as Pyrex. But

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Pietro Campesato
Jorge Godoy wrote: > His intent was never to convince people or pass information. On comp.lang.lisp Xah Lee is a well known troll... don't feed him :) -- http://mail.python.org/mailman/listinfo/python-list

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

2005-09-30 Thread Reinhold Birkenfeld
Rocco Moretti wrote: > Reinhold Birkenfeld wrote: >> Hi, >> >> after Guido's pronouncement yesterday, in one of the next versions of Python >> there will be a conditional expression with the following syntax: >> >> X if C else Y > > Any word on chaining? > > That is, what would happen with the

MS Word mail merge automation

2005-09-30 Thread Steve M
I'm trying to do invoke the mail merge functionality of MS Word from a Python script. The situation is that I have a template Word document, and a record that I've generated in Python, and I want to output a new Word .doc file with the template filled in with the record I've generated. (To refresh

Re: xml2schema

2005-09-30 Thread uche . ogbuji
""" Er, do you mean to generate a Relax NG (or possibly a DTD in fact) from some XML file?? If you do mean this then just think of that how you could generate grammar from some paragraphs of English text... Sorta non-trivial, if possible at all, isn't it? :-) """ Very well put. However, for REL

Re: Where to find python c-sources

2005-09-30 Thread John J. Lee
"Tor Erik Sønvisen" <[EMAIL PROTECTED]> writes: > "Erik Max Francis" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Tor Erik S�nvisen wrote: > > > >> I need to browse the socket-module source-code. I believe it's contained > >> in the file socketmodule.c, but I can't locate th

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > I'm responding off-list No you're not! Sorry if I missed some subtle joke here... John -- http://mail.python.org/mailman/listinfo/python-list

Python profiler

2005-09-30 Thread Celine & Dave
Hello All, I am trying to find a profiler that can measure the memory usage in a Python program. I would like to gather some statistics about object usages. For example, I would like to be able to see how much time it takes to search for an item in a dict object, how many times it has to access th

Re: Opinion on Pyrex

2005-09-30 Thread Don
Carl wrote: > I have recently started to use Pyrex and am amazed by it's useability. > > Are there any alternatives to Pyrex? > > One thing that I haven't figured out is how to embed pure C/C++ source > code into Pyrex. For example, if you have a bunch of C files that you want > to use together

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

2005-09-30 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > That would make a good Onion (www.TheOnion.com) headline: "Users > Discover Computer Security Conflicts with Desire for Convenience" +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-09-30 Thread Paul Boddie
John J. Lee wrote: > How odd -- the most useful link (the viewcvs page for this source > file) is the very first link for me when I search for socketmodule.c > > Does google vary in its results across the globe? Actually, yes, although in this case the top result is the same for both google.no (wh

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

2005-09-30 Thread Paul Rubin
Rocco Moretti <[EMAIL PROTECTED]> writes: > There is little in the way of technical problems that are solved by > language level enforcement of private variables. The issues in > question are mostly social ones, and if you're not reading and > following the documented interface, stopping private va

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Sherm Pendley
[EMAIL PROTECTED] writes: > I wonder if his postings are related to the phases of the moon? It > might explain a lot. Yes, it would. Note that the word lunatic is derived from the Latin word luna, meaning moon. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My

Re: Python <=> Excel question

2005-09-30 Thread riplin
> Suppose abc.xls has sheets a, b, c. > How can I find, in Python, the sheet names? > Given a sheet name, how can I export the sheet as a csv file? http://chicago.sourceforge.net/xlhtml/ This has options to output csv files, the list of sheets and many other things. Just execute this on the .xls

Re: MS Word mail merge automation

2005-09-30 Thread [EMAIL PROTECTED]
Steve M wrote: > I'm trying to do invoke the mail merge functionality of MS Word from a > Python script. The situation is that I have a template Word document, > and a record that I've generated in Python, and I want to output a new > Word .doc file with the template filled in with the record I've

Re: New Python chess module

2005-09-30 Thread Dave Hansen
On Sat, 01 Oct 2005 06:27:01 +1000, Tim Churches <[EMAIL PROTECTED]> wrote: >Will McGugan wrote: >> There is a new version if anyone is interested... >> >> http://www.willmcgugan.com/chess.py >> >> It contains optimizations and bugfixes. >> >> Can anyone suggest a name for this module? pyChess

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Martin v. Löwis
Trent Mick wrote: > I suppose that is possible. Martin, does python-2.4.2.msi install > python24.dll to the Python install dir for a "per-user" installation? Yes, that is supported. It would be good if Bugs could confirm that he only deleted the wrong python24.dll, with the proper one being insta

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

2005-09-30 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > Rocco Moretti wrote: [...] > > Right, but like doors that automatically lock when they close, items > > which are there to protect you can be a nusaince, especially when you've > > left your keys on the dining room table. > > That would make a good Onio

Re: What encoding is used when initializing sys.argv?

2005-09-30 Thread Martin v. Löwis
Petr Prikryl wrote: > I know about the rejected attempt to implement > sys.argvu. Still, how the sys.argv is filled? What > encoding is used when parsing the cmd line internally? > To what encoding is it converted when non ASCII > characters appear? Python does not perform any conversion whatsoeve

Re: PEP 308 accepted - new conditional expressions

2005-09-30 Thread Carl Banks
Reinhold Birkenfeld wrote: > X if C else Y Oh well. Just about any conditional is better than no conditional. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: Sybase Python WinXP

2005-09-30 Thread Thorsten Kampe
* len (2005-09-30 18:59 +0100) > Before posting I did search through the newsgroup and saw several > references to people requesting the binaries to the Sybase module. Binaries? > However I did not see in these requests answers as to where they might > be found. > > Could someone please point me

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

2005-09-30 Thread Erik Max Francis
Dave Benjamin wrote: > Hooray! After years of arguing over which syntax to use, and finally > giving up since nobody could agree, the Benevolent Dictator did what > only a dictator can do, and just made a damn decision already. > > Thank you, Guido! =) Yes, hear hear. So what made him change

Re: What encoding is used when initializing sys.argv?

2005-09-30 Thread Neil Hodgson
Petr Prikryl: > ... I have discovered that > I do not understand what encoding should be used > to convert the sys.argv into unicode. Martin mentioned CP_ACP. In Python on Windows, this can be accessed as the "mbcs" codec. import sys print repr(sys.argv[1]) print repr(unicode(sys.argv[1], "

Re: unittest setup

2005-09-30 Thread Kent Johnson
paul kölle wrote: > hi all, > > I noticed that setUp() and tearDown() is run before and after *earch* > test* method in my TestCase subclasses. I'd like to run them *once* for > each TestCase subclass. How do I do that. One way to do this is to make a TestSuite subclass that includes your startup

Re: PEP 350: Codetags

2005-09-30 Thread Bengt Richter
On Fri, 30 Sep 2005 13:27:57 -0400, =?iso-8859-1?Q?Fran=E7ois?= Pinard <[EMAIL PROTECTED]> wrote: >[Tom Anderson] > >> ISO 8601 suggests writing date-and-times like 2005-09-26T12:34:56 - >> using a T as the separator between date and time. I don't really like >> the look of it, but it is a standa

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

2005-09-30 Thread Sam
Reinhold Birkenfeld writes: Hi, after Guido's pronouncement yesterday, in one of the next versions of Python there will be a conditional expression with the following syntax: X if C else Y which is the same as today's (Y, X)[bool(C)] What's wrong with "C ? X:Y"? Aside from ":" being overl

Re: PDF Viewer

2005-09-30 Thread John J. Lee
Pepe Pena <[EMAIL PROTECTED]> writes: > I am new to programming and need some guidance on the development of > the following application. The proposed application will display > two pdf documents simultaneously to be viewed and simple navigation > will be facilitated (i.e. turning pages). > > Fu

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

2005-09-30 Thread Ron Adam
Reinhold Birkenfeld wrote: > Rocco Moretti wrote: > >>Reinhold Birkenfeld wrote: >> >>>Hi, >>> >>>after Guido's pronouncement yesterday, in one of the next versions of Python >>>there will be a conditional expression with the following syntax: >>> >>>X if C else Y >> >>Any word on chaining? >> >>

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

2005-09-30 Thread Jaime Wyant
On 9/30/05, Sam <[EMAIL PROTECTED]> wrote: > Reinhold Birkenfeld writes: > > > Hi, > > > > after Guido's pronouncement yesterday, in one of the next versions of Python > > there will be a conditional expression with the following syntax: > > > > X if C else Y > > > > which is the same as today's >

add keyword argument to itertools.chain [was Feature Proposal: Sequence .join method]

2005-09-30 Thread David Murmann
Hi again, i wrote a small patch that changes itertools.chain to take a "link" keyword argument. If given, it is iterated between the normal arguments, otherwise the behavior is unchanged. I'd like to hear your opinion on both, the functionality and the actual implementation (as this is one of th

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread dimitri pater
Yes, it would. Note that the word lunatic is derived from the Latin wordluna, meaning moon. so, he is a just another lunitac barking at the moon? well, err barking at the python list... greetz, dimitri -- http://mail.python.org/mailman/listinfo/python-list

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread dimitri pater
that's lunatic, of course (check spelling is not in my system yet)On 10/1/05, dimitri pater <[EMAIL PROTECTED]> wrote: Yes, it would. Note that the word lunatic is derived from the Latin wordluna, meaning moon. so, he is a just another lunitac barking at the moon? well, err barking at the python

<    1   2   3   >