[ANN] pyOpenSSL 0.14

2014-02-24 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

[RELEASE] Nevow 0.11.1

2014-06-22 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

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

2009-10-29 Thread exarkun
On 09:52 pm, a...@pythoncraft.com wrote: In article mailman.2279.1256851983.2807.python-l...@python.org, Robert Kern robert.k...@gmail.com 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

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 sturlamol...@yahoo.no wrote: On 7 Nov, 03:46, gil_johnson gil_john...@earthlink.net 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:

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 pavlovevide...@gmail.com 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

[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

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

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 In

Re: WindowsError is not available on linux?

2009-11-18 Thread exarkun
On 07:53 pm, a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu pengyu...@gmail.com 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

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 or

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 =

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:

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: 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

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: 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(generator expression)` is generally equivalent to `[generator expression]`. Here's a minimal case where this equivalence breaks, causing a serious and hard-to-detect bug in

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 and my view

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

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

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-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(generator expression)` is generally equivalent to `[generator expression]`. Here's a minimal case

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 unhandled

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

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

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

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: 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

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 duncan.bo...@invalid.invalid 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

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

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 na...@animats.com 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,

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: 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 stu.dohe...@gmail.com 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

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

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 and...@acooke.org 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

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 mlm...@comcast.net 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

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: 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

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

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

Re: Asynchronous HTTP client

2010-03-07 Thread exarkun
On 02:40 pm, ping.nsr@gmail.com wrote: 2010/3/7 exar...@twistedmatrix.com 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/',

Re: web frameworks that support Python 3

2009-08-25 Thread exarkun
On 01:41 am, a...@pythoncraft.com wrote: In article e9b627c8-eb88-4312-8777-1b0064186...@v15g2000prn.googlegroups.com, Graham Dumpleton graham.dumple...@gmail.com wrote: On Aug 24, 6:34=A0am, Sebastian Wiesner basti.wies...@gmx.net wrote: In any case, there is bottle [1], which provides a

Re: Python Telnet client

2009-08-27 Thread exarkun
On 09:06 pm, nbdar...@gmail.com wrote: Is there telnet client in python? i want to write NetHack telnet GUI app) The Python stdlib has a module named telnetlib which offers rudamentary telnet support. Twisted includes twisted.conch.telnet which implements a much more complete telnet

Re: write Unicode to sys.out.write without access to sitecustomize.py

2009-08-28 Thread exarkun
On 02:51 pm, rk...@pobox.com wrote: I would like to tell the system that it's OK to write Unicode to sys.out and sys.err. However, I'm doing this in a CGI script where I don't have access to the system directories, and as such can't use sys.setdefaultencoding in sitecustomize.py. Is there

Re: Using select.kqueue()

2009-09-01 Thread exarkun
On 07:51 am, rite...@gmail.com wrote: Hi I am trying to use kqueue. Since, I am on v2.5, I use the baclport: http://pypi.python.org/pypi/select26/0.1a3. Following the example at: http://julipedia.blogspot.com/2004/10/example-of-kqueue.html (which works perfectly as it tells all events), I

Re: Python community buildbot page still 503

2009-09-01 Thread exarkun
On 07:27 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

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,

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

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): ...

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

Re: HTTPS on Twisted

2009-09-07 Thread exarkun
On 07:20 pm, koranth...@gmail.com wrote: On Sep 6, 7:53�pm, koranthala koranth...@gmail.com 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

Re: First release of pyfsevents

2009-09-07 Thread exarkun
On 12:57 am, a...@pythoncraft.com wrote: In article d103be2b-3f1e- 46f3-9a03-46f7125f5...@r5g2000yqi.googlegroups.com, Nicolas Dumazet nicd...@gmail.com 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

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

Re: VT100 in Python

2009-09-14 Thread exarkun
On 09:29 am, n...@craig-wood.com wrote: Wolfgang Rohdewald wolfg...@rohdewald.de 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

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

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 fetchin...@googlemail.com 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

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.

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: 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

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 phillip.old...@gmail.com 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

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

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, exar...@twistedmatrix.com 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

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 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 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: 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

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

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

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: 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

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: 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

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 lan.rogers.b...@gmail.com 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

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

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, exar...@twistedmatrix.com 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

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

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)

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

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

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

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

Re: how to overload operator (a x b)?

2009-08-07 Thread exarkun
On 12:50 pm, benjamin.kap...@case.edu wrote: On Fri, Aug 7, 2009 at 8:00 AM, dmitreydmitrey.kros...@scipy.org wrote: hi all, is it possible to overload operator �? (And other like this one, eg = �=, �, = �=) Any URL/example? Thank you in advance, D. That isn't an operator at all. Python

Re: Serial port access

2009-08-08 Thread exarkun
On 04:34 pm, nipunredde...@gmail.com wrote: Hi, How can we access serial port using usb-serial converters,using python in linux.I want to further use pyGTK for Gui development after accessing serial data. Twisted supports serial ports and has good Gtk integration.

Re: Twisted - how to get text for HTTP error responses

2009-08-09 Thread exarkun
On 03:35 pm, koranth...@gmail.com wrote: Hi, I am writing a HTTP client in Twisted. The client contacts the server, and any errors in the sent messages will be returned back to the client in 400 message. The reason for failure at the server is sent as the text in the 400 message. I tried the

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-11 Thread exarkun
On 11 Aug, 11:37 pm, pavlovevide...@gmail.com wrote: I will not take an opinion on whether Python's documentation is ideal (more on why below) but I will opine that the conclusion doesn't follow from your premise. People's expectations of what documentation should be are too different, there

Re: Need cleanup advice for multiline string

2009-08-12 Thread exarkun
On 01:27 pm, jeanmic...@sequans.com wrote: Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: There are gals too here. It's a figure of speech. And besides, why would I want programming advice from a woman? lol.

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread exarkun
On 01:38 pm, hend...@microcorp.co.za wrote: On Friday 14 August 2009 12:54:32 Diez B. Roggisch wrote: How about using pyserial? With that, I never had any problems accessing the the serial ports, and AFAIK no duplex-problems as well. And I seriously doubt that these are a python-related

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread exarkun
On 02:19 pm, inva...@invalid wrote: On 2009-08-14, exar...@twistedmatrix.com exar...@twistedmatrix.com wrote: One strategy you might employ to get rid of the busy looping is to use Twisted and its serial port support. This also addresses the full- duplex issue you've raised. There are no

Re: Python 'for' loop is memory inefficient

2009-08-16 Thread exarkun
On 01:23 am, benjamin.kap...@case.edu wrote: On Sun, Aug 16, 2009 at 6:35 PM, sturlamolden sturlamol...@yahoo.no wrote: A compiler could easily recognise a statement like � for i in range(n): as a simple integer loop. In fact, Cython is able to do this. but special cases aren't special

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 02:12 am, pavlovevide...@gmail.com wrote: On Aug 16, 3:35�pm, sturlamolden sturlamol...@yahoo.no wrote: On 16 Aug, 14:57, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:         Well, the alternative would be to have two keywords for looping: one for your simple incrementing integer

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 01:53 am, pavlovevide...@gmail.com wrote: On Aug 16, 6:28�pm, exar...@twistedmatrix.com wrote: On 01:23 am, benjamin.kap...@case.edu wrote: On Sun, Aug 16, 2009 at 6:35 PM, sturlamolden sturlamol...@yahoo.no wrote: A compiler could easily recognise a statement like � for i in range(n):

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 01:44 am, http wrote: exar...@twistedmatrix.com writes: Although I think PyPy also recognizes this case and makes it as efficient as using xrange, and does so without breaking any rules. How can pypy possibly know that the user hasn't assigned some other value to range? It doesn't really

Re: Python 'for' loop is memory inefficient

2009-08-17 Thread exarkun
On 06:32 pm, pavlovevide...@gmail.com wrote: On Aug 17, 4:40�am, exar...@twistedmatrix.com wrote: On 02:12 am, pavlovevide...@gmail.com wrote: On Aug 16, 3:35�pm, sturlamolden sturlamol...@yahoo.no wrote: On 16 Aug, 14:57, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: � � � �

Re: Python 'for' loop is memory inefficient

2009-08-18 Thread exarkun
On 03:56 am, tjre...@udel.edu wrote: exar...@twistedmatrix.com wrote: There's a lot of things in Python that I don't strictly *need*. That doesn't mean that they wouldn't be welcome if I could have them. Getting rid of the range/xrange dichotomy would improve things. The developers agreed a

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 method

Re: a +b ?

2010-06-13 Thread exarkun
On 04:25 pm, wuwe...@gmail.com wrote: Steven D'Aprano st...@remove-this-cybersource.com.au 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

[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

[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

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

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 several

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. You

  1   2   >