At 03:39 PM 11/5/2005, Shi Mu wrote:
>It is very hard for me to understand why we need the following line?
>if __name__ == "__main__":
We don't need it. Often we code a module for importing into another module.
But sometimes we also want to run the module independently as a Python
program, perha
Hi Jan,
Won't this
site_id = property(GetSiteID, SetSiteID)
and this
site_id = 1
collide?
On 11/6/05, Jan Eden <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I use the following construction to make sure the data attribute site_id is
> set only once for each object:
>
> def GetSiteID(self):
> retu
On Sat, 5 Nov 2005, Shi Mu wrote:
> It is very hard for me to understand why we need the following line? if
> __name__ == "__main__":
Hi Shi Mu,
It's tied to the concept of modules. Have you learned about modules yet?
Python programs can be split into several modular pieces, and these
"modu
It is very hard for me to understand why we need the following line?
if __name__ == "__main__":
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Note: CC'ing tutor list to make reply visible to all.
> i had to close PYTHONWIN to get out of the program.
Aha!
There are problems in running Tkinter inside both IDLE and Pythonwin.
Basically both programs try to trap abnormal termination - which includes
the GUI close messages...
IMHO, to tes
At 01:57 PM 11/5/2005, Shi Mu wrote:
>when I clicked 'quit' button,
>there is no response. I want to close the interface by clicking 'x',
>the interface could not be closed.
>i had to close PYTHONWIN to get out of the program.
That is a known problem running Tkinter stuff under PythonWin. Others m
when I clicked 'quit' button,
there is no response. I want to close the interface by clicking 'x',
the interface could not be closed.
i had to close PYTHONWIN to get out of the program.
On 11/5/05, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > Why the button of the following code does not work? Thank
Hi,
I use the following construction to make sure the data attribute site_id is set
only once for each object:
def GetSiteID(self):
return self._site_id
def SetSiteID(self, value):
if not (hasattr(self, '_site_id') and self._site_id): self._site_id = value
site_id = property(GetSit
> Why the button of the following code does not work? Thanks!
The program works perfectly for me.
Which button do you think is not working?
If its the Hello one where do you expect to see the output?
print always prints to stdout so you need to look in the
console window not on the GUI.
But othe
> I'm in the process of chosing a technology for the implementation of a
> system that will have a Map builder wich will allow the users to draw a
> map
> using several construction pieces. This map will then be used in the core
> of the program where some pathfinding will be done - and then some
10 matches
Mail list logo