473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 22640
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
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.