Overview
**python-constraint** [1]_ is a Python module offering solvers for
Constraint Solving Problems (CSPs) over finite domains in simple
and pure Python. CSP is class of problems which may be represented
in terms of variables (`a`, `b`, ...), domains (`a in [1, 2, 3]`, ...),
Ron Adam wrote:
> Given the statement:
>
> a = None
>
> And the following are all true:
>
> a == None
Okay.
> (a) == (None)
Okay.
> (a) == ()
Whoops! a (which is None) is equal to the empty tuple (which is not None)?
> (None) == ()
>
> Then this "conceptual" comparison should also be tr
Mike Meyer wrote:
> Ron Adam <[EMAIL PROTECTED]> writes:
>
>>So doing this would give an error for functions that require an argument.
>>
>> def foo(x):
>> return x
>>
>> a = None
>> b = foo(a)# error because a dissapears before foo gets it.
>
>
> So how do I pass None
Almost sounds like a racist comment - sorry if I misunderstood
Antoon Pardon wrote:
> Op 2005-07-06, Michele Simionato schreef <[EMAIL PROTECTED]>:
>> Fuzzyman:
>>> So Lisp is for really good programmers, and Python is for
>>> mediocre programmers ?
>>
>>
>> Python is *also* for mediocre p
On Jul 6, 2005, at 8:59 AM, Fuzzyman wrote:
> Wax has a brilliant prebuilt dialog/handler. It's a wrapper over
> wxPython - so you still use wxPython objects, it's jsut all a lot
> easier.
And don't forget Dabo, which wraps all of wxPython's dialogs into
simple calls. No need to create/show/dest
Grant Edwards wrote:
> On 2005-07-07, Ron Adam <[EMAIL PROTECTED]> wrote:
>
>>Grant Edwards wrote:
>>
>>
>>>On 2005-07-06, Ron Adam <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
It would be a way to set an argument as being optional without
actually assigning a value to it. The conflict would b
Buy the book "Practical Python" by Magnus Lie Hetland. It contains 10
practical projects to let u get started on you own "Pythoneering"( as
Magnus calls it). Move on buddy.
--
http://mail.python.org/mailman/listinfo/python-list
Rocco Moretti wrote:
> Actually, Google's answer to that question is something called "ILOG
> CPLEX",
We use this. It's a library / command line tool (not a language) for
doing optimization - linear programming, quadratic programming,
mixed-integer programming etc. Very cool and very, very
On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
>>>_NOVALUE = object()
>>>class demo:
>>>def foo(v=_NOVALUE):
>>>if v is _NOVALUE:
>>>return self.v
>>>else:
>>>self.
On 2005-07-07, George Sakkis <[EMAIL PROTECTED]> wrote:
> I guess he means why not define foo as property:
>
> class demo(object):
> foo = property(fget = lambda self: self.v,
>fset = lambda self,v: setattr(self,'v',v))
>
> d = demo()
> d.foo = 3
> print d.foo
In some ways
getattr does not work on a running script (afaik) because 'self' is
undefined. The poster above got it right using 'locals()'
--
http://mail.python.org/mailman/listinfo/python-list
'self' is not defined in this circumstance. The poster above (using
'locals()') has it right.
--
http://mail.python.org/mailman/listinfo/python-list
Yes, that is exactly what I was looking for. Thank you. I will read
more about 'locals()', but a quick test proved you right.
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
>>_NOVALUE = object()
>>class demo:
>>def foo(v=_NOVALUE):
>>if v is _NOVALUE:
>>return self.v
>>else:
>>self.v = v
>
>
> Apart from the change in the logic such that the set
Stian Søiland wrote:
> Or what about a recursive generator?
>
> a = [1,2,[[3,4],5,6],7,8,[9],[],]
>
> def flatten(item):
> try:
> iterable = iter(item)
> except TypeError:
> yield item # inner/final clause
> else:
> for elem in
"Shai" <[EMAIL PROTECTED]> writes:
> They're called "Special vars", and you need to define them (unlike
> local LISP variables, which behave essentially like Python vars), but
> then you use them just like other vars (that is, you usually bind them
> with LET). This is the first I hear about them
"Grant Edwards" wrote:
> In 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
>
> - Hide quoted text -
> - Show quoted text -
> > Grant Edwards wrote:
> >> 1) So I know whether an parameter was passed in or not. Perhaps
> >>it's not considered good Pythonic style, but I like to use a
> >>
On 2005-07-07, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> 1) So I know whether an parameter was passed in or not. Perhaps
>>it's not considered good Pythonic style, but I like to use a
>>single method for both get and set operations. With no
>>parameters, it's
Ron Adam <[EMAIL PROTECTED]> writes:
> So doing this would give an error for functions that require an argument.
>
> def foo(x):
> return x
>
> a = None
> b = foo(a)# error because a dissapears before foo gets it.
So how do I pass None to a function?
> >>TypeErro
Grant Edwards wrote:
> 1) So I know whether an parameter was passed in or not. Perhaps
>it's not considered good Pythonic style, but I like to use a
>single method for both get and set operations. With no
>parameters, it's a get. With a parameter, it's a set:
>
>class demo:
>
Dark Cowherd wrote:
> Stupid of me.
>
> I want some feedback on folllwing:
> anybody who has experience in writing SOAP servers in Python and data
> entry heavy web applications.
> Any suggestions?
> darkcowherd
Check ZSI, or SOAPPY, both on Python Web Services
http://pywebsvcs.sourceforge.net/
I
I see you got many good/funny answers already.
Test Python for two WE and you'll be able to help yourself very well ...
I've been through an equivalent process.
Regards,
Philippe
[EMAIL PROTECTED] wrote:
> I am a java programmer and I want to learn Python Please help me.
--
http://mail.py
--- David Abrahams <[EMAIL PROTECTED]> wrote:
> Recently people testing Boost.Python with GCC on Linux have reported
> that the extensions being tested have to be compiled with exactly the
> same version of GCC as the Python they're being loaded into, or they
> get mysterious crashes.
>
> That doe
On 2005-07-07, Ron Adam <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>
>> On 2005-07-06, Ron Adam <[EMAIL PROTECTED]> wrote:
>>
>>
>>>It would be a way to set an argument as being optional without
>>>actually assigning a value to it. The conflict would be if
>>>there where a global with the
Grant Edwards wrote:
> On 2005-07-06, Ron Adam <[EMAIL PROTECTED]> wrote:
>
>
>>It would be a way to set an argument as being optional without actually
>>assigning a value to it. The conflict would be if there where a global
>>with the name baz as well. Probably it would be better to use a v
Benji York wrote:
> Ron Adam wrote:
>
>> "if extraargs:" would evaluate to "if None:", which would evaluate to
>> "if:" which would give you an error.
>
>
> In what way is "if None:" equivalent to "if:"?
> --
> Benji York
It's not now.. but if None where to really represent the concept None,
Jeremy Moles wrote:
> Forgive me if this topic has been brought up before, but I was curious
> as to why I was getting this behavior and was hoping someone
> knowledgeable could explain. :)
What behavior?
> I "feel" like even without the explicit call to a simple base ctor(),
> mangling should s
class BaseClass:
def __init__(self):
self.__data = None
def getMember(self):
return self.__data
class GoodSubClass(BaseClass):
def __init__(self):
BaseClass.__init__(self)
class BadSubClass(BaseClass):
def __init__(s
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
> On Wed, 06 Jul 2005 10:15:31 -0700, George Sakkis wrote:
>
> > Well, they *may* be interchangable under some conditions, and that was
> > the OP's point you apparently missed.
>
> I didn't miss anything of the sort. That's why I spent 15 minutes actua
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> I discovered FP with David Mertz's papers about FP in Python. I had
> never read nor write a line of lisp, scheme, haskell, caml etc before.
> And I'd certainly start thinking of choosing another MYFL if anonymous
> functions where to disappear
Steven D'Aprano wrote:
> If, over a thousand runs of the program, you save a millisecond of
> time in total, but it costs you two seconds to type the comment in
> the code explaining why you used frozenset instead of the more
> natural set, then your "optimization" is counter-productive. Even
> ju
Hi.
Instead of listing the difference ..here are some things that are
COMMON to both common lisp and python :
1.Dynamic typing.
2.garbage collection
3.powerful data structures
4.good object systems. (here people from lisp usually claim that clos
is the most powerful object system...but i think pyt
Tom Anderson <[EMAIL PROTECTED]> writes:
> Comrades,
>
> During our current discussion of the fate of functional constructs in
> python, someone brought up Guido's bull on the matter:
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=98196
>
> He says he's going to dispose of map, filter, red
[EMAIL PROTECTED] wrote:
> I am a java programmer and I want to learn Python Please help me.
My condolences. I am a programmer who is currently forced to program in
Java.
These two sites will help you a lot in learning to program in Python:
http://www.catb.org/~esr/faqs/smart-questions.html
htt
Thomas Heller wrote:
> I forgot to mention this: The Base class also implements a __getitem__
> method which should be used for iteration if the .Iterator method in
> the subclass is not available. So it seems impossible to raise an
> exception in the __iter__ method if .Iterator is not found - _
> > For a simple example, convert both 10247448370872321 and
> > 10247448370872319 from base ten to 4 digits of hex. The calculations
> > need to be carried out to 15 places of hex (or 17 places of decimal)
> > just to determine whether the fourth hex digit is a 7 or 8:
> >
> > >>> hex(1024744
Daniel Schüle wrote:
> Removing lamdba would be reduce readability of Python, I think here
> for examble of code like
>
> class App:
>
>
> def drawLines(self, event):
> from random import randint
> r = lambda : randint(1, 100)
> self.canvas.create_line
I am having more problems with 24.0b2. Consider the NetCDF file:
netcdf very_simple {
dimensions:
num = 2 ;
variables:
float T(num) ;
T:mv = 5.0f ;
data:
T = 1., 2. ;
}
and the python script:
import Numeric
from Scientific.IO.NetCDF import NetCDFFile
file = NetCDFFile
On Wed, 06 Jul 2005 10:15:31 -0700, George Sakkis wrote:
> Well, they *may* be interchangable under some conditions, and that was
> the OP's point you apparently missed.
I didn't miss anything of the sort. That's why I spent 15 minutes actually
producing test cases to MEASURE if there was any de
I think in some contextes map is more readable than [f() for i in S]
because it's more verbatim
Removing lamdba would be reduce readability of Python, I think here
for examble of code like
class App:
def drawLines(self, event):
from random import r
I only saw this today... sorry about the late response. Anyway,
replying to your two messages at once:
Mike Meyer wrote:
> Last time I checked, dynamic binding variables were frowned on in LISP
> systems as well. Scheme doesn't have them. Common LISP requires
> special forms to use them.
They'r
David Abrahams wrote:
> Recently people testing Boost.Python with GCC on Linux have reported
> that the extensions being tested have to be compiled with exactly the
> same version of GCC as the Python they're being loaded into, or they
> get mysterious crashes.
>
> That doesn't correspond to my pa
Recently people testing Boost.Python with GCC on Linux have reported
that the extensions being tested have to be compiled with exactly the
same version of GCC as the Python they're being loaded into, or they
get mysterious crashes.
That doesn't correspond to my past experience; it has always been
On 2005-07-06, Ron Adam <[EMAIL PROTECTED]> wrote:
> It would be a way to set an argument as being optional without actually
> assigning a value to it. The conflict would be if there where a global
> with the name baz as well. Probably it would be better to use a valid
> null value for what e
Ron Adam wrote:
> "if extraargs:" would evaluate to "if None:", which would evaluate to
> "if:" which would give you an error.
In what way is "if None:" equivalent to "if:"?
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Reinhold Birkenfeld wrote:
> Ron Adam wrote:
>
>>Ron Adam wrote:
>>
>>
>>>And accessing an undefined name returned None instead of a NameError?
>>
>>I retract this. ;-)
>>
>>It's not a good idea. But assigning to None as a way to unbind a name
>>may still be an option.
>
> IMO, it isn't. This
François Pinard wrote:
> My feeling at the time was that Scheme is a very fast language to write
> into, and in which one can implement new concepts cleanly and compactly.
> Maybe Python is a bit slower to write, but this is compensated by the
> fact Python is more legible when it comes to later ma
Matthias R. wrote:
> Unfortunately matplotlib is only a 2D-plotting library.
>
> Do you know another one with 3D-capabilities as well?
There's PyX.
> That would be very nice,
Yes, yes it would.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the grav
Stian Søiland a écrit :
>
(snip)
> Hey, I know!
>
> t = python.util.ImmutableArrayList.fromCollection(L.getAbstractCollection())
>
> python.util.functional.applyFunctionOnCollection(
> (class implements python.util.functional.AnonymousFunction:
> def anonymousFunction(x):
>
> Robert Kern wrote:
>
> > fortuneteller wrote:
> >> Hello,
> >>
> >> I'm quite new to python and Scipy.
> >> Anyway I want to use it to plot graphs.
> >> Does anybody know if there is the possibility to use Latex in SciPy's
> >> plotting functions like gplt?
> >
> > I don't believe so. matplotlib
Tom Anderson a écrit :
> Comrades,
>
> During our current discussion of the fate of functional constructs in
> python, someone brought up Guido's bull on the matter:
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=98196
>
> He says he's going to dispose of map, filter, reduce and lambda.
I'm sorry for you, nobody deserves to program in Java ...
I'm glad you decided to stand up for your human rights. Go learn
python!
--
http://mail.python.org/mailman/listinfo/python-list
Jeff Epler wrote:
> Here's the bug. You're using Windows.
QOTW (speaking as someone who is using Windows right now).
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
An article of mine, entitled "PyNSol: Objects as Scaffolding" has
appeared in Computing in Science and
Engineering. You can read it at
http://www.computer.org/portal/site/cise/
or alternatively at
http://geosci.uchicago.edu/~tobis/ciseps.pdf
It's not so much an article about a software project
Dear sender,
I am on vacation up to and including Sunday, July 10th, 2005 and I will be
travelling on Monday and Tuesday after.
My first day back in the office might be Wednesday, July 13th, 2005 - at which
time I will have access to email again.
If it's urgent you can try my mobile on Monday/Tues
Unfortunately matplotlib is only a 2D-plotting library.
Do you know another one with 3D-capabilities as well?
That would be very nice,
thank you,
Matthias
Robert Kern wrote:
> fortuneteller wrote:
>> Hello,
>>
>> I'm quite new to python and Scipy.
>> Anyway I want to use it to plot graphs.
On Wed, 6 Jul 2005 20:42:51 +0200,
Stian Søiland <[EMAIL PROTECTED]> wrote:
> I'm all for it. I would even be tempted of changing def to function,
> but it would look stupid in:
> class A:
> function make_my_day(self):
> return "Your day"
> a = A()
> since a.
Stian Søiland wrote:
> On 2005-07-06 16:33:47, Ron Adam wrote:
>
>
>>*No more NamesError exceptions!
>> print value
>> >> None
>
>
> So you could do lot's of funny things like:
>
> def my_fun(extra_args=None):
> if not extraargs:
> print "Behave normally"
>
Ron Adam wrote:
> Ron Adam wrote:
>
>> And accessing an undefined name returned None instead of a NameError?
>
> I retract this. ;-)
>
> It's not a good idea. But assigning to None as a way to unbind a name
> may still be an option.
IMO, it isn't. This would completely preclude the usage of
On 7/6/05, Terry Hancock <[EMAIL PROTECTED]> wrote:
> On Tuesday 05 July 2005 03:53 pm, Renato Ramonda wrote:
> > Why not use just spaces? Vim simplifies this immensely:
> >
> > set tabstop=4
> > set shiftwidth=4
> > set expandtab
> > set smarttab
> > set autoindent
> >
> > AFAICT this gives me all
Pierre wrote:
> Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
^^^
Here's the bug. You're using Windows. It's a filesystem, but not as we know
it...
Anyway, You are getting exactly what the
os.path.exists(path) returns True if "path" exists
But on Windows it also returns True for "path" followed by any number of
dots :
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>
harold fellermann wrote:
>>I don't know if I should be inheriting file or just using a file
>>object.
>> How would I determine which one would be more appropriate?
>
>
> Inheritance is often refered to as an IS relation, whereas using an
> attribute
> is a HAS relation.
>
> If you inherit fro
On 2005-07-06 00:50:30, Ron Adam wrote:
> This is probably the more correct way to do it. :-)
>
> def flatten(seq):
> i = 0
> while i!=len(seq):
> while isinstance(seq[i],list):
> seq[i:i+1]=seq[i]
> i+=1
> return seq
Or what about a recursive genera
[EMAIL PROTECTED] schreef op de 6e dag van de hooimaand van het jaar 2005:
> You can calculate the offset of where you are like this:
>
> [EMAIL PROTECTED]:~ $ python
> Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
> [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
> Type "help", "copyright", "credits"
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
>> "George Sakkis" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > Still it's hard to explain why four specific python keywords - def,
>> > del, exec and el
Ron Adam wrote:
> And accessing an undefined name returned None instead of a NameError?
I retract this. ;-)
It's not a good idea. But assigning to None as a way to unbind a name
may still be an option.
--
http://mail.python.org/mailman/listinfo/python-list
I'm old school and have been very happy with emacs (on windows) and the
python extensions. I just edit my file and hit control-C twice and it runs.
I'm also using eclipse with PyDev and it's ok, but sluggish.
-Original Message-
From: anthonyberet [mailto:[EMAIL PROTECTED]
Sent: Sunday, Ju
Peter Hansen wrote:
> Jonathan Ellis wrote:
> > Peter Hansen wrote:
> >>Or investigate the use of Irmen's Pyro package and how it could let you
> >>almost transparently move your code to a *multi-process* architecture
> >
> > Unless you're doing anything that would require distributed locking.
> >
Scott David Daniels wrote:
> Ron Adam wrote:
>
>> Dan Sommers wrote:
>>
>>> Lots more hard-to-find errors from code like this:
>>> filehandle = open( 'somefile' )
>>> do_something_with_an_open_file( file_handle )
>>> filehandle.close( )
>>
>>
>> If do_something_with_an_open_file() is
It takes great courage to turn from the dark side; let the pforce be with
you.
Also, go to Borders, get the python books and a Latte and figure out if one
of
the many books is written in a style that you like.
-Original Message-
From: bruno modulix [mailto:[EMAIL PROTECTED]
Sent: Monday,
You can calculate the offset of where you are like this:
[EMAIL PROTECTED]:~ $ python
Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
py> import time
py> offset = 0
py> if time.daylight:
Dan Sommers wrote:
>> AttributeError: 'NoneType' object has no attribute 'read'
>
>
> This is the one of which I was thinking. So you see this error at the
> end of a (long) traceback, and try to figure out where along the (long)
> line of function calls I typed the wrong name. Currently,
Stian Søiland wrote:
> Yes, and we can make
>
> someunknownlist[] = 2
>
> magically do someunknownlist = list() and append 2.
I hope you're being sarcastic. :)
If not, why don't you like:
some_list = [2]
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
On 2005-07-06 07:00:04, Steven D'Aprano wrote:
> map(lambda x: if x == 0: 1; else: math.sin(x)/x,
> myList)
And now for the "readable" list comprehension version:
[x==0 and 1 or math.sin(x)/x for x in myList]
Now even though I'm into the short-circuiting of and-or and even
occasionally
Is there a safe and clean way to parse a date/time string into
seconds since epoch?
I have a string with date and time in GMT. I can get the correct
value using this:
#!/usr/bin/env python
import os
os.environ['TZ'] = 'UTC'
import time
s = 'Wed, 06 Jul 2005 16:49:38 GMT'
seconds = time.mktime(t
On 2005-07-06 16:33:47, Ron Adam wrote:
> *No more NamesError exceptions!
> print value
> >> None
So you could do lot's of funny things like:
def my_fun(extra_args=None):
if not extraargs:
print "Behave normally"
extra_args = 1337
if ext
Francois De Serres <[EMAIL PROTECTED]> writes:
> Hello,
>
> I'm chasing a GPF in the interpreter when running my extension module.
> It's not very elaborated, but uses a system (threaded) callback, and
> therefore the GIL.
> Help would be mucho appreciated. Here's the rough picture:
>
> static vo
> I don't know if I should be inheriting file or just using a file
> object.
> How would I determine which one would be more appropriate?
Inheritance is often refered to as an IS relation, whereas using an
attribute
is a HAS relation.
If you inherit from file, all operations for files should
On 2005-07-06 18:10:16, Ron Adam wrote:
> But what if assigning a name to None actually unbound it's name?
> And accessing an undefined name returned None instead of a NameError?
Yes, and we can make
someunknownlist[] = 2
magically do someunknownlist = list() and append 2.
Please.
--
S
On 2005-07-06 01:46:05, Steven D'Aprano wrote:
> I had NEVER even heard the word "tuple" before learning Python. I spent
> weeks mispelling it as "turple", and I finally had to look it up in a
> dictionary to see if it was a real English word. Out of the four English
> dictionaries in my house, no
On 2005-07-06 02:46:27, George Sakkis wrote:
> So, who would object the full-word versions for python 3K ?
> def -> define
> del -> delete
> exec -> execute
> elif -> else if
I'm all for it. I would even be tempted of changing def to function, but
it would look stupid in:
class A:
fu
Before buying a book, I suggest starting out with at least one of these
beginners tutorials available in internet:
- Non-Programmers Tutorial For Python by Josh Cogliati
(honors.montana.edu/~jjc/easytut/easytut/)
- A Byte of Python by Swaroop CH (www.byteofpython.info)
There are many others, but
Jeremy Jones wrote:
> Something like this? I put the following code in test_file.py:
>
> class MyFile(file):
> def doing_something(self):
> print "in my own method"
>
>
> And used it like this:
>
> In [1]: import test_file
>
> In [2]: f = test_file.MyFile("foobar.file", "w")
>
>
Lennart ha scritto:
> Programming Python will I sell as a book that i read secondly, and use as a
> reference.
I'd like to suggest also "Thinking like a CS in python": a schoolbook
used in real classes to teach the basis of programming.
--
Renato
Usi Fedora? F
Terry Hancock ha scritto:
>
> Yep, this is what I just set up in my .vimrc. Works beautifully.
And (you probably already know, but it could be of use to others) you
can bind the activation of some or all of those commands to au
(autocommand) depending on the file extension.
That way you can
fortuneteller wrote:
> Hello,
>
> I'm quite new to python and Scipy.
> Anyway I want to use it to plot graphs.
> Does anybody know if there is the possibility to use Latex in SciPy's
> plotting functions like gplt?
I don't believe so. matplotlib, however, does have this functionality in
recent
On Wed, 06 Jul 2005 15:18:31 GMT,
Ron Adam <[EMAIL PROTECTED]> wrote:
> Dan Sommers wrote:
>> On Wed, 06 Jul 2005 14:33:47 GMT,
>> Ron Adam <[EMAIL PROTECTED]> wrote:
>>
>>> Since this is a Python 3k item... What would be the consequence of
>>> making None the default value of an undefined name?
Hello,
I'm chasing a GPF in the interpreter when running my extension module.
It's not very elaborated, but uses a system (threaded) callback, and
therefore the GIL.
Help would be mucho appreciated. Here's the rough picture:
win32_spam.c
/* code here is unit-tested OK */
typedef st
Hello,
I'm quite new to python and Scipy.
Anyway I want to use it to plot graphs.
Does anybody know if there is the possibility to use Latex in SciPy's
plotting functions like gplt?
Thanks for your help,
Matthias
--
http://mail.python.org/mailman/listinfo/python-list
Ron Adam wrote:
> Dan Sommers wrote:
>> Lots more hard-to-find errors from code like this:
>> filehandle = open( 'somefile' )
>> do_something_with_an_open_file( file_handle )
>> filehandle.close( )
>
> If do_something_with_an_open_file() is not defined. Then you will get:
> TypeErr
Raymond Hettinger wrote:
> [Terry Hancock]
> > > Needless to say, the conventional floating point numbers in Python
> > > are actually stored as *binary*, which is why there is a "decimal"
> > > module (which is new).
> > >
> > > If you're going to be converting between bases anyway, it probably
Jeremy wrote:
>Hello all,
> I am trying to inherit the file object and don't know how to do it. I
>need to open a file and perform operations on it in the class I am
>writing. I know the simple syntax is:
>
>class MyClass(file):
> ...
>
>but I don't know how to make it open the fil
On 06.07.2005, at 18:58, Jeremy wrote:
> Hello all,
> I am trying to inherit the file object and don't know how to do it. I
> need to open a file and perform operations on it in the class I am
> writing. I know the simple syntax is:
>
> class MyClass(file):
> ...
>
> but I don't kno
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
> On Wed, 06 Jul 2005 14:25:30 +0100, Will McGugan wrote:
> > No need for the 'premature optimization is the root of all evil' speech.
> > I'm not trying to optimize anything - just enquiring about the nature of
> > frozenset. If typing 'frozenset' over
Hello all,
I am trying to inherit the file object and don't know how to do it. I
need to open a file and perform operations on it in the class I am
writing. I know the simple syntax is:
class MyClass(file):
...
but I don't know how to make it open the file for reading/writing.
On Wed, 06 Jul 2005 17:57:42 +0200, Thomas Heller <[EMAIL PROTECTED]> wrote:
>I'm trying to implement __iter__ on an abstract base class while I don't
>know whether subclasses support that or not.
>Hope that makes sense, if not, this code should be clearer:
>
>class Base:
>def __getattr__(self
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> I've been reading the beloved Paul Graham's "Hackers and Painters".
> He claims he developed a web app at light speed using Lisp and lots
> of macros.
That was the original "yahoo store".
> It got me curious if Lisp is inherently faster to devel
On Wed, 06 Jul 2005 16:32:42 GMT, "William Gill" <[EMAIL PROTECTED]>
said:
> Excuse me for intruding, but I followed examples and ended up with a
> similar architecture:
>
> from Tkinter import *
> class MyMain(Frame):
> def __init__(self, master):
> self.root = m
jwaixs wrote:
> I need some kind
> of database that won't exit if the cgi-bin script has finished. This
> database need to be open all the time and communicate very easily with
> the cgi-bin framwork main class.
Maybe long-running multi-threaded processes for FastCGI, SCGI or similar
is what you'r
1 - 100 of 207 matches
Mail list logo