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
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
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
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
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
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
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,
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
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)
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
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
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
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
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
[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.
--
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)
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
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
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
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
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):
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
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
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: )),
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
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
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
for example like that: python -m CGIHTTPServer
--
http://mail.python.org/mailman/listinfo/python-list
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
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
--
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
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
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
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
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
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
Don't use self.__class__, use the name of the class.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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)
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,
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
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
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]
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
--
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
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
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
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
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
[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
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
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
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
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).
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
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
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
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
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
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)
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
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
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):
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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
[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
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
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
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
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
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:
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
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):
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
--
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
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
Hi
does anybody knows how to use JINI service from Python?
Regards,
Andrei
--
http://mail.python.org/mailman/listinfo/python-list
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.
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
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
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
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
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,
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):
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 - 100 of 180 matches
Mail list logo