I just finished reading a chapter in "Python Programming on Win32" and tried
out the pythonwin scribble application. I'm not sure if I got it right
because I could not open a new document. I tried to download the source code
as referenced in the chm file but it is corrupted. I cut and pasted fro
Hi All
I've encountered a weird issue when migrating a web server to Python 3
- the browser would wait forever without showing a page, displaying
"Transferring data" in the status bar. I tracked it down to a
reference cycle in my BaseHTTPRequestHandler descendant - one of the
attributes stored a d
I found this but have not tried it yet:
http://aspn.activestate.com/ASPN/Mail/Message/ActivePython/1775844
How different is ActiveState Python from CPython? Can they both be used with
pywin32 and the other packages?
Thanks!
Siegfried
--
http://mail.python.org/mailman/listinfo/python-list
Can someone point me to an example of a little program that emits non-ascii
Unicode characters (Russian or Chinese perhaps)? The unicode
Russian/Cyrillic alphabet starts at 0x410. Is this possible to do in a
console mode program? If not, I guess I would want to use pywin32 to create
a window an
On Sep 13, 5:34 pm, [EMAIL PROTECTED] wrote:
> >> I don't want to handle writing of a PID file because it is too
> >> Unix/Linux specific way to do this, and I need to keep the code to be
> >> cross-platform.
> >>
> >> I think the better way to achieve this is to use some proces
Gabriel Genellina wrote:
En Fri, 12 Sep 2008 17:02:44 -0300, Blubaugh, David A.
<[EMAIL PROTECTED]> escribió:
I have been trying to locate as to where Numpy 1.2 can be downloaded. I
will need this update. The only version available at the Numpy website
for download is only 1.1.1 not the requ
>> I don't want to handle writing of a PID file because it is too
>> Unix/Linux specific way to do this, and I need to keep the code to be
>> cross-platform.
>>
>> I think the better way to achieve this is to use some process
>> control, but I'm a neebie and I don't see ho
Blubaugh, David A. wrote:
To All,
I have been trying to locate as to where Numpy 1.2 can be downloaded. I
will need this update. The only version available at the Numpy website
for download is only 1.1.1 not the required 1.2 that I definitely need
at this time.
For the last time, Jarrod Mil
In article <[EMAIL PROTECTED]>,
Marco Bizzarri <[EMAIL PROTECTED]> wrote:
>On Sat, Sep 13, 2008 at 4:09 PM, Al Dykes <[EMAIL PROTECTED]> wrote:
>>
>> Can some post a Python code fragment that will to make a PC with Skpye
>> installed to make a Skype call, given a valid phone # string.
>>
>> I'm not
On Sep 12, 7:08 am, Strato <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I want to write some kind of test to check at startup if another
> instance of my script is already running.
>
> I don't want to handle writing of a PID file because it is too
> Unix/Linux specific way to do this, and I need to k
Terry Reedy <[EMAIL PROTECTED]> writes:
>> Of course, sum() is even faster than reduce:
>>
> Timer('sum(xrange(1))').repeat(number=1)
>> [9.814924955368042, 8.7169640064239502, 9.5062401294708252]
>
> 'Of course', because the irreducible difference between
> reduce(add.seq) and sum(seq
Larry Bates wrote:
I also have a personal dislike for early returns because I've found it
makes it harder insert execution trace logging into the code.
in a language that makes it trivial to wrap arbitrary callables in
tracing wrappers?
--
http://mail.python.org/mailman/listinfo/python-li
Owen Zhang wrote:
> I am trying to build lxml package in SunOS 5.10. I got the following
> errors.
Could you report this on the lxml mailing list?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
Sorry but I respectfully disagree that this is "abuse" of the __call__
method.
As long as we respectfully agree to disagree...
!-)
Anyway, I don't think we have enough background to seriously agree or
disagree on what would make
Larry Bates a écrit :
Bruno Desthuilliers wrote:
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
Sorry - after a more car
Bruno Desthuilliers wrote:
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
Sorry - after a more careful re-read of other p
Steven D'Aprano wrote:
If you want to see reduce really shine, time it with a C-based function
rather than one written in pure Python:
Timer('reduce(add, xrange(1))',
... 'from operator import add').repeat(number=1)
[19.724750995635986, 19.410486936569214, 19.614511013031006]
Timer
Marco Bizzarri wrote:
On Fri, Sep 12, 2008 at 4:09 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
You should also consider using PEP8 style naming.
Diez
class FolderInUse:
def __init__(self, core):
self.core = core
def true_for(self, archivefolder):
return any(
In article <[EMAIL PROTECTED]>,
nntpman68 <[EMAIL PROTECTED]> wrote:
>Hi,
>
>Just some thoughts / now answer :-(
>
>The solution might vary on the platform / OS.
>
>Would it be acceptable for you to
>control for example firefox from python and firefox would control skype
>via the skype plugin. (
Bruno Desthuilliers a écrit :
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
Sorry - after a more careful re-read of other posts in the thread, it
migh
En Fri, 12 Sep 2008 17:02:44 -0300, Blubaugh, David A.
<[EMAIL PROTECTED]> escribió:
I have been trying to locate as to where Numpy 1.2 can be downloaded. I
will need this update. The only version available at the Numpy website
for download is only 1.1.1 not the required 1.2 that I definitel
Marco Bizzarri a écrit :
On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Marco Bizzarri wrote:
class FolderInUse:
def true_for(self, archivefolder):
return any([instance.forbid_to_close(archivefolder) for instance in
self.core.active_outgoing_reg
Larry Bates a écrit :
(snip)
IMHO it reads better if you use the __call__ method of the class to
return the value
IMHO, it makes no sense at all to abuse the __call__ magic method here.
and rewrite it as a regular loop for clarity.
Sometimes the simplest way is the easiest to read.
class
On Sat, 13 Sep 2008 01:06:22 -0700, cnb wrote:
> This must be because of implementation right? Shouldn't reduce be faster
> since it iterates once over the list? doesnt sum first construct the
> list then sum it?
What makes you think that?
Given the speed of sum(), it sure doesn't look like it's
On Sep 12, 8:08 pm, [EMAIL PROTECTED] wrote:
> First off, I'm a python n00b, so feel free to comment on anything if
> I'm doing it "the wrong way." I'm building a discrete event simulation
> tool. I wanted to use coroutines. However, I want to know if there's
You could "look in the back of the boo
On Sep 13, 10:06 am, cnb <[EMAIL PROTECTED]> wrote:
> This must be because of implementation right? Shouldn't reduce be
> faster since it iterates once over the list?
> doesnt sum first construct the list then sum it?
No, sum also iterates the sequence just once and doesn't create a
list. It is pr
Marco Bizzarri wrote:
On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Marco Bizzarri wrote:
class FolderInUse:
def true_for(self, archivefolder):
return any([instance.forbid_to_close(archivefolder) for instance in
self.core.active_outgoing_regist
On Sat, Sep 13, 2008 at 4:09 PM, Al Dykes <[EMAIL PROTECTED]> wrote:
>
> Can some post a Python code fragment that will to make a PC with Skpye
> installed to make a Skype call, given a valid phone # string.
>
> I'm not asking for code that handles the audio once the connection is
> made.
>
>
Mayb
Hi,
Just some thoughts / now answer :-(
The solution might vary on the platform / OS.
Would it be acceptable for you to
control for example firefox from python and firefox would control skype
via the skype plugin. (should exist for multiple platforms)
Do you search a native python solution
Strato wrote:
Hi folks,
I want to write some kind of test to check at startup if another
instance of my script is already running.
I don't want to handle writing of a PID file because it is too
Unix/Linux specific way to do this, and I need to keep the code to be
cross-platform.
I think t
Strato wrote:
Hi folks,
I want to write some kind of test to check at startup if another
instance of my script is already running.
I don't want to handle writing of a PID file because it is too
Unix/Linux specific way to do this, and I need to keep the code to be
cross-platform.
I think t
On Sat, Sep 13, 2008 at 4:11 PM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Marco Bizzarri wrote:
>
>> class FolderInUse:
>
>>
>>
>>def true_for(self, archivefolder):
>>return any([instance.forbid_to_close(archivefolder) for instance in
>>self.core.active_outgoing_registrati
On 13 Sep, 08:38, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> His recent posts have generally been quite different from those of some
> months ago. Even he recognizes that they were somewhat weird and has
> tried to do better.
And I think we should at least go along with people if they're willing
Marco Bizzarri wrote:
class FolderInUse:
>
def true_for(self, archivefolder):
return any([instance.forbid_to_close(archivefolder) for instance in
self.core.active_outgoing_registration_instances()])
Is this any better? The true_for name does not satisfy me a lot...
w
Can some post a Python code fragment that will to make a PC with Skpye
installed to make a Skype call, given a valid phone # string.
I'm not asking for code that handles the audio once the connection is
made.
--
Al Dykes
News is something someone wants to suppress, everything else is adve
Stef> Something like a multi-virtual machine on a web server, that you
Stef> launch in the night, and in the morning you would get a full
Stef> report of all problems on the specific OSs (probably someone is
Stef> going to say that this is impossible, but fortunately I'm not
St
David> As someone who writes and releases Python modules for the community,
I
David> find it difficult to have a decent level of confidence in the
efficacy
David> of my code on platforms and Python versions other than those that I
David> own or use regularly. My documentation sta
On Fri, Sep 12, 2008 at 4:09 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> You should also consider using PEP8 style naming.
>
>
> Diez
class FolderInUse:
def __init__(self, core):
self.core = core
def true_for(self, archivefolder):
return any([instance.forbid_to_
ville wrote:
That's tk-specific, right? I'm looking for a snippet that
- Would not be tied to tk
upstream, you said:
"My actual use case is to keep a tkinter application responsive"
--
http://mail.python.org/mailman/listinfo/python-list
Sean DiZazzo <[EMAIL PROTECTED]> writes:
>> My eventual code would be something like:
>>
>> launch_process_in_thread('bzr pull')
>>
>> while not is_done:
>> pyos_inputhook()
>> time.sleep(0.1)
>>
>> print "Done!"
>
> I'm still recovering from a hangover, so don't quote me. I think you
> want
David Moss wrote:
Hopefully a service like this already exists and I just haven't found
it yet. If not it could be an idea for some kind soul(s) to pick up
and run with ;-)
As someone who writes and releases Python modules for the community, I
find it difficult to have a decent level of confiden
Why don't you use import and __import__() ? - They seem designed for such an
application.
I mean, I am not against vicious hacks for the fun of them, but not if they
serve the illusion that what they do can't (easily) be achieved other ways.
Cheers, BB
Peter Waller wrote:
Dear Pythoners,
I
Hopefully a service like this already exists and I just haven't found
it yet. If not it could be an idea for some kind soul(s) to pick up
and run with ;-)
As someone who writes and releases Python modules for the community, I
find it difficult to have a decent level of confidence in the efficacy
o
Yeah right but i don't see something wrong in my server's code. Following is
my server's simple code
import SimpleXMLRPCServer
#server = ServerProxy("http://betty.userland.com";)
class AuthenticationFunctions:
def s(self):
print "something..."
server = SimpleXMLRPCServer.SimpleXM
Usman Ajmal wrote:
Problem is that when i start client (while the server is already
running), i get an error i.e.
Error 500 Internal Server Error
that's a server error, not a client error. check the server logs (e.g.
error.log or similar).
--
http://mail.python.org/mailman/listinfo/pyth
Blubaugh, David A. wrote:
To All,
Has any one out there ever worked with the Rpyc, which is a remote
process call for python?
Yes
David Blubaugh
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named abo
Problem is that when i start client (while the server is already running), i
get an error i.e.
Error 500 Internal Server Error
On Sat, Sep 13, 2008 at 3:58 PM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:
> Usman Ajmal wrote:
>
> Where exactly should i call ServerProxy? Following is the code from my
On Sep 13, 1:35 pm, Peter Waller <[EMAIL PROTECTED]> wrote:
> This makes me want to ask: is it difficult to modify a function's
> code?
No, it is not difficult. Look at the byteplay module:
it makes possible all kinds of dirty hacks.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 12, 2:30 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
>
> The answer to why this doesn't work lies in the disassembly of that
> function:
This makes me want to ask: is it difficult to modify a function's
code? Even if it weren't possible whilst the function was executing
(because then I wou
To All,
I have been trying to locate as to where Numpy 1.2 can be downloaded. I
will need this update. The only version available at the Numpy website
for download is only 1.1.1 not the required 1.2 that I definitely need
at this time.
David Blubaugh
This e-mail transmission contains info
To All,
Has anyone out there worked much with Rpyc?
Thanks,
David
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you
receive
this e-mail in error, please do not read, copy or dissemina
To All,
Has any one out there ever worked with the Rpyc, which is a remote
process call for python?
David Blubaugh
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you
receive
this e-mail in
> doesnt sum first construct the list then sum it?
> def com(lst):
> return sum(x for x in lst)
You construct a generator over an existing list in your code.
Try sum([x for x in lst]) to see the effect of additional list
construction. And while you're at it, try the simple sum(lst).
Cheers,
I wrote:
Tino Wildenhain wrote:
[...]
sum(['a','b'],'')
: sum() can't sum strings [use
''.join(seq) instead]
Yes which is a bit bad anyway. I don't think hard wiring it is such a
nice idea. You know, walks like a duck, smells like a duck...
If it makes sense to handle things differently
Usman Ajmal wrote:
Where exactly should i call ServerProxy? Following is the code from my
client.py
ServerProxy is the preferred name. Server is an old alias for the same
class.
t = SecureTransport()
t.set_authorization(ustring, text_ucert)
server = xmlrpclib.Server('http://l
On Sep 13, 4:25 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Sep 13, 1:00 am, fishfin <[EMAIL PROTECTED]> wrote:
>
> > @ Carl: Yes, I think your right now that I look at it (or at least all
> > except for the last two lines need to be indented). I'm still not sure
> > how to send the stuff to the
Where exactly should i call ServerProxy? Following is the code from my
client.py
t = SecureTransport()
t.set_authorization(ustring, text_ucert)
server = xmlrpclib.Server('http://localhost:8000/',transport=t)
print server.s()
Note: Full code for client is here at http://privatepast
Tino Wildenhain wrote:
Hi,
Luis Zarrabeitia wrote:
Quoting Laszlo Nagy <[EMAIL PROTECTED]>:
...
Even better:
help(sum) shows
===
sum(...)
sum(sequence, start=0) -> value
Returns the sum of a sequence of numbers (NOT strings) plus
the value
of parameter 'start'. When the
Hi,
[EMAIL PROTECTED] wrote:
On Sep 10, 7:01 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:
I am using windows and for reason it wont let me use pexpect even tho
I have CYGWIN installed
I get the following error
Traceback (most recent call last):
File "new.py", line 1, in
import ssh_se
whohhhee ... *baru bangun ... :-))
selamat bersiap-siap untuk ngabuburit ya ...
saya lagi siap-siap mau sepedaan.
ada yang mau ikut???
2008/9/12 Mantri SJN <[EMAIL PROTECTED]>
> Iya om sama sama
>
> Salam dari Gunung
>
> --
> *From*: "Rachmad Padma" <[EMAIL PR
byron wrote:
Being that each function is an object, a name assignment to
(tmp1,tmp2) doesn't actually evaluate or run the function itself until
the name is called..
the above would be true if the code had been
tmp1, tmp2 = f1, f2
but it isn't. look again.
--
http://mail.python.org/mai
Usman Ajmal wrote:
Please explain the arguments of send_request. What exactly are the
connection, handler and request_body? It will be really helpful if you
give an example of how do i call send_request
you don't call send_request. you should pass the SecureTransport
instance as an argument
fishfin wrote:
@ Carl: Yes, I think your right now that I look at it (or at least all
except for the last two lines need to be indented).
> I'm still not sure
how to send the stuff to the web browser though.
what do you think is the cfile.write() doing?
As a hint, beside having a look at r
On Sep 13, 1:00 am, fishfin <[EMAIL PROTECTED]> wrote:
> @ Carl: Yes, I think your right now that I look at it (or at least all
> except for the last two lines need to be indented). I'm still not sure
> how to send the stuff to the web browser though. Thanks for pointing
> it out!
Try reading in t
On Sat, 13 Sep 2008 01:06:22 -0700, cnb wrote:
> This must be because of implementation right? Shouldn't reduce be faster
> since it iterates once over the list? doesnt sum first construct the
> list then sum it?
No it doesn't. Why should it?
> also, using range instead of xrange doesnt seem to
On Sep 13, 2:08 am, [EMAIL PROTECTED] wrote:
> First off, I'm a python n00b, so feel free to comment on anything if
> I'm doing it "the wrong way." I'm building a discrete event simulation
> tool. I wanted to use coroutines. However, I want to know if there's
> any way to hide a yield statement.
>
This must be because of implementation right? Shouldn't reduce be
faster since it iterates once over the list?
doesnt sum first construct the list then sum it?
---
>>> RESTART
>>>
reduce with named function: 37
@ Carl: Yes, I think your right now that I look at it (or at least all
except for the last two lines need to be indented). I'm still not sure
how to send the stuff to the web browser though. Thanks for pointing
it out!
@ Diez: I'll start googling those right away.
Carl Banks wrote:
> On Sep 13, 1
On Fri, Sep 12, 2008 at 6:07 PM, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Marco Bizzarri a écrit :
> (snip)
>>
>> I'm afraid this have another problem for me...
>>
>>
>> [EMAIL PROTECTED]:/var/local/zope28/porting/Products/PAFlow$ python2.3
>> Python 2.3.5 (#2, Oct 18 2006, 23:04:45)
>> [GC
On Sep 13, 12:15 am, fishfin <[EMAIL PROTECTED]> wrote:
> I was working through a tutorial about how to write a server using
> python (the url is bellow). I am sure that the server is working to
> some degree because when the server is running localhost:8080 just
> keeps trying to load until it tim
Please explain the arguments of send_request. What exactly are the
connection, handler and request_body? It will be really helpful if you give
an example of how do i call send_request
On Thu, Sep 11, 2008 at 7:18 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:
> Usman Ajmal wrote:
>
> And i also fou
fishfin schrieb:
I was working through a tutorial about how to write a server using
python (the url is bellow). I am sure that the server is working to
some degree because when the server is running localhost:8080 just
keeps trying to load until it times out. I would like to know how to
send info
I was working through a tutorial about how to write a server using
python (the url is bellow). I am sure that the server is working to
some degree because when the server is running localhost:8080 just
keeps trying to load until it times out. I would like to know how to
send information through the
73 matches
Mail list logo