Hi, Chris
Thanks for the suggestion.
For my script, I want to download a picture from internet & show it in a
window, that's why I use wxPython.
Well, I think I may can avoid sleep in wxPython in 2 ways:
1. Use web.py, let python do backend work, let browser show me everything. As
you suggeste
Hi, Chris & Marko
Thanks for your reply.
I find the reason why my time.sleep take longer time.
In my script, I use wxPython to build up my GUI, and I open another thread to
do network communications.
It turned out that if you create a wx.Frame & make it show up, then your
time.sleep may sleep l
Hi.
I'm writing some scripts with python, and I found sometimes, when I try to use
time.sleep(1) to sleep 1 sec, it would actually sleep for 9 secs or even longer.
>From python document, I saw this:
time.sleep(secs)
Also, the suspension time may be longer than requested by an arbitrary amo
On Feb 8, 2:41 am, "Littlefield, Tyler" wrote:
> Hello all:
> I have a couple questions. First, is there a way to know if connectTCP
> failed? I am writing a client with Twisted and would like to be able to
> notify the user if they couldn't connect.
> Second, I set the protocol on my factory afte
On Feb 8, 2:41 am, "Littlefield, Tyler" wrote:
> Hello all:
> I have a couple questions. First, is there a way to know if connectTCP
> failed? I am writing a client with Twisted and would like to be able to
> notify the user if they couldn't connect.
> Second, I set the protocol on my factory afte
As the title.
Or is there other module that can handle this task?
Many thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
I'm using select.poll to do I/O polling. polling is placed in a
independent thread
from select import poll
_poller = poll()
def poll(timeout):
l = _poller.poll(timeout)
return l
In my code, in some context, the timeout value will be high ( like 1
hour ), but there is no I/O in _p
Hi, I'm writing a test tool to simulate Web browser. Is there anyway
to run JavaScript in python? Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 10, 12:06 am, crow wrote:
> On Jul 10, 12:04 am, Steven D'Aprano
>
>
>
>
> cybersource.com.au> wrote:
> > On Fri, 09 Jul 2010 08:58:35 -0700, crow wrote:
> > > So, my questions: why there is no setdefaultencoding in sys module? if I
> > &
On Jul 10, 12:04 am, Steven D'Aprano wrote:
> On Fri, 09 Jul 2010 08:58:35 -0700, crow wrote:
> > So, my questions: why there is no setdefaultencoding in sys module? if I
> > want to change system's default encoding, what should I do?
>
> I think the answer is:
>
Hi, everyone
I'm a new hand at python.
I tried to set system default encoding by using
"import sys; sys.setdefaultencoding('utf-f')",
but I got error message:
>>> sys.setdefaultencoding('utf-8')
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has n
> Also, I'm not sure I like your abuse of the + operator to modify the
> object in place and return a flag. It is an API not shared by (as far as
> I can see) any other data type in Python.
I agree it couuld be more consisten with other object apis,
I also think that if every api has to conform t
On Dec 13, 11:37 am, mattia wrote:
> How can I insert non-duplicate data in a list? I mean, is there a
> particular option in the creation of a list that permit me not to use
> something like:
> def append_unique(l, val):
> if val not in l:
> l.append(val)
>
> Thanks,
> Mattia
You cou
> It's not implemented in the compiler. There's a place in the runtime
> for invoking a method where the object is inserted at the beginning
> of the parameter list. IIRC, that's done by wrapping the function
> object.
This is the source of Objects/methodobject.c it look like this is
where
self is
I'm looking for an explanation of how explicit self is implimented and
what features are only possible because of, or are greatly improved,
because of it. I've always liked explicit self and am looking for the
computer science behind it, so that I can explain the benefits that I
see.
I'm also inte
15 matches
Mail list logo