Fredericksburg, VA ZPUG Meeting: January 11, 7:30-9:00 PM

2006-01-06 Thread Benji York
Please join us January 11, 7:30-9:00 PM, for the seventh meeting of the Fredericksburg, VA Zope and Python User Group (ZPUG). Squid and Zope! Python and Zope roundtable! Free food! * Andrew Sawyers will discuss using the open source cache server Squid with Zope, including a discussion of the

ANN: Leo 4.4a5 released

2006-01-06 Thread Edward K. Ream
Leo 4.4 alpha 5 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 This release completes the last major features of Leo 4.4: - User-specified key-binding modes. - Support for multiple key-bindings for individual minibuffer commands. This will be

Re: itertools.izip brokeness

2006-01-06 Thread Paul Rubin
Paul Rubin http://[EMAIL PROTECTED] writes: # quit if only discardables are left dropwhile(lambda i,t: (not isinstance(i, Discardable)) and len(t)), izip(t, iterables)).next() Ehh, that should say dropwhile(lambda (t,i): ...) to use tuple unpacking and get

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-06 Thread rurpy
Tim Roberts [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Xah Lee (1) is a write-only poster who pontificates but never reads replies, and (2) cares not a whit that the rest of us believe him to be a moron. I find him offensive, and a pontificator as you said, but I don't think

Re: Python function with **kwargs Question

2006-01-06 Thread Eric McGraw
You could call it like this: foo(**{a-special-keyword:5}) but that might defeat the purpose of keyword arguments. -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-06 Thread rurpy
Tim Roberts [EMAIL PROTECTED] wrote: Xah Lee (1) is a write-only poster who pontificates but never reads replies, and (2) cares not a whit that the rest of us believe him to be a moron. I find him offensive, and a pontificator as you said, but I don't think he is a moron. He has complained

Path and Unicode woes

2006-01-06 Thread André
I'm attempting to override a wxHtmlWindow method in order to pre-process the file before displaying it. I'm using a unicode version of wxPython. I don't think my problem are wxPython-specific, but rather a unicode mis-understanding. Consider the following: .def OnLinkClicked(self,

C regex equiv to Python implementation?

2006-01-06 Thread techiepundit
I've been writing code in Python to prototype part of an application. I've used the re regular expression pattern matcher. Now I have to take what I've written and recode it in C to fit in an existing C app. Anyway, is there a way to use the re regular expression evaluator in C? Is it written in

Inheritance problem?

2006-01-06 Thread KraftDiner
I have a class class MyClass(MyBaseClass) def __init__(self) super(self.__class__, self).__init__() self.type = MyClassType return self It has a few methods... I have another class and the only difference is the __init__ method.. I tried this: class MySpecialClass(MyClass)

Re: Microsoft IronPython?

2006-01-06 Thread rurpy
EP [EMAIL PROTECTED] wrote: Luis M. González wrote: Will Microsoft hurt Python? I think it is naive to ignore the fact that Microsoft could hurt Python, though there may be nothing anyone can do. How? - create a more prevalent version of Python that is less Pythonic or undermines

please help the newbie!

2006-01-06 Thread dpickles
In my Python research, I have found a nice little voice recognition script on the internet that does exactly what I need, and the demo recognizes phrases with pretty much 100%accuracy. The script can be found here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/93025 What I want to do

Re: Xah's Edu Corner: the bug-reporting attitude

2006-01-06 Thread rurpy
Tim Roberts [EMAIL PROTECTED] wrote: Xah Lee (1) is a write-only poster who pontificates but never reads replies, and (2) cares not a whit that the rest of us believe him to be a moron. I find him offensive, and a pontificator as you said, but I don't think he is a moron. He has complained

Removing Duplicate entries in a file...

2006-01-06 Thread sri2097
Hi all, I'm storing number of dictionary values into a file using the 'cPickle' module and then am retrieving it. The following is the code for it - # Code for storing the values in the file import cPickle book = {raw_input(Name: ): [int(raw_input(Phone: )), raw_input(Address: )] } file_object

Re: Encoding sniffer?

2006-01-06 Thread Andreas Jung
Thanks! --On 5. Januar 2006 18:21:39 -0600 [EMAIL PROTECTED] wrote: http://orca.mojam.com/~skip/python/ pgpyF17uM2CTT.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How run web software *locally* easily?

2006-01-06 Thread Paul Rubin
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Is there some easy way to somehow perhaps embed a minimal web server in a Python tar ball Yes, sure, see any of the HTTP server classes in the stdlib. Just listen on a localhost socket and pop a browser to point to that socket. --

Re: C regex equiv to Python implementation?

2006-01-06 Thread Ganesan Rajagopal
techiepundit [EMAIL PROTECTED] writes: I've been writing code in Python to prototype part of an application. I've used the re regular expression pattern matcher. Now I have to take what I've written and recode it in C to fit in an existing C app. What platform? Linux includes a regex(7)

Re: How to Retrieve Data from an HTTPS://URL

2006-01-06 Thread Fuzzyman
It certainly *should* work - have you tried with urllib2 ? I assume the page works when fetched with a browser ? You don't have any proxy settings do you (Python can pick up on these automatically) ? What error are you getting (or what value in data) ? All the best, Fuzzyman

Working Firedrop2 anywhere?

2006-01-06 Thread Steve Holden
I've been trying to install Firedrop2, but the currently available source doesn't appear to be usable. For the whole sad story, or to see whether I did something wrong, see http://holdenweb.blogspot.com/2006/01/open-source-frustrations.html Does anyone know where a working copy might be

Re: Microsoft IronPython?

2006-01-06 Thread Max M
EP wrote: Luis M. González wrote: Will Microsoft hurt Python? I think it is naive to ignore the fact that Microsoft could hurt Python, though there may be nothing anyone can do. How? - create a more prevalent version of Python that is less Pythonic or undermines some of the

Re: csv format to DBase III format

2006-01-06 Thread William
Peter Otten wrote: [EMAIL PROTECTED] wrote: I need to transfer csv format file to DBase III format file. How do i do it in Python language? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 Peter Hi, I create a dbf file, it can be opened by Excel but it cannot be opened

Re: Python function with **kwargs Question

2006-01-06 Thread Duncan Booth
Eric McGraw wrote: You could call it like this: foo(**{a-special-keyword:5}) but that might defeat the purpose of keyword arguments. Don't forget you can mix ordinary keyword arguments with the ** call, so only the weird arguments actually need to be passed that way. def f(**args):

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread Ernst Noch
Mike Meyer wrote: Steven D'Aprano [EMAIL PROTECTED] writes: Thinking about Python's behaviour (it always passes references to objects) will invoke misleading frames in many programmers' minds. The word reference is misleading and should be avoided, because what the average non-Python programmer

Re: itertools.izip brokeness

2006-01-06 Thread Bengt Richter
On 5 Jan 2006 14:34:39 -0800, [EMAIL PROTECTED] wrote: Bengt Richter wrote: On 5 Jan 2006 15:48:26 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2006-01-04, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: But here is my real question... Why isn't something like this

Re: Removing Duplicate entries in a file...

2006-01-06 Thread Fuzzyman
sri2097 wrote: Hi all, I'm storing number of dictionary values into a file using the 'cPickle' module and then am retrieving it. The following is the code for it - # Code for storing the values in the file import cPickle book = {raw_input(Name: ): [int(raw_input(Phone: )),

Re: itertools.izip brokeness

2006-01-06 Thread Steven D'Aprano
On Thu, 05 Jan 2006 23:52:13 -0800, Paul Rubin wrote: [EMAIL PROTECTED] writes: def izip4(*iterables, **kw): kw:fill. An element that will pad the shorter iterable kw:infinite. Number of non-terminating iterators That's a really kludgy API. I'm not sure what to propose

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread Steven D'Aprano
On Thu, 05 Jan 2006 22:18:39 -0600, Terry Hancock wrote: Consider this: def do_nothing(x): pass huge_tuple = (None,) * 1**4 do_nothing(huge_tuple) If Python made a copy of huge_tuple before passing it to the function, you would notice. Which succinctly demonstrates

Re: itertools.izip brokeness

2006-01-06 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: def izip5(*iterables, fill=None): Doesn't work: keyword arguments must be listed before * and ** arguments. Eh, ok, gotta use **kw. def function(*iterators, **kwargs): if kwargs.keys() != [fill]: raise ValueError ... It

Re: How run web software *locally* easily?

2006-01-06 Thread sébastien
for example like that: python -m CGIHTTPServer -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Degrees as barriers to entry [was Re: - E04 - Leadership! Google, Guido van Rossum, PSF]

2006-01-06 Thread David T
On Jan 3, 2006, at 9:54 PM, Brian van den Broek wrote: Steven D'Aprano said unto the world upon 03/01/06 07:33 PM: On Tue, 03 Jan 2006 08:27:39 -0800, Alex Martelli wrote: Or some even more stringent qualification, such as the state's Bar exam for lawyers -- you may not be able to sit

error rising while connecting oracle 9i

2006-01-06 Thread python_eager
Hi i am connecting my database oracle 9i. While connecting i am getting the following error connection = cx_Oracle.connect(myusername, mypassword, python) RuntimeError: Unable to acquire Oracle environment handle please send the solution Thank you regards Python Eager --

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread bonono
Steven D'Aprano wrote: I'll tell you what I say: Python passes objects to functions or assignments. Which in C sense, is a reference(or pointer) to some opaque table maintain by the system, identified by id(). -- http://mail.python.org/mailman/listinfo/python-list

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread Steven D'Aprano
On Fri, 06 Jan 2006 02:19:29 -0800, bonono wrote: Steven D'Aprano wrote: I'll tell you what I say: Python passes objects to functions or assignments. Which in C sense, is a reference(or pointer) to some opaque table maintain by the system, identified by id(). And that C sense is

Re: How run web software *locally* easily?

2006-01-06 Thread dimitri pater
Check out this recipe using CherryPy ;-)http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442481CherryPy's server runs on localhost, also see my tutorial here: www.serpia.org/cherrypybye,DimitriOn 5 Jan 2006 16:13:01 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: If grandma wanted to run

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread bonono
Steven D'Aprano wrote: On Fri, 06 Jan 2006 02:19:29 -0800, bonono wrote: Steven D'Aprano wrote: I'll tell you what I say: Python passes objects to functions or assignments. Which in C sense, is a reference(or pointer) to some opaque table maintain by the system, identified by

Re: advice required re migrating php app to python and most likely zope

2006-01-06 Thread Ken Guest
On Thu, Jan 05, 2006 at 10:10:39PM +0100, Diez B. Roggisch wrote: Ken Guest schrieb: Hi, I've two relatively small web applications that are currently implemented in PHP and needed to be migrated to python and most likely zope afterwards as we're getting a third-party Zope powered CMS

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread bonono
Steven D'Aprano wrote: But in programming, things do work that way. If my class Book contains a reference to Smith's classic work, I can modify it. (Unless the language deliberately restricts my ability to modify certain objects, as Python does with immutable objects.) That's what

Re: Inheritance problem?

2006-01-06 Thread Simon Percivall
Don't use self.__class__, use the name of the class. -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance problem?

2006-01-06 Thread Pierre Barbier de Reuille
Well, I would even add : don't use super ! Just call the superclass method : MyClass.__init__(self) Simon Percivall a écrit : Don't use self.__class__, use the name of the class. -- http://mail.python.org/mailman/listinfo/python-list

Does Python allow access to some of the implementation details?

2006-01-06 Thread Claudio Grondi
Let's consider a test source code given at the very end of this posting. The question is if Python allows somehow access to the bytes of the representation of a long integer or integer in computers memory? Or does Python hide such implementation details that deep, that there is no way to get

PythonWin: logging module not showing messages from imported modules

2006-01-06 Thread rodrigostrauss
Having the following code: Module1.py import logging def X(): logging.error('test') If I import it into PythonWin console and call X(), the error message is not printed. If I do the same in Python console the message is printed. Do I need to configure the logging module or it's a

MVC programming with python (newbie) - please help

2006-01-06 Thread bwaha
I'd appreciate some experience from the gurus out there to help me understand how to implement MVC design in python code. Entry number 5 on the wxpython wiki at http://wiki.wxpython.org/index.cgi/BuildingControls discusses MVC design in building reusable controls. The author (Terrel Shumway)

Python based Compiler tools

2006-01-06 Thread Doru-Catalin Togea
Hi! I have some experience with PLY. What other alternatives are there, and which is the best (that is most feature rich, easiest to use, ...)? Thanks, Catalin -- == We are what we repeatedly do. Excellence, therefore,

Re: Does Python allow access to some of the implementation details?

2006-01-06 Thread Diez B. Roggisch
The test code below shows, that extracting bits from an integer value n is faster when using n0x01 than when using n%2 and I suppose it is because %2 tries to handle the entire integer, where 0x01 processes only the last two bytes of it (I come to this because the speed difference between

ANN: Leo 4.4a5 released

2006-01-06 Thread Edward K. Ream
Leo 4.4 alpha 5 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 This release completes the last major features of Leo 4.4: - User-specified key-binding modes. - Support for multiple key-bindings for individual minibuffer commands. This will be

[FW] Microsoft embraces open-source scripting language

2006-01-06 Thread Man-wai Chang
Original Message Subject: [NF] Microsoft embraces open-source scripting language Date: Thu, 05 Jan 2006 15:37:47 -0500 From: MB Software Solutions [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: MB Software Solutions, LLC To: [EMAIL PROTECTED]

Re: [FW] Microsoft embraces open-source scripting language

2006-01-06 Thread Man-wai Chang
http://dabodev.com/ -- .~.Might, Courage, Vision. SINCERITY. http://www.linux-sxs.org / v \ /( _ )\ (Ubuntu 5.10) Linux 2.6.14.4 ^ ^22:38:01 up 13 days 11:35 load average: 0.10 0.09 0.08 news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk --

Fredericksburg, VA ZPUG Meeting: January 11, 7:30-9:00 PM

2006-01-06 Thread Benji York
Please join us January 11, 7:30-9:00 PM, for the seventh meeting of the Fredericksburg, VA Zope and Python User Group (ZPUG). Squid and Zope! Python and Zope roundtable! Free food! * Andrew Sawyers will discuss using the open source cache server Squid with Zope, including a discussion of the

Re: Try Python update

2006-01-06 Thread Xavier Morel
Mike Meyer wrote: After spending time I should have been sleeping working on it, the try python site is much more functional. It now allows statements, including multi-line statements and expressions. You can't create code objects yet, so it's still more a programmable calculator than

Re: [OT] - Requesting Comments for Process Definition and Presentation

2006-01-06 Thread Xavier Morel
Ilias Lazaridis wrote: b) to retrieve feedback subjecting the Process Definition itself (content of diagramms, clarity, terminology etc.) This is a lie, and you know it. You are merely some kind of strange troll. You've built something that you consider the only object model worth using

Re: Python or Java or maybe PHP?

2006-01-06 Thread Xavier Morel
Mike Meyer wrote: That doesn't sounds like hates to me. More like doesn't like the baggage. mike Yet anonymous functions are nice. Wouldn't it be possible to change the `def` statement to return a reference to the function, and allow omitting the function name thereby bypassing

Re: One-step multiples list generation?

2006-01-06 Thread Xavier Morel
Damien Wyart wrote: Thanks for these important and useful additions, they are very welcome ! In writing my answer I had immutables in mind, but mutables are a bit more dangerous, here... Not *that* much though. The first construct can't be used, but he can use [copy.copy(Foo) for _ in

Re: Translate this to python?

2006-01-06 Thread Xavier Morel
[EMAIL PROTECTED] wrote: For some reason, ocassionally when I see xrange, I think But wasn't that deprecated since range is now a . . oh wait that's xreadlines. xrange is a cool thing the few times where you really need it. john Not sure what i is really for, but j seems to be

Re: Inheritance problem?

2006-01-06 Thread Xavier Morel
Pierre Barbier de Reuille wrote: Well, I would even add : don't use super ! Just call the superclass method : MyClass.__init__(self) Simon Percivall a écrit : Don't use self.__class__, use the name of the class. Bad idea if you're using new-style classes with a complex inheritance

Re: [FW] Microsoft embraces open-source scripting language

2006-01-06 Thread Man-wai Chang
Sorry, left out 2 links: IronPython 1.0 Beta 1 http://dw.com.com/redir?destUrl=http%3A%2F%2Fwww.microsoft.com%2Fdownloads%2Fdetails.aspx%3FFamilyID%3D94082D26-E689-4F7F-859B-FEC6DACF3AE8%26displaylang%3DensiteId=22oId=2100-3513-6017630ontId=3513lop=nl.ex, which was released at the end of last

Re: inline function call

2006-01-06 Thread Xavier Morel
Peter Hansen wrote: Riko, any chance you could post the final code and a bit more detail on exactly how much Psyco contributed to the speedup? The former would be educational for all of us, while I'm personally very curious about the latter because my limited attempts to use Psyco in the

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-06 Thread Xavier Morel
Ilias Lazaridis wrote: I estimate that there is a unfreeze operation, too - which would lead to flexibity. There is none, you have to make a copy of the object via the dup (duplicate) method to get an unfrozen copy (note: clone yields an exact copy, which means that it's still frozen).

Spelling mistakes!

2006-01-06 Thread KraftDiner
I've spent hours trying to find a bug that was a simple spelling mistake. in an init method I declare a variable self.someLongName later in a different method of the class I use self.sumLongName Now I really meant self.someLongName. In fact I don't want a variable called sumLongName. Frankly

Re: Spelling mistakes!

2006-01-06 Thread Heiko Wundram
KraftDiner wrote: Frankly how are you ever to know if this type of error is occuring? By the traceback: [EMAIL PROTECTED] ~ $ python Python 2.4.2 (#1, Dec 22 2005, 17:27:39) [GCC 4.0.2 (Gentoo 4.0.2-r2, pie-8.7.8)] on linux2 Type help, copyright, credits or license for more information. class

Re: Spelling mistakes!

2006-01-06 Thread Fuzzyman
VBScript allows you to specify that variable names be declared. I used to think this was good - until I realised that Python allows you to dynamically assign attributes in namespaces using all sorts of tricks. (Setattr, using __dict__ etc). It's just not possible with Python. Rarely happens to

Re: Spelling mistakes!

2006-01-06 Thread KraftDiner
try this: class x(object): def __init__(self): self.someName = hello def someMethod(self): self.sumName = bye find that bug. -- http://mail.python.org/mailman/listinfo/python-list

Re: Translate this to python?

2006-01-06 Thread Heiko Wundram
Xavier Morel wrote: I think that xrange is also soon-to-be deprecated (xrange eats a little less memory and is slightly faster to _create_, but much slower to _iterate over_ than range) It might be slower to iterate using xrange, but xrange certainly has its place in Python... Try the

Re: Python or Java or maybe PHP?

2006-01-06 Thread Alex Martelli
Xavier Morel [EMAIL PROTECTED] wrote: ... Wouldn't it be possible to change the `def` statement to return a reference to the function, and allow omitting the function name thereby bypassing the default binding (current behavior)? It's _possible_ (doesn't introduce syntax ambiguities)

Re: Spelling mistakes!

2006-01-06 Thread Xavier Morel
KraftDiner wrote: I've spent hours trying to find a bug that was a simple spelling mistake. in an init method I declare a variable self.someLongName later in a different method of the class I use self.sumLongName Now I really meant self.someLongName. In fact I don't want a variable

Re: Does Python allow access to some of the implementation details?

2006-01-06 Thread casevh
I don't know of a way to directly access the internal structure of a long, but you can speed up your example. First, is the order of the commands i=i1 lstBitsBitwiseAnd.append(i0x01) what you intend? The first low order bit is discarded because you've done the shift first. And an extra 0

Re: Spelling mistakes!

2006-01-06 Thread Jean-Paul Calderone
On 6 Jan 2006 07:57:04 -0800, KraftDiner [EMAIL PROTECTED] wrote: try this: class x(object): def __init__(self): self.someName = hello def someMethod(self): self.sumName = bye find that bug. [EMAIL PROTECTED]:~$ cat xobj.py class x(object): def __init__(self):

Re: Spelling mistakes!

2006-01-06 Thread André
KraftDiner wrote: try this: class x(object): def __init__(self): self.someName = hello def someMethod(self): self.sumName = bye find that bug. Write a test for each method before writing the method. Write the code once; read it critically (at least) twice. If you find

Re: Spelling mistakes!

2006-01-06 Thread Peter Hansen
KraftDiner wrote: try this: class x(object): def __init__(self): self.someName = hello def someMethod(self): self.sumName = bye find that bug. You forgot to include unit tests for someMethod(). Those would have caught the bug. The reality is that if you aren't

Re: Translate this to python?

2006-01-06 Thread Xavier Morel
Heiko Wundram wrote: Xavier Morel wrote: I think that xrange is also soon-to-be deprecated (xrange eats a little less memory and is slightly faster to _create_, but much slower to _iterate over_ than range) It might be slower to iterate using xrange, but xrange certainly has its place in

Re: Python or Java or maybe PHP?

2006-01-06 Thread Xavier Morel
Alex Martelli wrote: Xavier Morel [EMAIL PROTECTED] wrote: ... Wouldn't it be possible to change the `def` statement to return a reference to the function, and allow omitting the function name thereby bypassing the default binding (current behavior)? It's _possible_ (doesn't introduce

Re: Inheritance problem?

2006-01-06 Thread Pierre Barbier de Reuille
Xavier Morel a écrit : Pierre Barbier de Reuille wrote: Well, I would even add : don't use super ! Just call the superclass method : MyClass.__init__(self) Simon Percivall a écrit : Don't use self.__class__, use the name of the class. Bad idea if you're using new-style classes with

Copy an Object (Again?)

2006-01-06 Thread KraftDiner
I'm having trouble getting a copy of and object... (a deep copy) I'm writing a method that creates a mirror image of an object (on screen) In order to do this i need to get a copy of the object and then modify some of its attributes. I tried: objs = myListOfObjects for obj in objs: if

Re: Inheritance problem?

2006-01-06 Thread Xavier Morel
Pierre Barbier de Reuille wrote: Xavier Morel a écrit : Pierre Barbier de Reuille wrote: Well, I would even add : don't use super ! Just call the superclass method : MyClass.__init__(self) Simon Percivall a écrit : Don't use self.__class__, use the name of the class. Bad idea if

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread Mike Meyer
Ernst Noch [EMAIL PROTECTED] writes: Maybe next time showing something like the following trivial snippet might help demonstrate that the core of the matter doesn't is not the way python treats parameters? Did you insert an extra doesn't in that? If so, then I agree about what isn't the core

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-06 Thread Mike Meyer
[EMAIL PROTECTED] (R. Bernstein) writes: Mike Meyer [EMAIL PROTECTED] writes: I don't use pdb a lot either - and I write a *lot* of Python. Some of us may have to *read* a lot of python. (For example I know many people including myself who have had to deal with code written by consultants

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread Ernst Noch
Mike Meyer wrote: Ernst Noch [EMAIL PROTECTED] writes: Maybe next time showing something like the following trivial snippet might help demonstrate that the core of the matter doesn't is not the way python treats parameters? Did you insert an extra doesn't in that? If so, then I agree about

Re: Inheritance problem?

2006-01-06 Thread Mike Meyer
Xavier Morel [EMAIL PROTECTED] writes: Pierre Barbier de Reuille wrote: Well, I would even add : don't use super ! Just call the superclass method : MyClass.__init__(self) Simon Percivall a écrit : Don't use self.__class__, use the name of the class. Bad idea if you're using new-style

Missing libpython2.4.so during build of python 2.4.2 on AIX 5.1

2006-01-06 Thread HajoEhlers
Hi folks, maybe somebody can help. I am trying to build python 2.4.2 on AIX 5.1 with gcc 3.3.2 The build option for python are: $ ./configure \ --enable-unicode \ --enable-shared \ --with-gcc \ --mandir=/usr/local/man \ --infodir=/usr/local/info After make i see a

Re: Is 'everything' a refrence or isn't it?

2006-01-06 Thread Donn Cave
In article [EMAIL PROTECTED], Steven D'Aprano [EMAIL PROTECTED] wrote: I'll tell you what I say: Python passes objects to functions or assignments. Does this mean that the object is copied? No, I didn't say it copies objects. I left the nature of the passing mechanism unspoken, which is

Re: Copy an Object (Again?)

2006-01-06 Thread Schüle Daniel
KraftDiner wrote: I'm having trouble getting a copy of and object... (a deep copy) I'm writing a method that creates a mirror image of an object (on screen) In order to do this i need to get a copy of the object and then modify some of its attributes. I tried: objs = myListOfObjects

Re: Filename case-insensitivity on OS X

2006-01-06 Thread Dan Lowe
On Jan 3, 2006, at 9:50 PM, Tom Anderson wrote: On Tue, 3 Jan 2006, Dan Sommers wrote: On Tue, 03 Jan 2006 15:21:19 GMT, Doug Schwarz [EMAIL PROTECTED] wrote: Strictly speaking, it's not OS X, but the HFS file system that is case insensitive. Aaah, of course. Why on earth didn't

Re: PythonWin: logging module not showing messages from imported modules

2006-01-06 Thread jmdeschamps
[EMAIL PROTECTED] wrote: Having the following code: Module1.py import logging def X(): logging.error('test') If I import it into PythonWin console and call X(), the error message is not printed. If I do the same in Python console the message is printed. Do I need to

Re: Filename case-insensitivity on OS X

2006-01-06 Thread Mark Jackson
Dan Lowe [EMAIL PROTECTED] writes: Think about it - how many things used by average people are case sensitive? Passwords? That's about it. (And judging by most user passwords I have seen, they're almost all lowercase anyway.) Email addresses, URLs, the search box in Google, your AOL or

Re: Copy an Object (Again?)

2006-01-06 Thread Ernst Noch
KraftDiner wrote: I'm having trouble getting a copy of and object... (a deep copy) I'm writing a method that creates a mirror image of an object (on screen) In order to do this i need to get a copy of the object and then modify some of its attributes. I tried: objs = myListOfObjects

Re: Copy an Object (Again?)

2006-01-06 Thread Schüle Daniel
I was not very clear about it or even if you could copy instances class X: def __init__(self, filename = /path/file) self.file = file(filename, w+) def modifyByteAt(offset): self.file.tell(offset) self.file.write(X) this is untested pseudocode, it

Re: Translate this to python?

2006-01-06 Thread Heiko Wundram
Xavier Morel wrote: While the deprecation of xrange is not that soon, it is part of the Python 3000 PEP (http://www.python.org/peps/pep-3000.html#id38) along with the deprecation of most FP-facilities of Python (filter, map, reduce). I know this, and that's one of the reasons I'm a little at

Re: Removing Duplicate entries in a file...

2006-01-06 Thread Mike Meyer
sri2097 [EMAIL PROTECTED] writes: Hi all, I'm storing number of dictionary values into a file using the 'cPickle' module and then am retrieving it. The following is the code for it - # Code for storing the values in the file import cPickle book = {raw_input(Name: ): [int(raw_input(Phone:

Re: Microsoft IronPython?

2006-01-06 Thread Luis M. González
I think that this posted message in Jim Hugunin's weblog clearly shows what are Microsoft intentions regarding Python and other dynamic languages: http://blogs.msdn.com/hugunin/archive/2006/01/05/509812.aspx We're hiring full-time and summer interns! We're looking for a few exceptionally

Re: Inheritance problem?

2006-01-06 Thread KraftDiner
So ok I've written a piece of code that demonstrates the problem. Can you suggest how I change the Square class init? class Shape(object): def __init__(self): print 'MyBaseClass __init__' class Rectangle(Shape): def __init__(self):

Converting milliseconds to human time

2006-01-06 Thread Harlin Seritt
I would like to take milliseconds and convert it to a more human-readable format like: 4 days 20 hours 10 minutes 35 seconds Is there something in the time module that can do this? I havent been able to find anything that would do it. Thanks, Harlin Seritt --

Re: Python or Java or maybe PHP?

2006-01-06 Thread Mike Meyer
Xavier Morel [EMAIL PROTECTED] writes: Mike Meyer wrote: That doesn't sounds like hates to me. More like doesn't like the baggage. mike Yet anonymous functions are nice. Wouldn't it be possible to change the `def` statement to return a reference to the function, and allow omitting

Re: Encoding sniffer?

2006-01-06 Thread Ralf Muschall
Diez B. Roggisch wrote: AFAIK iso-8859-1 has all codepoints taken - so you won't go beyond that in your example. IIRC the range 128-159 (i.e. control codes with the high bit set) are unused. Ralf -- http://mail.python.org/mailman/listinfo/python-list

JINI service -- Python client

2006-01-06 Thread asmirnov1234567890
Hi does anybody knows how to use JINI service from Python? Regards, Andrei -- http://mail.python.org/mailman/listinfo/python-list

Re: Try Python update

2006-01-06 Thread Mike Meyer
Xavier Morel [EMAIL PROTECTED] writes: Mike Meyer wrote: The url is http://www.mired.org/home/mwm/try_python/. Reports of problems would appreciated. If you want to try an online P{ython tool that lets you save code, try Devan L's at http://www.datamech.com/devan/trypython/trypython.py.

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-06 Thread Mike Meyer
Xavier Morel [EMAIL PROTECTED] writes: Ilias Lazaridis wrote: thus if I make a typo, I create a new attribute? Why yes of course, what were you expecting? Actually, it's not quite that way. If you make a typo reading an attribute, you'll create an exception. There are languages where making

Re: Spelling mistakes!

2006-01-06 Thread skip
try this: class x(object): def __init__(self): self.someName = hello def someMethod(self): self.sumName = bye find that bug. Aside from the other responses (unittests, pychecker/pylint), you might also consider using __slots__ for new-style

Re: Translate this to python?

2006-01-06 Thread Robert Kern
Heiko Wundram wrote: Xavier Morel wrote: While the deprecation of xrange is not that soon, it is part of the Python 3000 PEP (http://www.python.org/peps/pep-3000.html#id38) along with the deprecation of most FP-facilities of Python (filter, map, reduce). I know this, and that's one of the

Re: Converting milliseconds to human time

2006-01-06 Thread Dan Bishop
Harlin Seritt wrote: I would like to take milliseconds and convert it to a more human-readable format like: 4 days 20 hours 10 minutes 35 seconds Is there something in the time module that can do this? I havent been able to find anything that would do it. The datetime module has something

Re: Filename case-insensitivity on OS X

2006-01-06 Thread Dan Lowe
On Jan 6, 2006, at 1:13 PM, Mark Jackson wrote: Dan Lowe [EMAIL PROTECTED] writes: Think about it - how many things used by average people are case sensitive? Passwords? That's about it. (And judging by most user passwords I have seen, they're almost all lowercase anyway.) Email addresses,

Re: Inheritance problem?

2006-01-06 Thread Pierre Barbier de Reuille
KraftDiner a écrit : So ok I've written a piece of code that demonstrates the problem. Can you suggest how I change the Square class init? class Shape(object): def __init__(self): print 'MyBaseClass __init__' class Rectangle(Shape): def __init__(self):

psexec and os.popen help

2006-01-06 Thread dennis . scales
I'm trying to wrap a psexec command in a python script so I can capture the results and generate an exception report. The problem I'm having is that when I use x = os.popen(command) to do it, it runs, but the content of x is empty. I know there should be output sent to it, because when I run the

  1   2   >