473,503 Members | 5,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is self?

hi there,
i've been programming cgi with python for a couple of months now, and
i am now moving into some gui programming, using pygtk2.
looking into the code, i see a lot of references to "self" ie
self.window = ...
however, i have no idea what self is?
can anyone enlighten me...
thanks very much...

--
paul
Jul 18 '05 #1
3 22645
paul h wrote:
hi there,
i've been programming cgi with python for a couple of months now, and
i am now moving into some gui programming, using pygtk2.
looking into the code, i see a lot of references to "self" ie
self.window = ...
however, i have no idea what self is?
can anyone enlighten me...
thanks very much...


self is the current object (read : class instance). I think you should
read the part about oop support in the python manual.

Bruno

Jul 18 '05 #2
On 2 Jul 2003 09:46:32 -0700, paul h wrote:
however, i have no idea what self is?


You haven't read through the tutorial then.

Please do so now, it will fill in many missing pieces of knowledge you
currently have about Python:

<http://python.org/doc/current/tut/>

--
\ "Either he's dead or my watch has stopped." -- Groucho Marx |
`\ |
_o__) |
http://bignose.squidly.org/ 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B
Jul 18 '05 #3
On 2 Jul 2003 09:46:32 -0700, paul h wrote:
however, i have no idea what self is?


You haven't read through the tutorial then.

Please do so now, it will fill in many missing pieces of knowledge you
currently have about Python:

<http://python.org/doc/current/tut/>

--
\ "Either he's dead or my watch has stopped." -- Groucho Marx |
`\ |
_o__) |
http://bignose.squidly.org/ 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
2561
by: Jason | last post by:
Hey, I'm an experience programmer but new to Python. I'm doing a simple implementation of a field morphing techinique due to Beier and Neely (1992) and I have the simple case working in Python...
7
3540
by: Michele Simionato | last post by:
So far, I have not installed Prothon, nor I have experience with Io, Self or other prototype-based languages. Still, from the discussion on the mailing list, I have got the strong impression that...
1
1429
by: Lee Harr | last post by:
I am just starting to use properties, and wonder what you might think of this ... class RNumber(object): def __init__(self, n, nmin, nmax): self.nmin = nmin self.nmax = nmax self.n = n
3
1816
by: neutrinman | last post by:
I cannot find out why the following code generates the error: Traceback (most recent call last): File "D:/a/Utilities/python/ptyhon22/test.py", line 97, in ? main() File...
2
3442
by: GregM | last post by:
Hi First off I'm not using anything from Twisted. I just liked the subject line :) The folks of this list have been most helpful before and I'm hoping that you'll take pity on a the dazed and...
6
2851
by: seb | last post by:
Hi, I am using pygtk for the first times. I am wondering what would be the best "pattern" to interface pygtk with a thread. The thread is collecting informations (over the network for...
8
1512
by: Viktor | last post by:
Can somebody give me an explanation what happened here (or point me to some docs)? Code: HMMM = None def w(fn): print 'fn:', id(fn) HMMM = fn
34
5297
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
1
1129
by: Alexnb | last post by:
Okay, so I wrote some code of basically what I will be doing, only with exactly what I need for this part of the program but here you go: from Tkinter import* import os class myApp: def...
44
2884
by: Steven D'Aprano | last post by:
I have a class which is not intended to be instantiated. Instead of using the class to creating an instance and then operate on it, I use the class directly, with classmethods. Essentially, the...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.