Tahoe-LAFS on Python 3 - Call for Porters

2019-09-24 Thread Jean-Paul Calderone
Hello Pythonistas, Earlier this year a number of Tahoe-LAFS community members began an effort to port Tahoe-LAFS from Python 2 to Python 3. Around five people are currently involved in a part-time capacity. We wish to accelerate the effort to ensure a Py

[ANN] txkube 0.3.0

2018-08-08 Thread Jean-Paul Calderone
thon.org/pypi> You can contribute to its development on GitHub <https://github.com/LeastAuthority/txkube>. Thanks to Least Authority TFA GmbH <https://leastauthority.com/> for sponsoring this development and to Craig Rodrigues for his efforts on Python 3 porting work. Jean-Paul

[ANN] txaws 0.5.0

2017-12-27 Thread Jean-Paul Calderone
Hello all, I'm pleased to announce the release of txAWS 0.5.0. txAWS is a library for interacting with Amazon Web Services (AWS) using Twisted. You can download the release from PyPI . Since the last release, the following enhancements have been made: Featur

[ANN] kubetop 17.4.17.1

2017-04-17 Thread Jean-Paul Calderone
yPI <https://pypi.python.org/pypi/kubetop> and GitHub <https://github.com/LeastAuthority/kubetop>. Install it in the usual way: pip install kubetop Thanks to Least Authority Enterprises <https://leastauthority.com/> for sponsoring this development. Jean-Paul Calderone http

[ANN] txkube 0.1.0

2017-04-10 Thread Jean-Paul Calderone
://pypi.python.org/pypi>. You can contribute to its development on GitHub <https://github.com/LeastAuthority/txkube>. Thanks to Least Authority Enterprises <https://leastauthority.com/> for sponsoring this development. Jean-Paul Calderone http://as.ynchrono.us/ -- https://mail.python.org/mailman/listinfo/python-list

[ANN] txAWS 0.3.0

2017-04-10 Thread Jean-Paul Calderone
GitHub for issues and source control <https://github.com/twisted/txaws> (https://github.com/twisted/txaws). Since the last release, the following enhancements have been made: - Jean-Paul Calderone added basic Route53 support. - Mark Williams add Auth v4, now used by the S3 an

Announcing txAWS 0.2.3.1

2017-01-09 Thread Jean-Paul Calderone
I've just release txAWS 0.2.3.1. txAWS is a library for interacting with Amazon Web Services (AWS) using Twisted. AWSServiceEndpoint's ssl_hostname_verification's parameter now defaults to True instead of False. This affects all txAWS APIs which issue requests to AWS endpoints. For any applicat

Re: Async IO Server with Blocking DB

2012-04-04 Thread Jean-Paul Calderone
On Apr 3, 6:13 pm, looking for wrote: > Hi > > We are thinking about building a webservice server and considering > python event-driven servers i.e. Gevent/Tornado/ Twisted or some > combination thereof etc. > > We are having doubts about the db io part. Even with connection > pooling and cache, t

Re: Howto Deferred

2011-07-14 Thread Jean-Paul Calderone
On Jul 14, 3:07 am, marco wrote: > Hello gals and guys, > > I'm an experienced Python user and I'd like to begin playing with > Twisted. > I started RTFM the tutorial advised on the official site and I found it > really useful and well done. > > Now I'd like to practice a bit by coding a little pr

Re: Secure ssl connection with wrap_socket

2011-07-06 Thread Jean-Paul Calderone
On Jul 6, 4:44 am, AndDM wrote: > On Jul 5, 4:08 pm, Jean-Paul Calderone > wrote: > > > > > On Jul 5, 4:52 am, Andrea Di Mario wrote: > > > > Hi, I'm a new python user and I'm writing a small web service with ssl. > > > I want us

Re: Secure ssl connection with wrap_socket

2011-07-05 Thread Jean-Paul Calderone
On Jul 5, 4:52 am, Andrea Di Mario wrote: > Hi, I'm a new python user and I'm writing a small web service with ssl. > I want use a self-signed certificate like in > wiki:http://docs.python.org/dev/library/ssl.html#certificates > I've used wrap_socket, but if i try to use > cert_reqs=ssl.CERT_REQU

Re: GIL in alternative implementations

2011-06-07 Thread Jean-Paul Calderone
On Jun 7, 12:03 am, "Gabriel Genellina" wrote: > En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano   > escribi : > > > > > > > > > > > On Sat, 28 May 2011 09:39:08 -0700, John Nagle wrote: > > >> Python allows patching code while the code is executing. > > > Can you give an example of what you

Re: How good is security via hashing

2011-06-07 Thread Jean-Paul Calderone
On Jun 7, 7:35 am, Robin Becker wrote: > On 07/06/2011 11:26, Nitin Pawar wrote:> Have you tried using UUID module? > > > Its pretty handy and comes with base64 encoding function which gives > > extremely high quality randon strings > > > ref: > >http://stackoverflow.com/questions/621649/python-an

Re: How good is security via hashing

2011-06-07 Thread Jean-Paul Calderone
On Jun 7, 6:18 am, Robin Becker wrote: > A python web process is producing files that are given randomized names of > the form > > hh-MMDDhhmmss-.pdf > > where rrr.. is a 128bit random number (encoded as base62). The intent of the > random part is to prevent recipients of one file

Re: Sanitizing filename strings across platforms

2011-05-31 Thread Jean-Paul Calderone
On May 31, 10:17 pm, Tim Chase wrote: > Scenario: a file-name from potentially untrusted sources may have > odd filenames that need to be sanitized for the underlying OS. > On *nix, this generally just means "don't use '/' or \x00 in your > string", while on Win32, there are a host of verboten cha

Re: connect SIGINT to custom interrupt handler

2011-05-18 Thread Jean-Paul Calderone
On May 18, 9:28 am, Christoph Scheingraber wrote: > On 2011-05-15, Miki Tebeka wrote: > > > Why not just catch KeyboardInterrupt? > > Would it be possible to continue my program as nothing had happened in > that case (like I did before, setting a flag to tell main() to finish the > running data d

Re: sockets: bind to external interface

2011-04-25 Thread Jean-Paul Calderone
On Apr 25, 3:49 pm, Chris Angelico wrote: > On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun > wrote: > > > Has anyone found a simple solution that can be administered without > > root privileges?  I mean simpler than passing the ip address > > manually :-) > > You can run 'ifconfig' withou

Re: When is PEP necessary?

2011-04-23 Thread Jean-Paul Calderone
On Apr 23, 5:09 pm, Daniel Kluev wrote: > On Sat, Apr 23, 2011 at 11:16 PM, Disc Magnet wrote: > > Is PEP necessary to add a new package to the standard library? > > *skip* > > Don't forget that Python is not limited to CPython. Other > implementations need these PEPs to provide compliant package

Re: Why doesn't this asyncore.dispatcher.handle_read() get called?

2011-04-20 Thread Jean-Paul Calderone
On Apr 20, 12:25 pm, Dun Peal wrote: > Hi, > > I'm writing and testing an asyncore-based server. Unfortunately, it > doesn't seem to work. The code below is based on the official docs and > examples, and starts a listening and sending dispatcher, where the > sending dispatcher connects and sends a

Re: Pickling over a socket

2011-04-19 Thread Jean-Paul Calderone
On Apr 19, 6:27 pm, Roger Alexander wrote: > Thanks everybody, got it working. > >  I appreciate the help! > > Roger. It's too bad none of the other respondents pointed out to you that you _shouldn't do this_! Pickle is not suitable for use over the network like this. Your server accepts arbitr

Re: Equivalent code to the bool() built-in function

2011-04-19 Thread Jean-Paul Calderone
On Apr 19, 10:23 am, Grant Edwards wrote: > On Tue, Apr 19, 2011 at 7:09 AM, Christian Heimes wrote: > > Am 18.04.2011 21:58, schrieb John Nagle: > >> ?? ?? This is typical for languages which backed into a "bool" type, > >> rather than having one designed in. ??The usual result is a boolean > >>

Re: Questions about GIL and web services from a n00b

2011-04-16 Thread Jean-Paul Calderone
On Apr 16, 10:44 am, a...@pythoncraft.com (Aahz) wrote: > In article , > Raymond Hettinger   wrote: > > > > >Threading is really only an answer if you need to share data between > >threads, if you only have limited scaling needs, and are I/O bound > >rather than CPU bound > > Threads are also usefu

Re: Checking against NULL will be eliminated?

2011-03-03 Thread Jean-Paul Calderone
On Mar 3, 8:16 am, Neil Cerutti wrote: > On 2011-03-03, Tom Zych wrote: > > > Carl Banks wrote: > >> Perl works deterministically and reliably.  In fact, pretty much every > >> language works deterministically and reliably.  Total non-argument. > > > Well, yes. I think the real issue is, how many

Re: interrupted system call w/ Queue.get

2011-02-18 Thread Jean-Paul Calderone
On Feb 17, 8:46 pm, Philip Winston wrote: > We have a multiprocess Python program that uses Queue to communicate > between processes.  Recently we've seen some errors while blocked > waiting on Queue.get: > > IOError: [Errno 4] Interrupted system call > > What causes the exception?  Is it necessar

Re: How to handle sockets - easily?

2011-02-16 Thread Jean-Paul Calderone
On Feb 16, 1:59 pm, William Ahern wrote: > Bubba wrote: > > > > > > > > > > > > > import asyncore > > import socket > > import string > > import MySQLdb > > import sys > > >     def __init__(self, host, port): > >         asyncore.dispatcher.__init__(self) > >         self.create_socket(socket.

Re: Shared memory python between two separate shell-launched processes

2011-02-11 Thread Jean-Paul Calderone
On Feb 11, 5:52 am, "Charles Fox (Sheffield)" wrote: > On Feb 10, 6:22 pm, Jean-Paul Calderone > wrote: > > > > > > > > > > > On Feb 10, 12:21 pm, "Charles Fox (Sheffield)" > > wrote: > > > > On Feb 10, 3:43 pm,

Re: Shared memory python between two separate shell-launched processes

2011-02-10 Thread Jean-Paul Calderone
On Feb 10, 12:21 pm, "Charles Fox (Sheffield)" wrote: > On Feb 10, 3:43 pm, Jean-Paul Calderone > wrote: > > > > > > > > > > > On Feb 10, 9:30 am, "Charles Fox (Sheffield)" > > wrote: > > > > Hi guys, > > >

Re: Shared memory python between two separate shell-launched processes

2011-02-10 Thread Jean-Paul Calderone
On Feb 10, 9:30 am, "Charles Fox (Sheffield)" wrote: > Hi guys, > I'm working on debugging a large python simulation which begins by > preloading a huge cache of data.  I want to step through code on many > runs to do the debugging.   Problem is that it takes 20 seconds to > load the cache at each

Re: Idea for removing the GIL...

2011-02-08 Thread Jean-Paul Calderone
On Feb 8, 7:12 pm, Paul Rubin wrote: > But the refcount scheme is just an implementation hack > that gets rationalized way too much.  I hope PyPy abandons it. Done. :) Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Idea for removing the GIL...

2011-02-08 Thread Jean-Paul Calderone
On Feb 8, 7:34 am, Vishal wrote: > On Feb 8, 3:05 pm, Adam Tauno Williams wrote: > > > On Tue, 2011-02-08 at 01:39 -0800, Vishal wrote: > > > Is it possible that the Python process, creates copies of the > > > interpreter for each thread that is launched, and some how the thread > > > is bound to

Re: AF_UNIX socket not supported

2011-02-08 Thread Jean-Paul Calderone
On Feb 8, 7:30 am, gracemia wrote: > Hello ! > > I'm trying to develop with AF_UNIX socket type in python (2.5) but > python says that AF_UNIX is not supported > How can I do for work with AF_UNIX sockets? > > Thank you Where and when does Python say this to you? http://docs.python.org/library/s

Re: sending through non-default gateway

2011-02-06 Thread Jean-Paul Calderone
On Feb 6, 1:10 am, Nikola Skoric wrote: > Dana Sat, 5 Feb 2011 14:13:11 -0800, > Dan Stromberg kaze: > > > IIRC, this is an instance of what's called "source routing", and was > > largely shut off after network admins realized it was a security > > issue. > > > Of course, if you have root/adminis

Re: simplest way to create simple standalone wsgi server without import wsgi_lib.server

2011-02-01 Thread Jean-Paul Calderone
On Feb 1, 2:01 pm, Gelonida wrote: > On 02/01/2011 03:07 AM, Jean-Paul Calderone wrote: > > > > > On Jan 31, 5:28 pm, Gelonida wrote: > >> Hi, > > >> Normally I use following code snippet to quickly test a wsgi module > >> wit

Re: simplest way to create simple standalone wsgi server without import wsgi_lib.server

2011-01-31 Thread Jean-Paul Calderone
On Jan 31, 5:28 pm, Gelonida wrote: > Hi, > > Normally I use following code snippet to quickly test a wsgi module > without a web server. > > import wsgi_lib.server > wsgi_lib.server.run(application, port=port) > > However Now I'd like to test a small wsgi module on a rather old host > ( Python 2.

Re: Interrput a thread

2011-01-04 Thread Jean-Paul Calderone
On Jan 4, 12:31 pm, Fuzzyman wrote: > On Jan 4, 3:31 pm, Roy Smith wrote: > > > > > In article > > <2ebc11a5-1b45-4faa-97b9-c84f0db01...@k22g2000yqh.googlegroups.com>, > > >  Fuzzyman wrote: > > > It is unsafe to terminate an os level thread at an arbitrary point > > > because it may be executin

Re: Interrput a thread

2011-01-03 Thread Jean-Paul Calderone
On Jan 3, 6:17 pm, Adam Skutt wrote: > On Jan 3, 5:24 pm, Jean-Paul Calderone > wrote: > > > Of course.  The whole point here is not about threads vs processes. > > It's about shared memory concurrency vs non-shared memory > > concurrency.  You can implement

Re: Interrput a thread

2011-01-03 Thread Jean-Paul Calderone
On Jan 3, 4:17 pm, Adam Skutt wrote: > On Jan 3, 4:06 pm, Jean-Paul Calderone > wrote: > > > > > > Multiple processes, ok, but then regarding processes' interruption > > > there will be the same problems pointed out by using threads? > > > No.  

Re: Interrput a thread

2011-01-03 Thread Jean-Paul Calderone
On Jan 3, 3:22 pm, gervaz wrote: > On 3 Gen, 17:47, de...@web.de (Diez B. Roggisch) wrote: > > > > > gervaz writes: > > > On 31 Dic 2010, 23:25, Alice Bevan–McGregor > > > wrote: > > >> On 2010-12-31 10:28:26 -0800, John Nagle said: > > > >> > Even worse, sending control-C to a multi-thread prog

Re: Design Ideals Goals Python 3 - Forest for the trees

2010-12-26 Thread Jean-Paul Calderone
On Dec 26, 5:34 am, Alice Bevan–McGregor wrote: > > I've never really attempted to use JIT optimizers due to the fact that > all of my development and production environments are 64-bit, and I > haven't found one yet that supports 64-bit properly.  Relying on dead > projects, however, is an issue

Re: dns library

2010-12-09 Thread Jean-Paul Calderone
On Dec 9, 8:15 pm, Paulo da Silva wrote: > Hi. > > Is there a python library/module to handle both the server and client > sides of dns protocol? > > I have googled for it but I only found client side ones (at least from > the superficial readings I did). > > Thanks. Twisted Names is one such lib

Re: Is Unladen Swallow dead?

2010-11-18 Thread Jean-Paul Calderone
On Nov 18, 1:31 pm, John Nagle wrote: > On 11/18/2010 4:24 AM, BartC wrote: > > > > > > > > > > > "John Nagle" wrote in message > >news:4ce37e01$0$1666$742ec...@news.sonic.net... > >> On 11/16/2010 10:24 PM, swapnil wrote: > > >>> AFAIK, the merging plan was approved by Guido early this year. I >

Re: Twisted on Windows

2010-11-18 Thread Jean-Paul Calderone
On Nov 18, 9:58 am, Bryan Richardson wrote: > Hello All, > > First off I must say that Twisted is a very nice event driven I/O > package indeed. Thanks to all the developers who have contributed to > it, as it's made my life much easier. > > Now for my question... > > I have a custom server applic

Re: Getting references to objects without incrementing reference counters

2010-11-15 Thread Jean-Paul Calderone
On Nov 15, 10:42 am, de...@web.de (Diez B. Roggisch) wrote: > And circumvene a great deal of the dynamic features in python > (which you don't need for this usecase, but still are there) > Great as the features might be, when you don't need them, it's clearly a bad thing to have them drag you down

Re: Getting references to objects without incrementing reference counters

2010-11-14 Thread Jean-Paul Calderone
On Nov 14, 11:08 am, Artur Siekielski wrote: > Hi. > I'm using CPython 2.7 and Linux. In order to make parallel > computations on a large list of objects I want to use multiple > processes (by using multiprocessing module). In the first step I fill > the list with objects and then I fork() my work

Re: udp sockets with python

2010-11-11 Thread Jean-Paul Calderone
On Nov 10, 9:23 pm, Tim Roberts wrote: > Mag Gam wrote: > > >I am measuring the round trip time using tcpdump. The C version is > >giving me around 80 microseconds (average) and the python is giving me > >close to 300 microseconds (average). > > If you need the performance of a compiled language,

Re: udp sockets with python

2010-11-09 Thread Jean-Paul Calderone
On Nov 9, 5:20 am, Mag Gam wrote: > Hello, > > When measuring round trip time for the UDP echo client/server the C > version is much faster. I was wondering if there is anything I can do > to speed up. > > My current code for client looks like this > > sock=socket(AF_INET,SOCK_DGRAM) > for x i

Re: pyOpenSSL 0.11 released

2010-11-03 Thread Jean-Paul Calderone
On Nov 1, 6:43 pm, exar...@twistedmatrix.com wrote: > Hello all, > > I'm happy to announce the release of pyOpenSSL 0.11.  The primary change > from the last release is that Python 3.2 is now supported.  Python 2.4 > through Python 2.7 are still supported as well.  This release also fixes > a handf

Re: multiprocessing signal defect

2010-10-29 Thread Jean-Paul Calderone
On Oct 29, 10:08 am, Adam Tauno Williams wrote: > signal handler to do something smart in the case of a "-15" [for which > there isn't really a thread equivalent - can you sent a SystemV style > signal to an individual thread in a process?  I don't think so.] Yes. pthread_kill(P) Jean-Paul --

Re: Python becoming orphaned over ssh

2010-10-01 Thread Jean-Paul Calderone
On Oct 1, 10:35 am, Antoine Pitrou wrote: > On Thu, 30 Sep 2010 07:01:09 -0700 (PDT) > > Jean-Paul Calderone wrote: > > > But signal dispositions are inherited by child processes.  So you run > > ping from your short Python program, and it inherits SIGPIPE being > >

Re: Determine sockets in use by python

2010-09-30 Thread Jean-Paul Calderone
On Sep 29, 4:08 pm, Jim Mellander wrote: > > On Wed, Sep 29, 2010 at 11:05 AM, Gary Herron wrote: > > On 09/29/2010 09:50 AM, Jim Mellander wrote: > > >> Hi: > > >> I'm a newbie to python, although not to programming.  Briefly, I am > >> using a binding to an external library used for communicati

Re: Python becoming orphaned over ssh

2010-09-30 Thread Jean-Paul Calderone
On Sep 30, 9:08 am, David wrote: > On Wed, Sep 29, 2010 at 6:49 PM, John Nagle wrote: > >   Python's signal handling for multithread and multiprocess programs > > leaves something to be desired. > > Thanks for the confirmation (that I'm not missing something obvious). > > I've reported a bug for

Re: How to see intermediate fail results from unittest as tests are running?

2010-08-25 Thread Jean-Paul Calderone
On Aug 18, 9:20 pm, Margie Roginski wrote: > Hi, > > I am using unittest in a fairly basic way, where I have a single file > that simply defines a class that inherits from unittest.TestCase and > then within that class I have a bunch of methods that start with > "test".  Within that file, at the b

Re: simples setup for an wsgi https server in python

2010-07-10 Thread Jean-Paul Calderone
On Jul 10, 2:42 pm, Gelonida wrote: > Hi, > > I'd like to debug a small wsgi module. > > I run it either on an apache web server > > or locally via wsgiref.simple_server.make_server > and following code snippet: > > from wsgiref.simple_server import make_server > httpd = make_server('localhost',80

Re: bad certificate error

2009-07-28 Thread Jean-Paul Calderone
On Tue, 28 Jul 2009 03:35:55 -0700 (PDT), jakecjacobson wrote: [snip] "Invalid how? Self signed certificate? Domain mismatch? Expired certificate?" It is a server name mismatch. Python 2.4 is not capable of allowing you to customize this verification behavior. It is hard coded to let Open

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread Jean-Paul Calderone
On Mon, 27 Jul 2009 18:12:09 +0300, Dotan Cohen wrote: Creating binaries is not the same as creating /fast, efficient/ binaries.  Py2Exe bundles it all together, but does not make it any faster. How inefficient is py2exe. I was under the impression that it's really not that bad. py2exe doe

Re: If Scheme is so good why MIT drops it?

2009-07-22 Thread Jean-Paul Calderone
On Wed, 22 Jul 2009 12:35:52 -0700 (PDT), Carl Banks wrote: On Jul 22, 12:04 pm, Paul Rubin wrote: Carl Banks writes: > > Why is that such an advantage?  Green threads work fine if you just > > organize the i/o system to never block. > Because then I don't have

Re: proposal: add setresuid() system call to python

2009-07-17 Thread Jean-Paul Calderone
On Fri, 17 Jul 2009 15:01:41 -0500, travis+ml-pyt...@subspacefield.org wrote: Hello, [snip] I am suggesting that the setresuid function be added to python, perhaps in the OS module, because it has the clearest semantics for manipulating user ids. The reason why is best described in the followi

Re: Override a method but inherit the docstring

2009-07-16 Thread Jean-Paul Calderone
On Fri, 17 Jul 2009 11:01:49 +1000, Ben Finney wrote: Howdy all, The following is a common idiom:: class FooGonk(object): def frobnicate(self): """ Frobnicate this gonk. """ basic_implementation(self.wobble) class BarGonk(FooGonk): def frobnicate(sel

Re: Looking for a tool to checkfor python script backward compatibility

2009-07-12 Thread Jean-Paul Calderone
On Sun, 12 Jul 2009 09:47:32 +0200, Baptiste Lepilleur wrote: I'm looking for a tool that could be used in a pre-commit step to check that only features available in a "old" python version are used, say python 2.3 for example. Does any one know of one ? Run your test suite with whichever ver

Re: Matplotlib - an odd problem

2009-06-24 Thread Jean-Paul Calderone
On Wed, 24 Jun 2009 11:38:02 -0700 (PDT), koranthala wrote: Hi, I am using Matplotlib with Django to display charts on the web page. I am facing an odd problem in that, everytime I do a refresh on the web page, the image darkens - and the text becomes little unreadable. 5/6 refreshes later, the

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread Jean-Paul Calderone
On Sat, 20 Jun 2009 00:07:27 GMT, Lie Ryan wrote: [snip] Perhaps we should have more built-in/stdlib operations that can release GIL safely to release GIL by default? And perhaps some builtin/stdlib should receive an optional argument that instruct them to release GIL and by passing this argume

Re: Limit (max) connections SimpleHTTPServer

2009-06-15 Thread Jean-Paul Calderone
On Mon, 15 Jun 2009 12:14:28 -0700 (PDT), Daniel wrote: Hello, I would like to know if there is some way to limit the maximum number of connections to my SimpleHTTPServer. I have built a system that sends out work from one box to worker boxes and am using SimpleHTTPServer to send the work. T

Re: twisted server

2009-06-15 Thread Jean-Paul Calderone
On Mon, 15 Jun 2009 10:02:54 -0700 (PDT), Mikie wrote: I am setting up a simple twisted server looks like this [snip] I would like to have an image loaded in the html page, but when I use the port is inserted and the image will not load. Is there a way to load the image? This isn't a good

Re: waling a directory with very many files

2009-06-15 Thread Jean-Paul Calderone
On Mon, 15 Jun 2009 09:29:33 -0500, Nick Craig-Wood wrote: Hrvoje Niksic wrote: Nick Craig-Wood writes: > Here is a ctypes generator listdir for unix-like OSes. ctypes code scares me with its duplication of the contents of system headers. I understand its use as a proof of concept, or f

Re: matplotlib installation

2009-06-12 Thread Jean-Paul Calderone
On Fri, 12 Jun 2009 22:54:14 +0900, David Cournapeau wrote: On Fri, Jun 12, 2009 at 9:50 PM, Jean-Paul Calderone wrote: On Fri, 12 Jun 2009 11:33:36 GMT, Alan G Isaac wrote: On 6/12/2009 5:55 AM Virgil Stokes apparently wrote: Any suggestions on installing matplotlib for Python 2.6.2 on a

Re: matplotlib installation

2009-06-12 Thread Jean-Paul Calderone
On Fri, 12 Jun 2009 11:33:36 GMT, Alan G Isaac wrote: On 6/12/2009 5:55 AM Virgil Stokes apparently wrote: Any suggestions on installing matplotlib for Python 2.6.2 on a Windows Vista platform? Maintainers for some packages have run into a wall compiling for 2.6. Matplotlib is one of these:

Re: Winter Madness - Passing Python objects as Strings

2009-06-04 Thread Jean-Paul Calderone
On Thu, 4 Jun 2009 16:49:42 +0200, Hendrik van Rooyen wrote: [snip] It is not something that would find common use - in fact, I have never, until I started struggling with my current problem, ever even considered the possibility of converting a pointer to a string and back to a pointer again,

Re: Project source code layout?

2009-06-04 Thread Jean-Paul Calderone
On Thu, 04 Jun 2009 21:33:13 +1200, Lawrence D'Oliveiro wrote: In message , Allen Fowler wrote: I was hoping to keep the dev layout as close to deployment possible. Completely different purposes. For example, the actual production database and config files form no part of your development p

Re: define "generator" (glossary bug?)

2009-05-22 Thread Jean-Paul Calderone
On Fri, 22 May 2009 16:38:40 GMT, Alan G Isaac wrote: I believe the glossary http://wiki.python.org/moin/PythonGlossary is missing the definition for 'generator' and has used instead the definition for 'generator function', which term is missing from the glossary. Standard usage as I understand

Re: UDP reading on multiple sockets

2009-05-19 Thread Jean-Paul Calderone
On Mon, 18 May 2009 06:19:01 -0700 (PDT), thomas.vo...@likeabird.de wrote: On 17 Mai, 04:22, Grant Edwards wrote: On 2009-05-17, Thomas Vogel wrote: > I'm currently have the problem that I try to read UDP messages from > multiple sockets in parallel. So let's say I get UDP packets from the >

Re: issue with twisted and reactor. Can't stop reactor

2009-05-12 Thread Jean-Paul Calderone
On Tue, 12 May 2009 14:30:04 -0500, Nick Craig-Wood wrote: Gabriel wrote: Jean-Paul Calderone escribió: > None of the reactors in Twisted are restartable. You can run and stop them > once. After you've stopped a reactor, you cannot run it again. This is > the > caus

Re: issue with twisted and reactor. Can't stop reactor

2009-05-11 Thread Jean-Paul Calderone
On Mon, 11 May 2009 17:40:57 -0300, Gabriel wrote: Hello all!, I'm trying to implement a simple one way communication using twisted. [snip] When I call send the first time it works fine, when I call send a second time the sender hangs. [snip] None of the reactors in Twisted are restartable.

Re: problem in using sendmail in multi thread

2009-05-06 Thread Jean-Paul Calderone
On Tue, 5 May 2009 22:17:35 -0700 (PDT), gganesh wrote: On May 5, 9:25 pm, Piet van Oostrum wrote: > gganesh (g) wrote: >g> hi, >g> I'm a beginner in using Python script >g> I'm trying to send mails using multi-thread >g> I wrote >g> FROM = 'ganeshx...@.com' >g> # for more mail add';'

[ANN] pyOpenSSL 0.9

2009-04-28 Thread Jean-Paul Calderone
https://bugs.launchpad.net/pyopenssl Jean-Paul Calderone -- http://mail.python.org/mailman/listinfo/python-list

RE: screen scraping with Python?

2009-04-28 Thread Jean-Paul Calderone
On Tue, 28 Apr 2009 16:57:18 +0530, "Meenakshi, Arun Kumar" wrote: David, Thanks a ton for your swift reply. I will be more happy, if you could direct me with right API with which I can walk further. Twisted includes a vt102 API along with an in-memory emulator implementing many

Re: http web fetch question

2009-04-23 Thread Jean-Paul Calderone
On Thu, 23 Apr 2009 15:21:21 -0700 (PDT), grocery_stocker wrote: Say I have a script that fetches data from a website every hour. Is there a general solution or is the solution operating system specific? General solution to what problem? Jean-Paul -- http://mail.python.org/mailman/listinfo/p

Re: gethostbyname blocking

2009-04-23 Thread Jean-Paul Calderone
On Thu, 23 Apr 2009 15:16:56 +0200, Piet van Oostrum wrote: marc wyburn (MW) wrote: MW> Hi, I am writing an asynchronous ping app to check if 1000s of hosts MW> are alive very quickly. Everything works extremely quickly unless the MW> host name doesn't have a DNS record. MW> when calling

Re: gethostbyname blocking

2009-04-22 Thread Jean-Paul Calderone
On Wed, 22 Apr 2009 20:50:51 +0200, Christian Heimes wrote: Jean-Paul Calderone wrote: I'm not sure what the easiest way to determine whether Python has found gethostbyname_r or not on your system is. The configure script used to build Python will probably tell, but I doubt you have

Re: gethostbyname blocking

2009-04-22 Thread Jean-Paul Calderone
On Wed, 22 Apr 2009 08:08:51 -0700 (PDT), marc wyburn wrote: Hi, I am writing an asynchronous ping app to check if 1000s of hosts are alive very quickly. Everything works extremely quickly unless the host name doesn't have a DNS record. when calling socket.gethostbyname if there is no record

Re: Python and GMP.

2009-04-20 Thread Jean-Paul Calderone
On Mon, 20 Apr 2009 18:24:07 +0200, "Diez B. Roggisch" wrote: alessiogiovanni.bar...@gmail.com wrote: There are reasons why Python not used the GMP library for implementing its long type? Any reason it should? I don't know GMP (only that it exists), but adding binary dependencies is always

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Jean-Paul Calderone
On Mon, 13 Apr 2009 09:53:04 -0700 (PDT), hubritic wrote: I want to build a parser object that handles two different log file formats. I have an object that handles Connection logs and an object for Filter logs. Each will instantiate a Parser object, passing in the path to individual log file

Re: OverflowError while sending large file via socket

2009-04-12 Thread Jean-Paul Calderone
On 13 Apr 2009 01:45:56 GMT, Steven D'Aprano wrote: On Mon, 13 Apr 2009 00:21:34 +0200, Ryniek90 wrote: When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can hold" Sockets are being used in every network

Re: Async serial communication/threads sharing data

2009-04-11 Thread Jean-Paul Calderone
On Wed, 25 Mar 2009 22:23:25 -0700, John Nagle wrote: Jean-Paul Calderone wrote: On Tue, 24 Mar 2009 22:20:49 -0700, John Nagle wrote: Jean-Paul Calderone wrote: On Mon, 23 Mar 2009 05:30:04 -0500, Nick Craig-Wood wrote: Jean-Paul Calderone wrote: [snip] After bringing in all the

Re: Async serial communication/threads sharing data

2009-03-25 Thread Jean-Paul Calderone
On Tue, 24 Mar 2009 22:20:49 -0700, John Nagle wrote: Jean-Paul Calderone wrote: On Mon, 23 Mar 2009 05:30:04 -0500, Nick Craig-Wood wrote: Jean-Paul Calderone wrote: [snip] After bringing in all the heavy machinery of Twisted, you're still polling at 10Hz. That's disappointi

Re: Unit testing frameworks

2009-03-24 Thread Jean-Paul Calderone
On Tue, 24 Mar 2009 05:06:47 -0700 (PDT), grkunt...@gmail.com wrote: I am looking for a unit testing framework for Python. I am aware of nose, but was wondering if there are any others that will automatically find and run all tests under a directory hierarchy. One such tool is trial, http://twi

Re: PEP 3143: Standard daemon process library

2009-03-24 Thread Jean-Paul Calderone
On Tue, 24 Mar 2009 15:42:46 +1100, Ben Finney wrote: Jean-Paul Calderone writes: [snip] An additional feature which would be useful for the library to provide, however, would be the setting of euid and egid instead of uid and gid. This is necessary, for example, to write an SSH daemon

Re: pickle.load() extremely slow performance

2009-03-23 Thread Jean-Paul Calderone
On Mon, 23 Mar 2009 10:57:54 -0500, Jim Garrison wrote: Benjamin Peterson wrote: Terry Reedy udel.edu> writes: 3.1a1 is out and I believe it has the io improvements. Massive ones, too. It'd be interesting to see your results on the alpha. On 3.1a1 the unpickle step takes 2.4 seconds, an 1

Re: Async serial communication/threads sharing data

2009-03-23 Thread Jean-Paul Calderone
On Mon, 23 Mar 2009 05:30:04 -0500, Nick Craig-Wood wrote: Jean-Paul Calderone wrote: [snip] In the case of a TCP to serial forwarder, you don't actually have to implement either a producer or a consumer, since both the TCP connection and the serial connection are already both prod

Re: Async serial communication/threads sharing data

2009-03-22 Thread Jean-Paul Calderone
On Sun, 22 Mar 2009 12:30:04 -0500, Nick Craig-Wood wrote: [snip] I wrote a serial port to TCP proxy (with logging) with twisted. The problem I had was that twisted serial ports didn't seem to have any back pressure. By that I mean I could pump data into a 9600 baud serial port at 10 Mbit/s.

Re: Async serial communication/threads sharing data

2009-03-22 Thread Jean-Paul Calderone
On Sun, 22 Mar 2009 03:13:36 -0700 (PDT), Nick Timkovich wrote: On Mar 21, 9:19 pm, Jean-Paul Calderone wrote: On Sat, 21 Mar 2009 13:52:21 -0700 (PDT), Nick Timkovich wrote: >I've been working on a program that will talk to an embedded device >over the serial port, using some b

Re: PEP 3143: Standard daemon process library

2009-03-21 Thread Jean-Paul Calderone
On Sun, 22 Mar 2009 10:19:58 +1100, Ben Finney wrote: Jean-Paul Calderone writes: The biggest shortcoming seems to be a complete lack of unit tests. A full unit test suite is in the source distribution's ‘tests/’ directory. You can run it with ‘python ./setup.py test’. Of course th

Re: Async serial communication/threads sharing data

2009-03-21 Thread Jean-Paul Calderone
On Sat, 21 Mar 2009 13:52:21 -0700 (PDT), Nick Timkovich wrote: I've been working on a program that will talk to an embedded device over the serial port, using some basic binary communications with messages 4-10 bytes long or so. Most of the nuts and bolts problems I've been able to solve, and

Re: PEP 3143: Standard daemon process library

2009-03-20 Thread Jean-Paul Calderone
On Fri, 20 Mar 2009 21:47:00 +1100, Ben Finney wrote: [snip] Somewhat by accident I noticed this other part of the PEP: Other Python daemon implementations that differ from this PEP: [snip] * Twisted [twisted]_ includes, perhaps unsurprisingly, an implementation of a process daemonisat

Re: PEP 3143: Standard daemon process library (was: Writing a well-behaved daemon)

2009-03-20 Thread Jean-Paul Calderone
On Fri, 20 Mar 2009 20:58:58 +1100, Ben Finney wrote: Ben Finney writes: Writing a Python program to become a Unix daemon is relatively well-documented: there's a recipe for detaching the process and running in its own process group. However, there's much more to a Unix daemon than simply de

Re: Threads not Improving Performance in Program

2009-03-19 Thread Jean-Paul Calderone
On Thu, 19 Mar 2009 09:50:51 -0700, Ryan Rosario wrote: I have a parser that needs to process 7 million files. After running for 2 days, it had only processed 1.5 million. I want this script to parse several files at once by using multiple threads: one for each file currently being analyzed. T

Re: download x bytes at a time over network

2009-03-17 Thread Jean-Paul Calderone
On Tue, 17 Mar 2009 15:17:56 + (UTC), "R. David Murray" wrote: Jean-Paul Calderone wrote: On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh wrote: >> This isn't exactly how things work.  The server *sends* you bytes.  It can >> send you a lot at once.  To some exte

Re: ValueError: filedescriptor out of range in select()

2009-03-17 Thread Jean-Paul Calderone
On Tue, 17 Mar 2009 18:03:59 +0100, Laszlo Nagy wrote: For whatever reason, you're ending up with a lot of open files and/or sockets (and/or any other resource based on file descriptors). That results in new file descriptors having large values (>=1024). You cannot use select() with such fi

Re: download x bytes at a time over network

2009-03-17 Thread Jean-Paul Calderone
On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh wrote: This isn't exactly how things work.  The server *sends* you bytes.  It can send you a lot at once.  To some extent you can control how much it sends before it waits for you to catch up, but you don't have anywhere near byte-level control (you mi

Re: ValueError: filedescriptor out of range in select()

2009-03-17 Thread Jean-Paul Calderone
On Tue, 17 Mar 2009 15:04:22 +0100, Laszlo Nagy wrote: This is a long running process, written in Python. Only standard lib is used. This process accepts connections on TCP sockets, read/write data. After about one day, it starts throwing this when I try to connect: [snip] File "/usr/local/w

Re: download x bytes at a time over network

2009-03-16 Thread Jean-Paul Calderone
On Mon, 16 Mar 2009 13:02:07 +0530, Saurabh wrote: I want to download content from the net - in chunks of x bytes or characters at a time - so that it doesnt pull the entire content in one shot. This isn't exactly how things work. The server *sends* you bytes. It can send you a lot at once.

  1   2   3   4   5   6   7   >