Looks like you may be using default values in the constructor. The
object is created with, say, an empty list as a default argument, but
this argument is defined only one, when the function is defined.
look:
>>> def myfunc(mylist = []):
mylist.append(1)
print mylist
>>> myfunc()
[
Quoting Max Russell <[EMAIL PROTECTED]>:
> I have a list in this format:
>
> puckman puckmana puckmanf puckmanh pacman
> pacmanf puckmod pacmod
> newpuc2 newpuc2b newpuckx pacheart hangly
Hi,
You can use .split() to turn a string like that into a list of the individual
elements.
(when called
> I've been using BaseHTTPServer (and subclassing BaseHTTPRequestHandler,
> of course) for a project at work. However, I can't seem to close my
> connections completely once I'm done with the server. I've tried:
>
> server.server_close()
> del server
>
> but when I try to use the same port again,
[Note: try to avoid crossposting. The Mailing List Ettiquette FAQ:
http://www.gweep.ca/~edmonds/usenet/ml-etiquette.html
explains why crossposting isn't such a good idea usually. I'm taking
[EMAIL PROTECTED] out of CC now.]
> I am trying to pass a variable into this ESRI function and it
I've been using BaseHTTPServer (and subclassing
BaseHTTPRequestHandler, of course) for a project at work. However, I
can't seem to close my connections completely once I'm done with the
server. I've tried:
server.server_close()
del server
but when I try to use the same port again, it complains th
> I have created a class which has many "Nested list" attributes. When I
> create a second instance of the class, the lists are not empty, and
> already contain the same values as were held in the previous
> instantiation. As a C/C++ programmer, this majes no semns to me at all.
> Could someone p
All of the objects in Python are passed by reference: the address
and the type of the object. The immutable types, such as our old
friend the int, are shared by the function and the application,
as well. Assigning to the function variable containing the int
cannot change the int itself, only
Hello-
I have a list in this format:
puckman puckmana puckmanf puckmanh pacman
pacmanf puckmod pacmod
newpuc2 newpuc2b newpuckx pacheart hangly
hangly2 hangly3 piranhah
crush crush2crush3maketrax maketrxb
korosuke mbrushpaintrlr
pacplus joymanctr
Hi, I am a new Python Programmer, and am encountering some problems with
lists.
I have created a class which has many "Nested list" attributes. When I
create a second instance of the class, the lists are not empty, and already
contain the same values as were held in the previous instantiation.
On Fri, 15 Jul 2005 23:29:22 +1200 (NZST)
[EMAIL PROTECTED] wrote:
> Quoting Michael Lange <[EMAIL PROTECTED]>:
>
> > I don't think it will work this way, because you don't catch the event
> > bind() passes to the callback
> > (you also use a variable "e" in makeCallback() that isn't defined
> >
Thanks Danny.
Bernard
On 7/14/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
>
> > > So the errors are getting raised before Python even knows there is a
> > > problem, so it cannot catch them in an except block. From my very
> > > limited expoerience of COM programming I'd guess that there is a typ
Thanks for the links
I will try both, the tktable and multilistbox
About the HTML llinks I will have to make some functions using webbrowser. I
want to show some reports (tktable or multilistbox) but I want she to be
able to check the same query on the web
So I think that with the GET method I c
Quoting Michael Lange <[EMAIL PROTECTED]>:
> I don't think it will work this way, because you don't catch the event
> bind() passes to the callback
> (you also use a variable "e" in makeCallback() that isn't defined
> anywhere).
That's what the variable 'e' is doing!
Here is some code I just wro
On Fri, 15 Jul 2005 10:55:37 +1200 (NZST)
[EMAIL PROTECTED] wrote:
> There's no table widget in standard Tkinter. Search in the Python Cookbook
> (on
> ActiveState) for a MultiListbox; it might do what you need.
>
> --
On the Tkinter wiki there are some links to Tkinter table widgets (I have
On Fri, 15 Jul 2005 10:20:48 +1200 (NZST)
[EMAIL PROTECTED] wrote:
> def clicked(w):
> print 'Widget %s clicked! Text:' % (str(w), w.cget('text'))
>
> def makeCallback(w):
> def callback(e):
> clicked(w)
> return callback
>
> # create labels
> for text in ['foo', 'bar', 'baz
15 matches
Mail list logo