:**What's new?**:
SPE 'Kay release' 0.8.0.b
This release is a major step forward for all platforms, especially for
MacOS X.
It offers you basic project management through workspaces (thanks to
Thurston Stone), an improved sidebar and pydoc viewer.
This is the first release which is also
The goal of the Flightdeck-UI project is to apply ideas from aircraft
instrumentation design to general purpose user interfaces.
Flightdeck-UI Online version 0.4.0 is the latest stable release of the
Web-based dashboard/monitoring system based on these concepts.
Here is the list of changes from
On 1 Dec 2005 05:45:54 -0800, Niels L Ellegaard [EMAIL PROTECTED] wrote:
I just started learning python and I have been wondering. Is there a
short pythonic way to find the element, x, of a list, mylist, that
maximizes an expression f(x).
In other words I am looking for a short version of the
Hermy:
So, for the moment my conclusion is that although Python has some
syntax for multiple inheritance, it doesn't support it very well, and I should
probably stick to single inheritance.
This is not much a problem of Python, the problem is that multiple
inheritance is
intrinsically HARD to
Pat [EMAIL PROTECTED] writes:
Thomas Heller wrote:
What is the difference between PyDispatcher and Louie?
(I'm still using a hacked version of the original cookbook recipe...)
Not too much at this point, but the general differences are listed on
this page:
[EMAIL PROTECTED] wrote:
Thanks. In that case, would it be easier to understand(beside the
original iterative loop) if I use reduce and lambda ?
You could try putting them side by side and seeing which is easiest for
someone to understand:
reduce(lambda (mv,mx), (v,x): mv v and (mv,mx) or
Mr.Rech wrote:
Suppose I have a bunch of classes that represent slightly (but
conceptually) different object. The instances of each class must behave
in very similar manner, so that I've created a common class ancestor
(let say A) that define a lot of special method (such as __getattr__,
Chris Mellon wrote:
On 11/30/05, could ildg [EMAIL PROTECTED] wrote:
In java and C# String is immutable, str=str+some more will return a new
string and leave some gargabe.
so in java and C# if there are some frequent string operation,
StringBuilder/StringBuffer is recommanded.
Will string
Alex Martelli wrote:
Yep -- time tuples have also become pseudo-tuples (each element can be
accessed by name as well as by index) a while ago, and I believe there's
one more example besides stats and times (but I can't recall which one).
Apart from time and os.stat all the uses seem to be
Gerald Klix [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Did you consider the mmap library?
Perhaps it is possible to avoid to hold these big stings in memory.
BTW: AFAIK it is not possible in 32bit windows for an ordinary programm
to allocate more than 2 GB. That
could ildg wrote:
In java and C# String is immutable, str=str+some more will return a
new string and leave some gargabe.
so in java and C# if there are some frequent string operation,
StringBuilder/StringBuffer is recommanded.
Will string operation in python also leave some garbage? I
Inyeol Lee wrote:
(snip)
class A(object):
... def __init__(self, foo):
... if self.__class__ is A:
... raise TypeError(A is base class.)
s/TypeError/NotImplementedError/
s/base class/abstract class/
--
bruno desthuilliers
python -c print
On 2005-12-01, Mike Meyer [EMAIL PROTECTED] wrote:
Antoon Pardon [EMAIL PROTECTED] writes:
On 2005-12-01, Mike Meyer [EMAIL PROTECTED] wrote:
Antoon Pardon [EMAIL PROTECTED] writes:
I know what happens, I would like to know, why they made this choice.
One could argue that the expression for
Thanks for your suggestions. They are very usefull and indeed bypass my
problem. However, I've found a (perhaps) more elegant way to get the
same result using metaclasses. My idea is to define my classes as
follows:
class meta_A(type):
def __new__(cls, classname, bases, classdict):
Fredrik Lundh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Thomas G. Apostolou wrote:
I still get the error:
SWIG/_m2crypto.c(80) : fatal error C1083: Cannot open include file:
'Python.h': No such file or directory
error: command 'C:\Program Files\Microsoft Visual
Claudio Grondi [EMAIL PROTECTED] wrote:
but the problem with sets.c remains:
C:\VisualC++NET2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /G7 /GX
/DNDEBUG -IE:\Python24\include -IE:\Python24\PC /Tcsrc/sets/sets.c
/Fobuild\temp.win32-2.4\Re
lease\src/sets/sets.obj
sets.c
src\sets\sets.c(68) :
Mr.Rech wrote:
Thanks for your suggestions. They are very usefull and indeed bypass my
problem. However, I've found a (perhaps) more elegant way to get the
same result using metaclasses. My idea is to define my classes as
follows:
class meta_A(type):
def __new__(cls, classname,
Sverker Nilsson [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Claudio Grondi [EMAIL PROTECTED] wrote:
but the problem with sets.c remains:
C:\VisualC++NET2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /G7 /GX
/DNDEBUG -IE:\Python24\include -IE:\Python24\PC
Mardy wrote:
Hi all,
I'm starting to think the way I've implemented my program
(http://www.mardy.it/eligante) is all wrong.
Basically, what I want is a web application, which might run as CGI
scripts in apache (and this is working) or even as a standalone
application, in which case it
Mr.Rech wrote:
Thanks for your suggestions. They are very usefull and indeed bypass my
problem. However, I've found a (perhaps) more elegant way to get the
same result using metaclasses.
(snip code)
I know metaclasses are a complete different beast, anyway I find this
approach more
I'm new to python. Have a simple question.
open function can only open an existing file and raise a IOerror when
the given file does not exist. How can I creat a new file then?
--
http://mail.python.org/mailman/listinfo/python-list
Howdy all,
My practice when writing unit tests for a project is to make 'test/'
subdirectories for each directory containing modules I want to test.
project-foo/
+-- lib/
| +-- test/
+-- data/
+-- gui/
| +-- test/
+-- server/
+-- test/
This means that I
Thomas G. Apostolou wrote:
So what you say is that the Python installed with Plone doesn't have
Python.h in ./include but Python installers from Python.org do have the
file?
that's likely, given building didn't work for you.
after all, Plone's an application that happens to include a Python
[EMAIL PROTECTED] wrote:
DecInt's division algorithm is completely general also. But I would
never claim that Python code is faster than assembler. I believe that
careful implementation of a good algorithm is more important than the
raw speed of the language or efficiency of the compiler.
sandorf wrote:
I'm new to python. Have a simple question.
open function can only open an existing file and raise a IOerror when
the given file does not exist. How can I creat a new file then?
fic = open('test.txt', 'w')
fic.write('Hello world')
fic.close()
--
sandorf wrote:
I'm new to python. Have a simple question.
open function can only open an existing file and raise a IOerror when
the given file does not exist. How can I creat a new file then?
open the new file in write mode: open('foo', 'w')
See: help(open)
HTH,
Wolfram
--
sandorf wrote:
I'm new to python. Have a simple question.
open function can only open an existing file and raise a IOerror when
the given file does not exist. How can I creat a new file then?
You already have two correct answers. A warning: if you open a existing
file for writing, it is
sandorf [EMAIL PROTECTED] wrote:
I'm new to python. Have a simple question.
open function can only open an existing file and raise a IOerror when
the given file does not exist. How can I creat a new file then?
reading the documentation might help:
help(open)
class file(object)
|
On 2005-12-02, Bengt Richter [EMAIL PROTECTED] wrote:
On 1 Dec 2005 09:24:30 GMT, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2005-11-30, Duncan Booth [EMAIL PROTECTED] wrote:
Antoon Pardon wrote:
The left one is equivalent to:
__anon = []
def Foo(l):
...
Foo(__anon)
Foo(__anon)
Steven Bethard wrote:
I feel like there should be a simpler solution (maybe with the re
module?) but I can't figure one out. Any suggestions?
using the finditer pattern I just posted in another thread:
tokens = ['She', 's, 'gon', 'na', 'write', 'a', 'book', '?']
text = '''\
She's gonna
Le die Thu, 01 Dec 2005 15:08:14 -0800, amfr ha scribite:
I have included some of the content of that file, I am writing this as
an extension to my ebserver which is based on BaseHTTPServer. This
part of the code was taken directly from the CGIHTTPServer file,
nothing changed
I did the
Ben Finney wrote:
This works, so long as the foomodule is *not* in the path before the
appended '..' directory. When writing unit tests for a development
version of a package that is already installed at an older version in
the Python path, this fails: the unit tests are not importing the
Many Python scripts I see start with the shebang line
#!/usr/bin/env python
What is the difference from using just
#!python
Regards,
Adriano.
--
http://mail.python.org/mailman/listinfo/python-list
I'd be interested in seeing the one liner using reduce you mentioned --
how it might be done that way isn't obvious to me.
Another aspect of Taschuk's solution I like and think is important is
the fact that it is truly iterative in the sense that calling it
returns a generator which will yield
Thank to you all, guys. Here's another question:
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's the problem?
--
Adriano Ferreira wrote:
Many Python scripts I see start with the shebang line
#!/usr/bin/env python
What is the difference from using just
#!python
#v+
$ ls -l /tmp/hello.py
-rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py
$ cat /tmp/hello.py
#! python
print 'Hello, world!'
#
Hello Bengt,
Bengt Richter wrote:
On 1 Dec 2005 03:38:37 -0800, Fuzzyman [EMAIL PROTECTED] wrote:
Fuzzyman wrote:
Sorry for this hurried message - I've done a new implementation of out
ordered dict. This comes out of the discussion on this newsgroup (see
blog entry for link to archive
On 12/2/05, Klaus Alexander Seistrup [EMAIL PROTECTED] wrote:
#v+
$ ls -l /tmp/hello.py
-rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py
$ cat /tmp/hello.py
#! python
print 'Hello, world!'
# eof
$ /tmp/hello.py
bash: /tmp/hello.py: python: bad interpreter: No such file or
Adriano Ferreira wrote:
Many Python scripts I see start with the shebang line
#!/usr/bin/env python
What is the difference from using just
#!python
$ more test.py
#!python
print hello
$ chmod +x test.py
$ ./test.py
-bash: ./test.py: python: bad interpreter: No such file or directory
/F
Quoting Andrew Kuchling:
element = document.createElementNS(DAV:, href)
This call is incorrect; the signature is createElementNS(namespaceURI,
qualifiedName).
Not at all, Andrew. href is a valid qname, as is foo:href. The
prefix is optional in a QName. Here is the correct
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's the problem?
Thanks.
--
Adriano Ferreira skrev:
#v+
$ ls -l /tmp/hello.py
-rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py
$ cat /tmp/hello.py
#! python
print 'Hello, world!'
# eof
$ /tmp/hello.py
bash: /tmp/hello.py: python: bad interpreter: No such file or directory
$
#v-
Hey, that's not
I see your point. Looking again at my metaclass implementation and
comparing it with your abstract class + inheritance approach it turns
out that the latter is definetively more straightforward, easier to
maintain and all in all more pythonic.
Sorry, but being an OOP newbie put me in the position
On Fri, 2005-12-02 at 09:12, Adriano Ferreira wrote:
On 12/2/05, Klaus Alexander Seistrup [EMAIL PROTECTED] wrote:
#v+
$ ls -l /tmp/hello.py
-rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py
$ cat /tmp/hello.py
#! python
print 'Hello, world!'
# eof
$ /tmp/hello.py
I'm a big fan of Eclipse and reocmmend it to anyone who asks :)
No one can say any one is the *best*, since it's a matter of taste,
but it's pretty darn good.
The main benefit IMO is it's felibility ... Eclipse is a *framework*,
that can handle lots things quite well, like HTML (If you're
sandorf wrote:
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's the problem?
Thanks.
No problem. Just reload()
I have a Makefile target that uses a python script, like:
%.abc: %.def
python myscript.py
The problem is that myscript.py and some modules that myscript.py
imports are not in the current directory, but in another place in the
filesystem, say, /path/to/stuff. If this was a tcsh script, I
Hi Chris,
I think that you should try it yourself... being the *best ide* is
usually a subjective matter, so, you should decide yourself if it is the
best IDE for the task you want it to.
I must also warn you that I'm its current maintainer, and it is *my*
favorite IDE :-)
Also, I use it
Martin Miller wrote:
I'd be interested in seeing the one liner using reduce you mentioned --
how it might be done that way isn't obvious to me.
Another aspect of Taschuk's solution I like and think is important is
the fact that it is truly iterative in the sense that calling it
returns a
[EMAIL PROTECTED] wrote:
Could the above server-speed assymetry that i spoke of above be caused
by this reverse dns lookup?
I think so. You stated that you use a fairly simple HTTP server,
although that's not exactly specific enough to diagnose the problem,
but if that were the standard
On 12/2/05, Carsten Haese [EMAIL PROTECTED] wrote:
(3) assumes that whatever shell the user is running looks up the shebang
executable in the path, which bash, just to name one example, does not
do.
I think that was the answer I was looking for. So that #!/usr/bin/env
python is more portable
Adriano Ferreira wrote:
So that #!/usr/bin/env python is more portable than #! python
and that's probably why it worked for me with cygwin/bash but not
for Klaus on whatever platform he used.
/me is using bash on linux.
I agree. Only a very strange Unix-like installation would not have
Adrian Holovaty wrote:
http://code.djangoproject.com/wiki/DevelopersForHire
See the Django-powered jobs section. We could definitely advertise
this page more, as it's a bit hidden at the moment on the Django wiki.
Don't forget the Python Job Board:
http://www.python.org/Jobs.html
Yes, it's
[EMAIL PROTECTED] wrote:
...
As while DSU is a very smart way to guard the max compare thing, it is
still being introduced as a way that is not related to the original
problem, i.e. I just want to compare f(x)
And that's why in 2.5 you'll just code max(mylist, key=f) to express
this intent
On 12/2/05, Klaus Alexander Seistrup [EMAIL PROTECTED] wrote:
/me is using bash on linux.
I think that was not a bash issue in my case, but a Cygwin/Win32
issue. Windows has some monstruous oddities in order to assure broken
behavior of yesterday is here today in the name of compatibility.
I am a newcomer to using Python and Qt and the main problem that I have
is the dearth of any example code or books describing the use of Python
and Qt together.
My current problem is that I want to create a custom cursor, from my
understanding of it I need to create two QBitmaps, one of which
Fredrik Lundh wrote:
Steven Bethard wrote:
I feel like there should be a simpler solution (maybe with the re
module?) but I can't figure one out. Any suggestions?
using the finditer pattern I just posted in another thread:
tokens = ['She', 's, 'gon', 'na', 'write', 'a', 'book', '?']
text =
Michael Spencer wrote:
Steven Bethard wrote:
I've got a list of word substrings (the tokens) which I need to
align to a string of text (the sentence). The sentence is basically
the concatenation of the token list, with spaces sometimes inserted
beetween tokens. I need to determine the
Is it possible to to detect a Tkinter top-level window being closed with the
close icon/button (top right), for example to call a function before the
window actually closes?
Python 2.4 / Linux (2.6 kernel) if that makes any difference.
Any info would be greatly appreciated.
Thanks
Glen
--
On Friday 02 December 2005 3:31 pm, [EMAIL PROTECTED] wrote:
I am a newcomer to using Python and Qt and the main problem that I have
is the dearth of any example code or books describing the use of Python
and Qt together.
My current problem is that I want to create a custom cursor, from my
Glen wrote:
Is it possible to to detect a Tkinter top-level window being closed with the
close icon/button (top right), for example to call a function before the
window actually closes?
Python 2.4 / Linux (2.6 kernel) if that makes any difference.
Any info would be greatly appreciated.
[EMAIL PROTECTED] wrote:
I'm trying to move beyond Emacs/Vim/Kate
and was wondering if Eclipse is better and if it is the *best*
IDE for Python.
Should I leave Emacs and do Python coding in Eclipse?
I've been a heavy Emacs user for several years, but recently switched to
Eclipse for Python
Glen wrote:
Is it possible to to detect a Tkinter top-level window being closed with the
close icon/button (top right), for example to call a function before the
window actually closes?
http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm#protocols
/F
--
Steven Bethard wrote:
Michael Spencer wrote:
Steven Bethard wrote:
I've got a list of word substrings (the tokens) which I need to
align to a string of text (the sentence). The sentence is
basically the concatenation of the token list, with spaces sometimes
inserted beetween tokens.
Fredrik Lundh wrote:
Harald Karner wrote:
python -c print len('m' * ((2048*1024*1024)-1))
2147483647
the string type uses the ob_size field to hold the string length, and
ob_size is an integer:
$ more Include/object.h
...
int ob_size; /* Number of items in variable part */
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's the problem?
import only reads the file the first time it's called.
infidel a écrit :
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's the problem?
import only reads the file the first
QOTW: Python makes it easy to implement algorithms. - casevh
Most of the discussion of immutables here seems to be caused by
newcomers wanting to copy an idiom from another language which doesn't
have immutable variables. Their real problem is usually with binding,
not immutability. - Mike Meyer
Thanks Fredrik and Adonis that's just what I needed, plus a bit more to
learn about.
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon [EMAIL PROTECTED] writes:
Well there are two possibilities I can think of:
1)
arg_default = ...
def f(arg = arg_default):
...
Yuch. Mostly because it doesn't work:
arg_default = ...
def f(arg = arg_default):
...
arg_default = ...
def g(arg = arg_default):
In article [EMAIL PROTECTED],
Adriano Ferreira [EMAIL PROTECTED] wrote:
Hey, that's not fair. In your illustration above, does 'python' can be
found in the PATH? That is,
$ python /tmp/hello.py
works? If it does, probably
#!/usr/bin/python
#!/usr/bin/env python
#!python
would
Fredrik Lundh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Thomas G. Apostolou wrote:
So what you say is that the Python installed with Plone doesn't have
Python.h in ./include but Python installers from Python.org do have the
file?
that's likely, given building didn't work
[EMAIL PROTECTED] wrote:
I'm trying to move beyond Emacs/Vim/Kate
and was wondering if Eclipse is better and if it is the *best*
IDE for Python.
Should I leave Emacs and do Python coding in Eclipse?
Chris
I'm agnostic; lots of IDE's/editors have buzz, you should learn to use
at least a
I'm trying to iterate through repeating elements to extract data using
libxml2 but I'm having zero luck - any help would be appreciated.
My XML source is similar to the following - I'm trying to extract the
line number and product code from the repeating line elements:
order xmlns=some-ns
Antoon Pardon [EMAIL PROTECTED] writes:
On 2005-12-02, Bengt Richter [EMAIL PROTECTED] wrote:
On 1 Dec 2005 09:24:30 GMT, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2005-11-30, Duncan Booth [EMAIL PROTECTED] wrote:
Antoon Pardon wrote:
I think one could argue that since '[]' is normally
[EMAIL PROTECTED]
I have a Makefile target that uses a python script, like:
%.abc: %.def
python myscript.py
If this was a tcsh script, I would just do:
setenv PYTHONPATH /path/to/stuff
python myscript.py
but this cannot be done from a Makefile.
Use:
%.abc: %.def
How can I tell Pydoc not to list information for some of the base
classes? For example, when a class inherits from gtk.Widget, lots of
GTK stuff gets added that doesn't really need to be there. Is there
some option to Pydoc to tell it to skip some classes? Is there
something I can put in my
Here it is again... Python bypassed/discounted because, of all things,
scoping by indentation!?!?
This used to surprise me. Until I hear more and more otherwise
reasonable programmers list this as their number one reason for
shunning Python.
I gauge design defects by how much after market
[EMAIL PROTECTED] wrote:
Here it is again... Python bypassed/discounted because, of all things,
scoping by indentation!?!?
[...]
Could the PyPy people find some way (I don't how) to eliminate this
stumbling block going forward??
No: I believe they could only eliminate it going backward.
sandorf wrote:
Thank to you all, guys. Here's another question:
I'm using the Windows version of Python and IDLE. When I debug my .py
file, my modification to the .py file does not seem to take effect
unless I restart IDLE. Saving the file and re-importing it doesn't help
either. Where's
[EMAIL PROTECTED] wrote:
I'm trying to iterate through repeating elements to extract data using
libxml2 but I'm having zero luck - any help would be appreciated.
Here's how I attempt to solve the problem using libxml2dom [1] (and I
imagine others will suggest their own favourite modules, too):
On 2 Dec 2005 10:08:21 -0800 in comp.lang.python, [EMAIL PROTECTED]
wrote:
Here it is again... Python bypassed/discounted because, of all things,
scoping by indentation!?!?
This used to surprise me. Until I hear more and more otherwise
reasonable programmers list this as their number one
Hi guys,
I'm thinking it will take a real expert to do this, probably someone
who can use windows API's or directly poll the hardware or some such
thing. But if you think you know how then please let me
know. I'm trying to write an automation script that will burn an
ISO file each night.
By the
[EMAIL PROTECTED] wrote:
The server runs fast when one computer is the server, but slow when the
other computer is the server.
How can this be, given that this asymmetry does not exist when both
computers are wired.
Probably because the way your wireless interfaces are configured may be
You're not alone.
The first thing I do after installing an IDE or programmers editor is
to change the configuration to use spaces as identantion.
I still don't get why there is still people using real tabs as
indentation.
--
Paulo
Dave Hansen wrote:
On 2 Dec 2005 10:08:21 -0800 in
On Fri, Dec 02, 2005 at 10:43:56AM +0100, bruno at modulix wrote:
Inyeol Lee wrote:
(snip)
class A(object):
... def __init__(self, foo):
... if self.__class__ is A:
... raise TypeError(A is base class.)
s/TypeError/NotImplementedError/
s/base
In article [EMAIL PROTECTED],
Dave Hansen [EMAIL PROTECTED] wrote:
On 2 Dec 2005 10:08:21 -0800 in comp.lang.python, [EMAIL PROTECTED]
wrote:
Here it is again... Python bypassed/discounted because, of all things,
scoping by indentation!?!?
This used to surprise me. Until I hear more
On 2 Dec 2005 13:05:43 GMT, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2005-12-02, Bengt Richter [EMAIL PROTECTED] wrote:
On 1 Dec 2005 09:24:30 GMT, Antoon Pardon [EMAIL PROTECTED] wrote:
On 2005-11-30, Duncan Booth [EMAIL PROTECTED] wrote:
Antoon Pardon wrote:
Personnaly I expect the
Dear list,
The syntax for using assertRaise is
assertRaise(exception, function, para1, para2,...)
However, I have a long list of arguments (20) so I would like to test
some of them using keyword arguments (use default for others). Is there
a way to do this except for manually try...except?
I have been looking a bit and am stuck at this point.
Given a string, how do i find what is the string bound to.
Let me give an example.
def deep():
print Hello
now inspect.ismethod(deep) returns true. (As it should).
But if I am trying to make a list of all bound methods), i use
dir(),
On 2 Dec 2005 06:16:29 -0800,
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Of course. Minidom implements level 2 (thus the NS at the end of the
method name), which means that its APIs should all be namespace aware.
The bug is that writexml() and thus toxml() are not so.
Hm, OK. Filed
Bo Peng wrote:
The syntax for using assertRaise is
assertRaise(exception, function, para1, para2,...)
However, I have a long list of arguments (20) so I would like to test
some of them using keyword arguments (use default for others). Is there
a way to do this except for manually
From python, I need to be able to create CSG objects and calculate their volume
(and from that their mass).
It looks like their are plenty of packages to create and display CSG objects,
however, I can not seem to find any API to get to the object's volume.
If anyone has any
I am using execfile, setting stdin and stdout like this:
sys.stdin = self.wfile
sys.stdout = self.rfile
execfile(filename)
Its the same code used in the CGIHTTPServer module. I know that the
python is executing corretly, a script with this content would work:
print html
print head
print title
On Dec 02, Dave Hansen wrote:
Python recognizes the TAB character as valid indentation. TAB
characters are evil. They should be banned from Python source code.
AGREE! AGREE! AGREE!
The interpreter should stop translation of code and throw an
exception when one is encountered.
You could
Giovanni Bajo wrote:
You can pass keyword arguments to assertRaises without problems:
self.assertRaises(ValueError, myfunc, arg1,arg2, arg3, arg4, abc=0, foo=1,
bar=hello)
Well, I though abc=0 would be keyword arguments for assertRaisers and
never tried it!
Or you can always do
Deep wrote:
I have been looking a bit and am stuck at this point.
Given a string, how do i find what is the string bound to.
Let me give an example.
def deep():
print Hello
now inspect.ismethod(deep) returns true. (As it should).
But if I am trying to make a list of all bound
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Micah Elliott wrote:
On Dec 02, Dave Hansen wrote:
Python recognizes the TAB character as valid indentation. TAB
characters are evil. They should be banned from Python source code.
AGREE! AGREE! AGREE!
The interpreter should stop
On 12/2/05, Dave Hansen [EMAIL PROTECTED] wrote:
FWIW, indentation scoping one one of the features that _attracted_ me
to Python.
+1 QOTW
OK, it's a bit of a cliche. But it's a cliche because it's *true*.
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
On Fri, Dec 02, 2005 at 09:45:10PM +0100, Gerhard H�ring wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Micah Elliott wrote:
On Dec 02, Dave Hansen wrote:
Python recognizes the TAB character as valid indentation. TAB
characters are evil. They should be banned from Python source
1 - 100 of 130 matches
Mail list logo