Tahoe-LAFS on Python 3 - Call for Porters

2019-09-24 Thread Jean-Paul Calderone
u have, as well as details of your availability and any related work you have done previously (GitHub, LinkedIn links, etc). If you would like to find out more about this opportunity, please contact us at jessielisbetfrance at gmail (dot) com or on IRC in #tahoe-lafs on Freenode. J

[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
anks to everyone who contributed and to Least Authority TFA GmbH <https://leastauthority.com/> for sponsoring my work on this release. Jean-Paul -- https://mail.python.org/mailman/listinfo/python-list

[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
nd fix this issue and to publish this new release. Jean-Paul -- https://mail.python.org/mailman/listinfo/python-list

Re: Async IO Server with Blocking DB

2012-04-04 Thread Jean-Paul Calderone
prise.adbapi, which wraps the module in an asynchronous API (implemented using a thread pool). Since the calls all happen in separate threads, it doesn't matter that they block. If you're not talking about a SQL database or a DB-API module, maybe be more specific about the kind o

Re: Howto Deferred

2011-07-14 Thread Jean-Paul Calderone
not sure what the listDeferred is there for. Deferreds are a good abstraction for "do one thing and then tell me what the result was". You have a different sort of thing here, where there isn't much of a result (sending to tcp probably always works until you lose your connection). A method call works well for that. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
ty certificates". `wrap_socket` accepts a `ca_certs` argument. See http://docs.python.org/library/ssl.html#ssl-certificates for details about that argument. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL in alternative implementations

2011-06-07 Thread Jean-Paul Calderone
e iteration to the next,   > so a complete name lookup is required at each iteration. This is very   > useful sometimes, but affects performance a lot. > And even the original example, with only + and * can have side- effects. Who knows how a defines __add__? Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: How good is security via hashing

2011-06-07 Thread Jean-Paul Calderone
for > each number. > > Uuid apparently uses machine internals etc etc to try and produce randomness, > but urandom and similar can block so are probably not entirely suitable. /dev/urandom does not block, that's the point of it as compared to / dev/random. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: How good is security via hashing

2011-06-07 Thread Jean-Paul Calderone
10 bytes enough to thwart your attackers? Hard to say, what does an attack look like? If you want the full 16 bytes of unpredictability, why don't you just read 16 bytes from /dev/urandom and forget about all the other stuff? Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Sanitizing filename strings across platforms

2011-05-31 Thread Jean-Paul Calderone
results = "_" + results >     return results > > but if somebody already has war-hardened code they'd be willing > to share, I'd appreciate any thoughts. > There's http://pypi.python.org/pypi/filepath/0.1 (taken from twisted.python.filepath). Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: connect SIGINT to custom interrupt handler

2011-05-18 Thread Jean-Paul Calderone
m the messages in this thread if you managed to get that approach working. The most commonly encountered problem with this approach is that it means that any blocking (eg I/O) operation in progress won't be interrupted and you'll have to wait for it to complete normally. In this case, it soun

Re: sockets: bind to external interface

2011-04-25 Thread Jean-Paul Calderone
>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) >>> s.connect(('1.2.3.4', 1234)) >>> s.getsockname() ('192.168.1.148', 47679) Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: When is PEP necessary?

2011-04-23 Thread Jean-Paul Calderone
ese PEPs to provide compliant packages. > While its not that important for pure-python modules, anything tied to > C-API better be documented, or it becomes a nightmare to keep > non-CPython version having identical interface. > Unit tests actually serve this purpose much better than do PE

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

2011-04-20 Thread Jean-Paul Calderone
mport TestCase from twisted.test.proto_helpers import StringTransport from yourapp import Handler # Or a better name class HandlerTests(TestCase): def test_someMessage(self): """ When the "X" message is received, the "Y" response is sent back. """ transport = StringTransport() protocol = Handler() protocol.makeConnection(transport) protocol.dataReceived("X") self.assertEqual(transport.value(), "Y") Hope this helps, Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickling over a socket

2011-04-19 Thread Jean-Paul Calderone
his. Your server accepts arbitrary code from clients and executes it. It is completely insecure. Do not use pickle and sockets together. Notice the large red box at the top of . Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2011-04-19 Thread Jean-Paul Calderone
quot;Exactly one of a, b, c or d must be true.") > > I guess I never thought about it, but there isn't an 'xor' operator to > go along with 'or' and 'and'.  Must not be something I need very often. > You also can't evaluate xor without ev

Re: Questions about GIL and web services from a n00b

2011-04-16 Thread Jean-Paul Calderone
an CPU bound > > Threads are also useful for user interaction (i.e. GUI apps).   > I suppose that's why most GUI toolkits use a multithreaded model. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking against NULL will be eliminated?

2011-03-03 Thread Jean-Paul Calderone
d behavior. > C and C++ have standards, and the standards describe what they don't define. Python has implementations. The defined behavior is whatever the implementation does. Until someone changes it to do something else. It's not much of a comparison. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: interrupted system call w/ Queue.get

2011-02-18 Thread Jean-Paul Calderone
ends how and why it happens, and whether it prevents your application from working properly. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: How to handle sockets - easily?

2011-02-16 Thread Jean-Paul Calderone
le your socket I/O asynchronously; but I don't enough about Python to > get the mixed behavior you'd want. > > I think that there's an asynchronous all-Python MySQL library, but I'm not > sure. Maybe one day I can open source my asynchronous MySQL C library. (I > always recommend people to use PostgreSQL, though; which is superior in > almost every way, especially the C client library and the wire protocol.) There's the very new <https://github.com/hybridlogic/txMySQL>. There's also <http://pypi.python.org/pypi/txpostgres>. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
from possible bugs where the data gets corrupted by the code that operates on it, since there's only one copy shared amongst all your tests. Is there some other benefit that the shared memory approach gives you? Of course, adding unit tests that exercise your code on a smaller data set migh

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
ltiple interpreters in a single process. However, you cannot have your cake and eat it too. If you create multiple interpreters, then why do you think you'll be able to share objects between them for free? In what sense would you have *multiple* interpreters in that scenario? You will need some

Re: AF_UNIX socket not supported

2011-02-08 Thread Jean-Paul Calderone
://docs.python.org/library/socket.html#socket.AF_UNIX Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: sending through non-default gateway

2011-02-06 Thread Jean-Paul Calderone
by the first router that sees them). You just need to make a different decision at the first hop. You can do this with the SO_BINDTODEVICE option on a raw socket. But this probably also requires administrative privileges. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
ave a module named "foo" that defines an "application" name, you would pass "foo.application". Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
e tooking too much time, which > > > solution do you propose? > > > If possible, use multiple processes instead. > > > Diez- Nascondi testo citato > > > - Mostra testo citato - > > Multiple processes, ok, but then regarding processes' interruption > there will be the same problems pointed out by using threads? > No. Processes can be terminated easily on all major platforms. See `os.kill`. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2010-12-26 Thread Jean-Paul Calderone
cts, however, is an issue of larger scope than mere portability.   > ;) > The PyPy JIT supports x86_64. It's still being improved, but it does provide real speedups in some cases already. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
completely accurate. It *is* possible to write a JIT compiler for a Python runtime which has fast path code for the common case, the case where the meaning of "+" doesn't change between every opcode. PyPy has produced some pretty good results with this approach. For those who haven't seen it yet, http://speed.pypy.org/ has some graphs which reflect fairly well on PyPy's performance for benchmarks that are not entirely dissimilar to real world code. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Twisted on Windows

2010-11-18 Thread Jean-Paul Calderone
und. When running as root, or when running on Windows, twistd does not add the working directory to sys.path. So with all that in mind, the solution should be pretty clear - just set PYTHONPATH to include MyServerApp. This variation of twistd behavior is pretty confusing, and I think a future ver

Re: Getting references to objects without incrementing reference counters

2010-11-15 Thread Jean-Paul Calderone
ng to have them drag you down. Fortunately the PyPy team is making great progress in implementing a runtime that transparently sheds those dynamic features when running a program that doesn't take advantage of them. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting references to objects without incrementing reference counters

2010-11-14 Thread Jean-Paul Calderone
d here because getting a real reference from a weakref increases a > reference counter. Maybe another option would be to store reference > counters not in objects, but in a separate array to minimize number of > memory pages they occupy... It might be interesting to try with Jython or PyPy.

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
d calls with an IP address. If you're not passing an IP address here, then the Python version has to do a name lookup for each send, I bet your C version is not. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: pyOpenSSL 0.11 released

2010-11-03 Thread Jean-Paul Calderone
gt; page: > >    https://launchpad.net/pyopenssl/main/0.11 > It was helpfully pointed out to me that I forgot to mention that the Python 3.2 support in this release of pyOpenSSL was made possible by a grant from the Python Software Foundation. > Enjoy, > Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

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
t, but appreciate any/all advice) > Linux has /proc/self/fd and OS X has /dev/fd. Those both suppose you have some way of determining which file descriptor corresponds to the socket or sockets that the library is using, of course. Vastly better would be to convince the author to expose that information via a real API. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
why, rather than > waiting until all the tests are done. > > I've searched the doc and even looked at the code, and it seems the > answer is no, but I'm just wondering if I'm missing something. > > Thanks! > > Margie trial (Twisted's test runner) has

Re: simples setup for an wsgi https server in python

2010-07-10 Thread Jean-Paul Calderone
an https server, that > supports wsgi modules > > TIA You could do this with Twisted: twistd -n web --https 443 --certificate server.pem --privkey server.key --wsgi your.application Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: bad certificate error

2009-07-28 Thread Jean-Paul Calderone
ded to let OpenSSL make the decision about whether to accept the certificate or not. Either M2Crypto or pyOpenSSL will let you ignore verification errors. The new ssl module in Python 2.6 may also as well. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2009-07-27 Thread Jean-Paul Calderone
y2exe doesn't really change the performance characteristics of a Python application at all - for better or for worse. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2009-07-22 Thread Jean-Paul Calderone
d somehow prevent I/O from being serviced? I'm not sure why, as long as the implementation pays attention to I/O events. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2009-07-17 Thread Jean-Paul Calderone
following paper: Yes, it'd be good for Python to expose setresuid. The best course of action is to file a ticket in the issue tracker. Things will be sped along if you also attach a patch implementing the change. :) Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Override a method but inherit the docstring

2009-07-16 Thread Jean-Paul Calderone
e) With the result of BarGonk.frobnicate.__doc__ being set to: Frobnicate this gonk. This implementation takes the warble into consideration. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2009-07-12 Thread Jean-Paul Calderone
with whichever versions of Python you want to support. Tools like Hudson (<https://hudson.dev.java.net/>) and BuildBot (<http://buildbot.net/>) can help with this. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib - an odd problem

2009-06-24 Thread Jean-Paul Calderone
ureCanvas(fig) canvas.set_size_request(640, 480) fig.savefig("foo.png") Hope this helps, Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2009-06-19 Thread Jean-Paul Calderone
that rely on technical details you know nothing about? Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Limit (max) connections SimpleHTTPServer

2009-06-15 Thread Jean-Paul Calderone
x.com/trac/ http://twistedmatrix.com/projects/core/documentation/howto/servers.html Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: twisted server

2009-06-15 Thread Jean-Paul Calderone
7;t a good way to make a web server with Twisted. Take a look at http://twistedmatrix.com/projects/web/documentation/howto/using-twistedweb.html Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: waling a directory with very many files

2009-06-15 Thread Jean-Paul Calderone
bout APIs and ctypes deals with ABIs. http://pypi.python.org/pypi/ctypes_configure/0.1 helps with the problem, and is a bit more accessible than gccxml. It is basically correct to say that using ctypes without using something like gccxml or ctypes_configure will give you non-portable code. Jean-Paul

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
, the people responsible for how CPython builds on Windows don't seem to consider this an issue. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Winter Madness - Passing Python objects as Strings

2009-06-04 Thread Jean-Paul Calderone
, and I would be surprised if anybody else on this list has done so in the past, in a context other than debugging. So, do you mind sharing your current problem? Maybe then it'll make more sense why one might want to do this. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Project source code layout?

2009-06-04 Thread Jean-Paul Calderone
at's a recipe for failure. Minimizing differences between development and deployment is a *great* thing. There are certainly cases where differences are necessary, but one should strive to make them the exception, not the rule. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: define "generator" (glossary bug?)

2009-05-22 Thread Jean-Paul Calderone
;. However, I think it was right before. Consider: def foo(): yield Now, is `foo´ a generator? If so, what is `foo()´? With the "generator function"/"generator" terminology, it is unambiguous to say "`foo´ is a generator function and `foo()´ is a generator". Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: UDP reading on multiple sockets

2009-05-19 Thread Jean-Paul Calderone
/howto/udp.html You can trivially change the first example to handle multiple sockets - just add more reactor.listenUDP calls. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
table. You can run and stop them once. After you've stopped a reactor, you cannot run it again. This is the cause of your problem. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: problem in using sendmail in multi thread

2009-05-06 Thread Jean-Paul Calderone
--- -- Piet van Oostrum URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4] Private email: p...@vanoostrum.org Thanks Everyone By your guidance the code worked fine I can send mails in multi threaded environment. Is this only way to send mails concurrently or any other method aviable? Here's another way: from twisted.mail.smtp import sendmail from twisted.internet import reactor from twisted.python.log import err MAILSERVER = ... listTo = [...] FROM = ... MSGBODY = ... done = sendmail(MAILSERVER, FROM, listTo, MSGBODY) done.addErrback(err) done.addCallback(lambda ignored: reactor.stop()) reactor.run() Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

[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
nting many (but not all) of the features of the terminal. You can find the API documentation online: http://twistedmatrix.com/documents/current/api/twisted.conch.insults.html Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

Re: gethostbyname blocking

2009-04-23 Thread Jean-Paul Calderone
ill probably produce significantly better results. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
rolled by system configuration in various ways, and may do more than just DNS lookups (in fact, it may even be configured not to use DNS at all!). But it's pretty close, and may be close enough for your purposes. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and GMP.

2009-04-20 Thread Jean-Paul Calderone
ncies is always a tricky and in need of careful weighting thing to do. This has been discussion in detail on python-dev (more than once, I think, even). Here's the top of one such thread: http://mail.python.org/pipermail/python-dev/2008-November/083315.html Jean-Paul -- http://mai

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

2009-04-13 Thread Jean-Paul Calderone
ho its Daddy is? Inspecting the call stack or the execution context to decide what to do is a really awful idea. It's complicated to implement, complicated to maintain, complicated to read, and there's no reason to do it. Just do the simple thing - add a parameter or make two separate

Re: OverflowError while sending large file via socket

2009-04-12 Thread Jean-Paul Calderone
rol of an application using the BSD socket API. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
://twistedmatrix.com/trac/wiki/TwistedTrial Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
onds, an 1875% improvement. Surely you mean a 94.7% improvement? Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
ets paused, and when the buffer is empty again, it gets resumed. Hope this helps! Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
t you integrate with a GUI toolkit. Since Twisted encourages you to write programs which deal with things asynchronously in a single thread, if you use it, your concerns about data exchange, locking, and timing should be addressed as a simple consequence of your overall program structure. Je

Re: PEP 3143: Standard daemon process library

2009-03-20 Thread Jean-Paul Calderone
ed as could be (it's also only 14 lines long). Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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

2009-03-20 Thread Jean-Paul Calderone
ust surely fail. For example, uid/gid setting is broken. I'd recommend adding an automated test suite, fixing all the issues that come up during that process, and then asking for scrutiny again. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads not Improving Performance in Program

2009-03-19 Thread Jean-Paul Calderone
processes instead, if there really is more hardware that's sitting idle with your single threaded version. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

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
etter choice for me, except that Python is much more elegant. :-) I'm sure people will tell you that this is a good use of threads and that Python is up to the task. I think it's a bad use of threads, but with a different approach, I still think Python is up to the task. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: download x bytes at a time over network

2009-03-17 Thread Jean-Paul Calderone
ntrol (you might have something like 32kb or 64kb level control). What abt in Python3 ? It seems to have some header like the one below : b'b495 - binary mode with 46229 bytes ? Or is it something else ? That's just a bug in urllib in Python 3.0. Jean-Paul -- http://mail.python.org/mai

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

2009-03-17 Thread Jean-Paul Calderone
is to work around a bug in CPython on Windows where a process in a blocking read cannot be interrupted by C-c in the console? If that's the case, there may be other approaches to solving the problem (like fixing the bug in CPython which causes this). Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: download x bytes at a time over network

2009-03-16 Thread Jean-Paul Calderone
en you can probably see the behavior you were expecting. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   >