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.choic
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,
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
explici
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 t
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
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 conve
>> 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 pro
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 sound,
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
_
I found this on an artima forum:http://www.artima.com/forums/flat.jsp?forum=181&thread=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 syst
hello list
is there in python an independent from the system way to
obtain the IP
i am playng around
import sys
import os
ipconfname={'nt':'ipconfig', 'posix':'ifconfig'}
ipstr = os.popen(ipconfname[os.name] ).read()
#print ipstr
but i found out that answer depends on os.name ...
in this case
Hi all,
It seems I can't get rid of my continuous issues i18n with Python :(
I've been through:
http://docs.python.org/lib/module-email.Header.html
and
http://www.reportlab.com/i18n/python_unicode_tutorial.html
to no avail.
Basically, I'm receiving and processing mail that comes with content (fr
12 matches
Mail list logo