I found this on an artima forum:http://www.artima.com/forums/flat.jsp?forum=181thread=113874
This worked on my machine (win xp):socket.getaddrinfo(socket.gethostname(), None)[0][4][0]On 8/10/06, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:hello list
is there in python an independent from the system
On Thu, Aug 10, 2006 at 04:47:43PM +0300, [EMAIL PROTECTED] wrote:
is there in python an independent from the system way to obtain the IP
import socket
hostname = socket.gethostname()
ip = socket.gethostbyname(hostname)
print ip
192.168.1.10
___
Hi all,I am developing a GUI which has a notebook with multiple tabs. The tabs are formed by adding pages to the notebook.I have a check menu to select/deselect the tabs(pages) i want. On checking on an item it will must show the respective tab and unchecking should hide it.
Simple as it may
The other way would be to add each folder to
your PYTHONPATH
It works for me now:
import sys
import os.path
sys.path.append(os.path.join(sys.path[0] ,translate))
That isn't using PYTHONPATH its updaing sys.path
which is slightly different.. This way you need to do that
for every program
Hi Jorge,
On Thu, 10 Aug 2006 13:32:10 +0100
Jorge De Castro [EMAIL PROTECTED] wrote:
(...)
Using unicode(body, 'latin-1').encode('utf-8') doesn't work either. Besides,
am I the only one to feel that if I want to encode something in UTF-8 it
doesn't feel intuitive to have to convert to
On 11/08/06, Amresh Kulkarni [EMAIL PROTECTED] wrote:
I am developing a GUI which has a notebook with multiple tabs. The tabs are
formed by adding pages to the notebook.
I have a check menu to select/deselect the tabs(pages) i want. On checking
on an item it will must show the respective tab
how do u find out original encodingthanksMichael Lange [EMAIL PROTECTED] wrote: Hi Jorge,On Thu, 10 Aug 2006 13:32:10 +0100"Jorge De Castro" <[EMAIL PROTECTED]> wrote:(...) Using unicode(body, 'latin-1').encode('utf-8') doesn't work either. Besides, am I the only one to feel that if I want to
On Thu, 10 Aug 2006, anil maran wrote:
how do u find out original encoding
Read:
http://www.joelonsoftware.com/articles/Unicode.html
In short: there's no good, reliable way to guess the encoding. But there
should be no need to guess: a proper document will have the encoding
Here is my Rock,Paper,Scissors script:
#!/usr/bin/python
import random
random.seed()
class Human:
def __init__(self):
self.points = 0
self.choice =
def plays(self):
self.choice = raw_input(Pick (R)ock, (P)aper,
Hi Chris,
On 11/08/06, Christopher Spears [EMAIL PROTECTED] wrote:
def plays(self):
self.choice = raw_input(Pick (R)ock, (P)aper, or
(S)cissors! )
if self.choice == 'r':
self.choice = 'rocks'
elif self.choice == 'p':
10 matches
Mail list logo