[RELEASE] Nevow 0.11.1

2014-06-21 Thread exarkun
Hello, I'm pleased to announce the release of Nevow 0.11.1. Nevow is a web application construction kit written in Python and based on Twisted. It is designed to allow the programmer to express as much of the view logic as desired in Python, and includes a pure Python XML expression syntax na

[ANN] pyOpenSSL 0.14

2014-02-23 Thread exarkun
Greetings fellow Pythoneers, I'm happy to announce that pyOpenSSL 0.14 is now available. pyOpenSSL is a set of Python bindings for OpenSSL. It includes some low-level cryptography APIs but is primarily focused on providing an API for using the TLS protocol from Python. Check out the PyPI pa

pyOpenSSL 0.13 release

2011-09-04 Thread exarkun
Hello all, I'm happy to announce the release of pyOpenSSL 0.13. With this release, pyOpenSSL now supports OpenSSL 1.0. Additionally, pyOpenSSL now works with PyPy. Apart from those two major developments, the following interesting changes have been made since the last release: * (S)erve

Announcing pyOpenSSL 0.12

2011-04-11 Thread exarkun
Exciting news everyone, I have just released pyOpenSSL 0.12. pyOpenSSL provides Python bindings to a number of OpenSSL APIs, including certificates, public and private keys, and of course running TLS (SSL) over sockets or arbitrary in- memory buffiers. This release fixes an incompatibility

[ANN] pyOpenSSL 0.11 released

2010-11-01 Thread exarkun
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 handful of bugs in error handling code. It also adds APIs for

Re: Determine sockets in use by python

2010-09-30 Thread exarkun
On 07:32 pm, jmellan...@lbl.gov wrote: Thanks, I realized that even if I found out relevant info on the socket, I would probably need to use ctypes to provide a low level interface to select, as the socket wouldn't be a python socket object, unless there is some way to promote a c socket to a py

[ANN] filepath 0.1

2010-06-23 Thread exarkun
Hello all, I'm happy to announce the initial release of filepath. filepath is an abstract interface to the filesystem. It provides APIs for path name manipulation and for inspecting and modifying the filesystem (for example, renaming files, reading from them, etc). filepath's APIs are intend

[ANN] python-signalfd 0.1 released

2010-06-21 Thread exarkun
Hello all, I'm happy to announce the initial release of python-signalfd. This simple package wraps the sigprocmask(2) and signalfd(2) calls, useful for interacting with POSIX signals in slightly more advanced ways than can be done with the built-in signal module. You can find the package on

Re: a +b ?

2010-06-13 Thread exarkun
On 04:25 pm, wuwe...@gmail.com wrote: Steven D'Aprano wrote: No, I think your code is very simple. You can save a few lines by writing it like this: s = input('enter two numbers: ') t = s.split() print(int(t[0]) + int(t[1])) # no need for temporary variables a and b Not that we're playing

Re: __getattribute__ and methods proxying

2010-06-12 Thread exarkun
On 07:01 pm, g.rod...@gmail.com wrote: Hi, I have a class which looks like the one below. What I'm trying to accomplish is to "wrap" all my method calls and attribute lookups into a "proxy" method which translates certain exceptions into others. The code below *apparently* works: the original met

Re: error in importing numpy

2010-06-05 Thread exarkun
On 12:26 pm, michelpar...@live.com wrote: Hi, I am using ubuntu 9.10 . I just installed python 2.6.1 in /opt/python2.6 for using it with wingide for debugging symbols. I also installed numpy in python 2.6.1 using -- prefix method. but when i import numpy i get following error : ImportError:

Re: Plotting in batch with no display

2010-06-04 Thread exarkun
On 08:01 pm, h.schaat...@surrey.ac.uk wrote: Admittedly not the strongest reason, but yet an important one, for switching from Matlab to python/numpy/scipy/matplotlib, is that Matlab is very cumbersome to run in batch. Now I discover that some of the matplotlib.pyplot functions (incl. plot and c

Re: FIle transfer over network - with Pyro?

2010-06-03 Thread exarkun
On 06:58 pm, strom...@gmail.com wrote: On Jun 3, 10:47�am, Nathan Huesken wrote: Hi, I am writing a network application which needs from time to time do file transfer (I am writing the server as well as the client). For simple network messages, I use pyro because it is very comfortable. But

Re: SOAP with fancy HTTPS requirements

2010-06-03 Thread exarkun
On 03:23 pm, li...@zopyx.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, I need to implement the following: sending SOAP requests and receiving SOAP responses over HTTPS with - authentication based on client-certificates _and_ basic authorization - verification of the serve

Re: asyncore loop and cmdloop problem

2010-05-25 Thread exarkun
On 04:31 pm, kak...@gmail.com wrote: On May 25, 5:47�pm, "kak...@gmail.com" wrote: On May 25, 5:23�pm, Michele Simionato wrote: > On May 25, 2:56�pm, "kak...@gmail.com" wrote: > > Could you please provide me with a simple example how to do this with > > threads. > > I don't know where to

Re: Traceback spoofing

2010-05-21 Thread exarkun
On 01:42 am, tjre...@udel.edu wrote: On 5/21/2010 7:22 PM, Zac Burns wrote: Why can't I inherit from traceback to 'spoof' tracebacks? Because a) they are, at least in part, an internal implementation detail of CPython, But you can just say this about anything, since there is no Python spec

Re: How to measure speed improvements across revisions over time?

2010-05-11 Thread exarkun
On 08:13 pm, m...@tplus1.com wrote: I know how to use timeit and/or profile to measure the current run-time cost of some code. I want to record the time used by some original implementation, then after I rewrite it, I want to find out if I made stuff faster or slower, and by how much. Other t

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-08 Thread exarkun
On 11:47 am, g.rod...@gmail.com wrote: 2010/5/7 Antoine Pitrou : Le Fri, 07 May 2010 21:55:15 +0200, Giampaolo Rodol� a �crit�: Of course, but 30 seconds look a little bit too much to me, also because (I might be wrong here) I noticed that a smaller timeout seems to result in better performan

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-08 Thread exarkun
On 07:48 am, l...@geek-central.gen.new_zealand wrote: In message , exar...@twistedmatrix.com wrote: This is a good example of why it's a bad idea to use select on Windows. Instead, use WaitForMultipleObjects. How are you supposed to write portable code, then? With WaitForMultipleObjects on

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-07 Thread exarkun
On 7 May, 07:25 pm, p.f.mo...@gmail.com wrote: On 7 May 2010 15:36, Giampaolo Rodol� wrote: You can easily avoid this by setting a lower timeout when calling asyncore.loop(), like 1 second or less (for example, Twisted uses 0.001 secs). Thanks, that's what I was considering. This is a good

Re: Fix bugs without breaking down existing code

2010-04-25 Thread exarkun
On 10:02 am, elvismoodbi...@gmail.com wrote: Say, a Standard Library function works in a way it was not supposed to. Developers (who use Python) handle this issue themselves. And then, you (a python-core developer) fix the behavior of the function. Although you have 1Cfixed 1D the bug, anyone

Re: "ssl" module doesn't validate that domain of certificate is correct

2010-04-19 Thread exarkun
On 05:49 pm, na...@animats.com wrote: exar...@twistedmatrix.com wrote: On 04:51 pm, na...@animats.com wrote: I'm converting some code from M2Crypto to the new "ssl" module, and I've found what looks like a security hole. The "ssl" module will validate the certificate chain, but it doesn't

Re: "ssl" module doesn't validate that domain of certificate is correct

2010-04-19 Thread exarkun
On 04:51 pm, na...@animats.com wrote: I'm converting some code from M2Crypto to the new "ssl" module, and I've found what looks like a security hole. The "ssl" module will validate the certificate chain, but it doesn't check that the certificate is valid for the domain. Here's the basic

Re: [Possibly OT] Comments on PyPI

2010-04-11 Thread exarkun
On 09:24 am, st...@remove-this-cybersource.com.au wrote: On Sun, 11 Apr 2010 10:13:16 +0200, Martin v. Loewis wrote: Steven D'Aprano wrote: How do I leave comments on PyPI? There's a checkbox "Allow comments on releases" which I have checked, but no obvious way to actually post a comment. Yo

Re: Browser-based MMOG web framework

2010-04-01 Thread exarkun
On 01:14 am, srosbo...@gmail.com wrote: Hi, I could use some advice on my project. It's a browser-based MMOG: "The High Seas" (working title) Basically it is a trading game set in 1600s or 1700s ... inspirations: Patrician 3, Mine Things, Space Rangers 2, ... Travel between cities takes severa

Re: Writing tests for the Python bug tracker

2010-03-20 Thread exarkun
On 06:52 am, st...@remove-this-cybersource.com.au wrote: but when I try running the test, I get an error: $ python test_unicode_interpolation.py Options: {'delimiter': None} str of options.delimiter = None repr of options.delimiter = None len of options.delimiter Traceback (most recent call las

Re: Asynchronous HTTP client

2010-03-07 Thread exarkun
On 02:40 pm, ping.nsr@gmail.com wrote: 2010/3/7 On 06:53 am, ping.nsr@gmail.com wrote: Hi, I'm trying to find a way to create an asynchronous HTTP client so I can get responses from web servers in a way like async_http_open('http://example.com/', callback_func) # immediately contin

Re: Asynchronous HTTP client

2010-03-07 Thread exarkun
On 06:53 am, ping.nsr@gmail.com wrote: Hi, I'm trying to find a way to create an asynchronous HTTP client so I can get responses from web servers in a way like async_http_open('http://example.com/', callback_func) # immediately continues, and callback_func is called with response as arg w

Re: threading and signals - main thread solely responsible for signal handling?

2010-02-13 Thread exarkun
On 04:43 pm, malig...@gmail.com wrote: The main part of my script is a function that does many long reads (urlopen, it's looped). Since I'm hell-bent on employing SIGINFO to display some stats, I needed to run foo() as a seperate thread to avoid getting errno 4 (interrupted system call) errors (w

Re: merge stdin, stdout?

2010-02-04 Thread exarkun
On 01:56 am, jonny.lowe.12...@gmail.com wrote: Hi everyone, Is there an easy way to merge stdin and stdout? For instance suppose I have script that prompts for a number and prints the number. If you execute this with redirection from a file say input.txt with 42 in the file, then executing ./my

Re: Overcoming python performance penalty for multicore CPU

2010-02-02 Thread exarkun
On 11:02 pm, na...@animats.com wrote: I know there's a performance penalty for running Python on a multicore CPU, but how bad is it? I've read the key paper ("www.dabeaz.com/python/GIL.pdf"), of course. It would be adequate if the GIL just limited Python to running on one CPU at a time, but

Re: lists as an efficient implementation of large two-dimensional arrays(!)

2010-02-02 Thread exarkun
On 08:36 pm, gerald.brit...@gmail.com wrote: On Tue, Feb 2, 2010 at 3:14 PM, Mitchell L Model wrote: I need a 1000 x 1000 two-dimensional array of objects. (Since they are instances of application classes it appears that the array module is useless; Did you try it with an array object using

Re: Function name unchanged in error message

2010-01-29 Thread exarkun
On 02:10 pm, c...@rebertia.com wrote: On Fri, Jan 29, 2010 at 5:30 AM, andrew cooke wrote: Is there any way to change the name of the function in an error message? �In the example below I'd like the error to refer to bar(), for example (the motivation is related function decorators - I'd like t

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread exarkun
On 07:49 pm, stu.dohe...@gmail.com wrote: Have you actually looked at any of the standard library? Jean-Paul I'm looking at urllib2 right now and it is covering a bunch of the bases I'm looking for. And grepping in the /usr/lib/python2.5/ folder for import statements on various things I'm i

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread exarkun
On 07:28 pm, j...@joshh.co.uk wrote: On 2010-01-28, Big Stu wrote: I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together. I'm hoping for example code that demonstrates: Surely most of the Standard Library should satisf

Re: Portable way to tell if a process is still alive

2010-01-28 Thread exarkun
On 10:50 am, gand...@shopzeus.com wrote: Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like to know if a

Re: myths about python 3

2010-01-27 Thread exarkun
On 10:07 pm, pavlovevide...@gmail.com wrote: On Jan 27, 12:56�pm, John Nagle wrote: Arguably, Python 3 has been rejected by the market. No it's not fathomably arguable, because there's no reasonable way that Python 3 could have fully replaced Python 2 so quickly. At best, you could reasonabl

Re: Library support for Python 3.x

2010-01-27 Thread exarkun
On 07:03 pm, no.em...@nospam.invalid wrote: a...@pythoncraft.com (Aahz) writes: From my POV, your question would be precisely identical if you had started your project when Python 2.3 was just released and wanted to know if the libraries you selected would be available for Python 2.6. I didn't

Re: Writing a string.ishex function

2010-01-14 Thread exarkun
On 08:15 pm, da...@druid.net wrote: On 14 Jan 2010 19:19:53 GMT Duncan Booth wrote: > ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours > ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine > > I could actually go three better: > > ishex3=lambda s:not set(s)-set(strin

Re: unittest help needed!

2010-01-14 Thread exarkun
On 06:33 pm, rolf.oltm...@gmail.com wrote: Hi Python gurus, I'm quite new to Python and have a problem. Following code resides in a file named test.py --- import unittest class result(unittest.TestResult): pass class tee(unittest.TestCase): def test_first(self): print 'first te

Re: Do I have to use threads?

2010-01-06 Thread exarkun
On 04:26 am, adityashukla1...@gmail.com wrote: Hello people, I have 5 directories corresponding 5 different urls .I want to download images from those urls and place them in the respective directories.I have to extract the contents and download them simultaneously.I can extract the contents

Re: Speeding up network access: threading?

2010-01-04 Thread exarkun
On 04:22 pm, m...@privacy.net wrote: Hello, what would be best practise for speeding up a larger number of http-get requests done via urllib? Until now they are made in sequence, each request taking up to one second. The results must be merged into a list, while the original sequence needs no

Re: subprocess.Popen and ordering writes to stdout and stderr

2009-12-17 Thread exarkun
On 09:56 pm, ch...@simplistix.co.uk wrote: exar...@twistedmatrix.com wrote: How can I get this to be the case? You probably just need to flush stdout and stderr after each write. You set them up to go to the same underlying file descriptor, but they still each have independent buffering on t

Re: subprocess.Popen and ordering writes to stdout and stderr

2009-12-17 Thread exarkun
On 09:15 pm, ch...@simplistix.co.uk wrote: Hi All, I have this simple function: def execute(command): process = Popen(command.split(),stderr=STDOUT,stdout=PIPE) return process.communicate()[0] ..but my unit test for it fails: from testfixtures import tempdir,compare from unittest impo

Re: Dangerous behavior of list(generator)

2009-12-14 Thread exarkun
On 06:00 pm, tjre...@udel.edu wrote: On 12/14/2009 10:21 AM, exar...@twistedmatrix.com wrote: I'm asking about why the behavior of a StopIteration exception being handled from the `expression` of a generator expression to mean "stop the loop" is accepted by "the devs" as acceptable. Any unhand

Re: Dangerous behavior of list(generator)

2009-12-14 Thread exarkun
On 02:58 pm, m...@egenix.com wrote: exar...@twistedmatrix.com wrote: On 08:45 am, tjre...@udel.edu wrote: Tom Machinski wrote: In most cases, `list(generator)` works as expected. Thus, `list()` is generally equivalent to `[ expression>]`. Here's a minimal case where this equivalence breaks,

Re: Dangerous behavior of list(generator)

2009-12-14 Thread exarkun
On 06:46 am, tjre...@udel.edu wrote: On 12/13/2009 10:29 PM, exar...@twistedmatrix.com wrote: Doesn't matter. Sometimes it makes sense to call it directly. It only makes sense to call next (or .__next__) when you are prepared to explicitly catch StopIteration within a try..except construct.

Re: Dangerous behavior of list(generator)

2009-12-13 Thread exarkun
On 04:11 am, ste...@remove.this.cybersource.com.au wrote: On Sun, 13 Dec 2009 22:45:58 +, exarkun wrote: On 08:18 pm, st...@remove-this-cybersource.com.au wrote: On Sun, 13 Dec 2009 14:35:21 +, exarkun wrote: StopIteration is intended to be used only within the .__next__ method of

Re: Dangerous behavior of list(generator)

2009-12-13 Thread exarkun
On 02:50 am, lie.1...@gmail.com wrote: On 12/14/2009 9:45 AM, exar...@twistedmatrix.com wrote: On 08:18 pm, st...@remove-this-cybersource.com.au wrote: On Sun, 13 Dec 2009 14:35:21 +, exarkun wrote: StopIteration is intended to be used only within the .__next__ method of iterators. The

Re: Dangerous behavior of list(generator)

2009-12-13 Thread exarkun
On 08:18 pm, st...@remove-this-cybersource.com.au wrote: On Sun, 13 Dec 2009 14:35:21 +, exarkun wrote: StopIteration is intended to be used only within the .__next__ method of iterators. The devs know that other 'off-label' use results in the inconsistency you noted, but their a

Re: Dangerous behavior of list(generator)

2009-12-13 Thread exarkun
On 08:45 am, tjre...@udel.edu wrote: Tom Machinski wrote: In most cases, `list(generator)` works as expected. Thus, `list()` is generally equivalent to `[]`. Here's a minimal case where this equivalence breaks, causing a serious and hard-to-detect bug in a program: >>> def sit(): raise StopI

Re: Socket question

2009-12-03 Thread exarkun
On 02:52 pm, fasteliteprogram...@gmail.com wrote: Is there away in python i can connect to a server in socket to two servers at the same time or can't it be done? I'm not sure what you're asking. Can you clarify? Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Twisted 9.0.0

2009-12-02 Thread exarkun
On 12:18 am, tjre...@udel.edu wrote: Christopher Armstrong wrote: = Twisted 9.0.0 = I'm happy to announce Twisted 9, the first (and last) release of Twisted in 2009. The previous release was Twisted 8.2 in December of 2008. Given that, a lot has changed! This release supports Python 2.3 throug

Re: Can't print Chinese to HTTP

2009-11-30 Thread exarkun
On 05:05 pm, gnarlodi...@gmail.com wrote: Thanks for the help, but it doesn't work. All I get is an error like: UnicodeEncodeError: 'ascii' codec can't encode character '\\u0107' in position 0: ordinal not in range(128) It does work in Terminal interactively, after I import the sys module. But

Re: Imitating "tail -f"

2009-11-30 Thread exarkun
On 11:15 am, p...@boddie.org.uk wrote: On 22 Nov, 05:10, exar...@twistedmatrix.com wrote: "tail -f" is implemented by sleeping a little bit and then reading to see if there's anything new. This was the apparent assertion behind the "99 Bottles" concurrency example: http://wiki.python.org/moi

Re: Imitating "tail -f"

2009-11-21 Thread exarkun
On 02:43 am, ivo...@gmail.com wrote: I'm trying to simply imitate what "tail -f" does, i.e. read a file, wait until it's appended to and process the new data, but apparently I'm missing something. The code is: 54 f = file(filename, "r", 1) 55 f.seek(-1000, os.SEEK_END) 56 ff = fcnt

Re: checking 'type' programmatically

2009-11-20 Thread exarkun
On 10:10 am, mrk...@gmail.com wrote: Disclaimer: this is for exploring and debugging only. Really. I can check type or __class__ in the interactive interpreter: Python 2.6.2 (r262:71600, Jun 16 2009, 16:49:04) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits

Re: WindowsError is not available on linux?

2009-11-18 Thread exarkun
On 07:53 pm, a...@pythoncraft.com wrote: In article , Peng Yu wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the document. Here's what I told a co-worker to do yesterday: if os.name == 'nt': DiskError = (OSError, WindowsError) else: DiskEr

Re: Logic operators with "in" statement

2009-11-16 Thread exarkun
On 02:02 pm, mr.spoo...@gmail.com wrote: Hi, I'm trying to use logical operators (or, and) with the "in" statement, but I'm having some problems to understand their behavior. "and" and "or" have no particular interaction with "in". In [1]: l = ['3', 'no3', 'b3'] In [2]: '3' in l Out[2]: True

Re: Stagnant Frame Data?

2009-11-15 Thread exarkun
On 04:00 pm, __pete...@web.de wrote: Mike wrote: I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes, "AutoChecker" and "Snapshot" that evaluate vari

[ANN] pyOpenSSL 0.10

2009-11-13 Thread exarkun
I'm happy to announce the release of pyOpenSSL 0.10. pyOpenSSL 0.10 exposes several more OpenSSL APIs, including support for running TLS connections over in-memory BIOs, access to the OpenSSL random number generator, the ability to pass subject and issuer parameters when creating an X509Extens

Re: Cancelling a python thread (revisited...)

2009-11-08 Thread exarkun
On 12:40 pm, s...@uni-hd.de wrote: On Nov 8, 4:27�am, Carl Banks wrote: It doesn't sound like the thread is communicating with the process much. �Therefore: There is quite a bit of communication -- the computation results are visulized while they are generated. I'm curious how this visualiz

Re: Most efficient way to "pre-grow" a list?

2009-11-07 Thread exarkun
On 01:18 am, pavlovevide...@gmail.com wrote: On Nov 7, 5:05�pm, sturlamolden wrote: On 7 Nov, 03:46, gil_johnson wrote:> > I don't have the code with me, but for huge arrays, I have used > something like: > >>> arr[0] = initializer > >>> for i in range N: > >>> � � �arr.extend(arr) > This d

Re: Aaaargh! "global name 'eggz' is not defined"

2009-10-29 Thread exarkun
On 09:52 pm, a...@pythoncraft.com wrote: In article , Robert Kern wrote: I like using pyflakes. It catches most of these kinds of typo errors, but is much faster than pylint or pychecker. Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with "imp

Re: Web development with Python 3.1

2009-10-25 Thread exarkun
On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting "don't - start with 2.6"), but as far as I can see, none of the popular python-to-web fr

Re: (from stdlib-sig) ctypes or struct from an h file

2009-10-18 Thread exarkun
On 08:13 pm, de...@nospam.web.de wrote: Yuvgoog Greenle schrieb: Is there a way that Python and C can have a shared definition for a binary data structure? It could be nice if: 1. struct or ctypes had a function that could parse a .h/.c/.cpp file to auto-generate constructors or 2. a ctypes def

Re: pickle's backward compatibility

2009-10-13 Thread exarkun
On 02:48 pm, m...@egenix.com wrote: exar...@twistedmatrix.com wrote: On 03:17 pm, pengyu...@gmail.com wrote: Hi, If I define my own class and use pickle to serialize the objects in this class, will the serialized object be successfully read in later version of python. What if I serialize (usi

Re: pickle's backward compatibility

2009-10-12 Thread exarkun
On 03:17 pm, pengyu...@gmail.com wrote: Hi, If I define my own class and use pickle to serialize the objects in this class, will the serialized object be successfully read in later version of python. What if I serialize (using pickle) an object of a class defined in python library, will it be s

Re: What do I do now?

2009-10-12 Thread exarkun
On 11 Oct, 10:53 pm, fordhai...@gmail.com wrote: I've been programming since about 3 years, and come to think of it never written anything large. I know a few languages: c, python, perl, java. Right now, I just write little IRC bots that basically don't do anything. I have two questions: 1) W

Re: Concurrent threads to pull web pages?

2009-10-02 Thread exarkun
On 05:48 am, wlfr...@ix.netcom.com wrote: On Fri, 02 Oct 2009 01:33:18 -, exar...@twistedmatrix.com declaimed the following in gmane.comp.python.general: There's no need to use threads for this. Have a look at Twisted: http://twistedmatrix.com/trac/ Strange... While I can easil

Re: Concurrent threads to pull web pages?

2009-10-01 Thread exarkun
On 01:36 am, k...@kyleterry.com wrote: On Thu, Oct 1, 2009 at 6:33 PM, wrote: On 1 Oct, 09:28 am, nos...@nospam.com wrote: Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each company's web page from a rem

Re: Concurrent threads to pull web pages?

2009-10-01 Thread exarkun
On 1 Oct, 09:28 am, nos...@nospam.com wrote: Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each company's web page from a remote server, eg. www.acme.com/company.php?id=1, and use regexes to extract some in

Re: Python RPG Codebase

2009-10-01 Thread exarkun
On 05:46 am, jackd...@gmail.com wrote: On Thu, Oct 1, 2009 at 1:22 AM, Lanny wrote: I've been thinking about putting together a text based RPG written fully in Python, possibly expanding to a MUD system. I'd like to know if anyone feels any kind of need for this thing or if I'd be wasting my ti

Re: Re: Twisted PB: returning result as soon as ready

2009-09-28 Thread exarkun
On 06:06 am, jacopo.pe...@gmail.com wrote: Jean-Paul, thanks a lot for your patient. I have read most of a the 1CThe Twisted Documentation 1D which I think is very good for Deferred and ok for PB but it is really lacking on the Reactor. In my case it looks like this is key to achieve what I ha

Re: Twisted PB: returning result as soon as ready

2009-09-28 Thread exarkun
On 25 Sep, 01:25 pm, jacopo.pe...@gmail.com wrote: In the following chunk of code the CLIENT receives both the results from 1Ccompute 1D at the same time (i.e. when the second one has finished). This way it cannot start 1CelaborateResult 1D on the first result while the SERVER is still running

Re: Catch script hangs

2009-09-27 Thread exarkun
On 10:40 pm, ba...@ymail.com wrote: Due to an ftp server issue, my python script sometimes hangs whilst downloading, unable to receive any more data. Is there any way that I could have python check, maybe through a thread or something, whether it has hanged (or just, if it's still active after 10

Re: Twisted: 1 thread in the reactor pattern

2009-09-26 Thread exarkun
On 25 Sep, 05:25 am, jacopo.pe...@gmail.com wrote: On Sep 24, 7:54�pm, exar...@twistedmatrix.com wrote: On 07:10 am, jacopo.pe...@gmail.com wrote: >On Sep 23, 5:57�pm, exar...@twistedmatrix.com wrote: >[snip] [snip] If you have a function that takes 5 minutes to run, then you're blocking the

Re: is this whiff/wsgi claim true?

2009-09-26 Thread exarkun
On 25 Sep, 02:26 pm, aaron.watt...@gmail.com wrote: Hi folks. I just modified the WHIFF concepts index page http://aaron.oirt.rutgers.edu/myapp/docs/W1000.concepts To include the following paragraph with a startling and arrogant claim in the final sentence :) """ Developers build WHIFF app

Re: Twisted: 1 thread in the reactor pattern

2009-09-24 Thread exarkun
On 07:10 am, jacopo.pe...@gmail.com wrote: On Sep 23, 5:57�pm, exar...@twistedmatrix.com wrote: [snip] It isn't possible. �While the remote methods are running, other events are not being serviced. �This is what is meant when people describe Twisted as a "*cooperative* multitasking" syste

Re: Single line output, updating output in place

2009-09-23 Thread exarkun
On 04:11 am, tusklah...@gmail.com wrote: Hello, I'm a newb and have been playing with Python trying to print a changing value to the screen that updates as the value changes. I have this code, which is pretty much doing what I want: #!/usr/bin/env python3 import time text = input('Please ent

Re: Most "active" coroutine library project?

2009-09-23 Thread exarkun
On 10:18 pm, t...@urandom.ca wrote: On Wed, 2009-09-23 at 22:07 +, exar...@twistedmatrix.com wrote: Sure, no value judgement intended, except on the practice of taking words with well established meanings and re-using them for something else ;) I think it's the behaviour that's important,

Re: Most "active" coroutine library project?

2009-09-23 Thread exarkun
On 10:00 pm, t...@urandom.ca wrote: On Wed, 2009-09-23 at 21:53 +, exar...@twistedmatrix.com wrote: I specifically left out all "yield" statements in my version, since that's exactly the point here. :) With "real" coroutines, they're not necessary - coroutine calls look just like any other

Re: Most "active" coroutine library project?

2009-09-23 Thread exarkun
On 09:40 pm, t...@urandom.ca wrote: On Wed, 2009-09-23 at 20:50 +, exar...@twistedmatrix.com wrote: immediately outside the generator. This means that you cannot use "enhanced generators" to implement an API like this one: def doSomeNetworkStuff(): s = corolib.socket()

Re: Most "active" coroutine library project?

2009-09-23 Thread exarkun
On 08:16 pm, sajmik...@gmail.com wrote: On Wed, Sep 23, 2009 at 2:05 PM, wrote: [snip] But what some Python programmers call coroutines aren't really the same as what the programming community at large would call a coroutine. Jean-Paul Really? I'm curious as to the differences. (I just

Re: Twisted 100% event driven or hybrid?

2009-09-23 Thread exarkun
On 05:48 pm, mcfle...@vrplumber.com wrote: exar...@twistedmatrix.com wrote: On 05:55 am, jacopo.pe...@gmail.com wrote: ... results to be ready, I collect and process them. From now on I don 19t need a the system to be event drive any more, the processing should occur only on the master machin

Re: Most "active" coroutine library project?

2009-09-23 Thread exarkun
On 05:00 pm, sajmik...@gmail.com wrote: On Sun, Aug 23, 2009 at 11:02 AM, Phillip B Oldham wrote: I've been taking a look at the multitude of coroutine libraries available for Python, but from the looks of the projects they all seem to be rather "quiet". I'd like to pick one up to use on a curr

Re: Twisted: 1 thread in the reactor pattern

2009-09-23 Thread exarkun
On 06:08 am, jacopo.pe...@gmail.com wrote: I am diving into Twisted and Perspective Broker (PB) in particular and I would like to understand more about what happens behind the curtains. Say I have a client and a server on two different machines, the server gets callRemote() 19s in an asynchronous

Re: Twisted 100% event driven or hybrid?

2009-09-23 Thread exarkun
On 05:55 am, jacopo.pe...@gmail.com wrote: I am diving into Twisted and Perspective Broker (PB) in particular. I am designing a system having several models running on different machines, they need to be recalculated periodically, I have to collect the results, process them and start again from

Re: socket send O(N**2) complexity

2009-09-21 Thread exarkun
On 08:00 pm, r...@freenet.co.uk wrote: Zac Burns wrote in news:mailman.211.1253559803.2807.python- l...@python.org in comp.lang.python: The mysocket.mysend method given at http://docs.python.org/howto/sockets.html has an (unwitting?) O(N**2) complexity for long msg due to the string slicing. I

Re: How python source code in large projects are organized?

2009-09-20 Thread exarkun
On 07:10 pm, pengyu...@gmail.com wrote: On Sun, Sep 20, 2009 at 11:31 AM, Daniel Fetchinson wrote: I am wondering what is the best way of organizing python source code in a large projects. There are package code, testing code. I'm wondering if there has been any summary on previous practices.

Re: pyjamas pyv8run converts python to javascript, executes under command-line

2009-09-19 Thread exarkun
On 19 Sep, 11:04 pm, robert.k...@gmail.com wrote: Daniel Fetchinson wrote: the pyjamas project is taking a slightly different approach to achieve this same goal: beat the stuffing out of the pyjamas compiler, rather than hand-write such large sections of code in pure javascript, and double-run

Re: VT100 in Python

2009-09-14 Thread exarkun
On 09:29 am, n...@craig-wood.com wrote: Wolfgang Rohdewald wrote: On Sunday 13 September 2009, Nadav Chernin wrote: > I'm writing program that read data from some instrument trough > RS232. This instrument send data in VT100 format. I need only to > extract the text without all other charact

Re: Programming ideas?

2009-09-12 Thread exarkun
On 02:30 pm, fordhai...@gmail.com wrote: Thanks a lot! Also, can someone suggest some ideas for a medium sized or small sized project? Here are some things you could do to contribute to an existing project: http://bit.ly/easy-twisted-tickets Jean-Paul -- http://mail.python.org/mailman/listi

Re: python and openSSL

2009-09-09 Thread exarkun
On 9 Sep, 01:30 pm, luca...@gmail.com wrote: Hi all. I need a trick to do something like this: openssl smime -decrypt -verify -inform DER -in ReadmeDiKe.pdf.p7m -noverify -out ReadmeDike.pdf To unwrap a p7m file and read his content. I know that I could use somthing like: import os os.system(

Re: First release of pyfsevents

2009-09-07 Thread exarkun
On 12:57 am, a...@pythoncraft.com wrote: In article 46f3-9a03-46f7125f5...@r5g2000yqi.googlegroups.com>, Nicolas Dumazet wrote: On Sep 3, 10:33=A0pm, a...@pythoncraft.com (Aahz) wrote: I'm curious why you went with FSEvents rather than kqueue. My company discovered that FSEvents is rather co

Re: HTTPS on Twisted

2009-09-07 Thread exarkun
On 07:20 pm, koranth...@gmail.com wrote: On Sep 6, 7:53�pm, koranthala wrote: Hi, � �For a financial application, �I am creating a python tool which uses HTTPS to transfer the data from client to server. Now, everything works perfectly, since the SSL support comes free with Twisted. � �I have o

Re: incorrect DeprecationWarning?

2009-09-05 Thread exarkun
On 02:28 pm, alan.is...@gmail.com wrote: I am not sure how best to deprecate dependence on the Python 2.5 mistake, but this is not it. And I know at least one important library that is affected. I'll agree that it's not great. I certainly would have preferred it not to have been done. It i

Re: incorrect DeprecationWarning?

2009-09-05 Thread exarkun
On 12:20 pm, alan.is...@gmail.com wrote: Alan G Isaac wrote: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. class MyError(Exception): ... def __init__(self, message): ... Exception.__

Re: Python community buildbot page still 503

2009-09-03 Thread exarkun
On 06:23 pm, mar...@v.loewis.de wrote: If I am not mistaken http://python.org/dev/buildbot/community/all/ has been down since python.org had its harddrive issues. Anyone know a time line on getting it back up and running. This service is, unfortunately, unmaintained. It broke when I upgraded t

Re: pickling question

2009-09-02 Thread exarkun
On 02:06 pm, gary...@me.com wrote: When you define a class in a script, and then pickle instances of that class in the same script and store them to disk, you can't load that pickle in another script. At least not the straightforward way [pickle.load(file('somefile.pickle'))]. If you try it, yo

  1   2   >