Re: Where's the Starship's crew?

2007-10-05 Thread exhuma.twn
On Oct 5, 10:31 am, Dick Moores <[EMAIL PROTECTED]> wrote: > > > I didn't check on all of them, but the only one I found was Mark > Hammond . > > Dick Moores Doing 6 random clicks, revealed: http://starship.py

Python + Shoutpy + Twisted Locks

2007-10-05 Thread exhuma.twn
Unfortunately I don't have the code at hand on this box, but maybe someone can give me a nudge in the right direction. Some background: Last year I began to write a jukebox system that provided a Telnet-like interface. I wrote this using "socket". Later along the path I discovered Twisted, and due

Re: Clustering text-documents in bundles

2007-09-25 Thread exhuma.twn
On Sep 25, 7:52 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > "exhuma.twn" <[EMAIL PROTECTED]> writes: > > Is it possible to calculate a distance between two chunks of text? I > > suppose one could simply do a simple word-count on the chunks > > (

Clustering text-documents in bundles

2007-09-25 Thread exhuma.twn
Hi, This *is* off-topic but with python being a language with a somewhat scientific audience, I might get lucky ;) I have a set of documents (helpdesk tickets in fact) and I would like to automatically collect them in bundles so I can visualise some statistics depending on content. A while ago I

Re: (pyqt) Parameters when connecting a signal to a method?

2007-09-24 Thread exhuma.twn
On Sep 24, 4:47 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > exhuma.twn wrote: > > Some code: > > > -- > > > def foobar(w): > >print w > > > QtCore.QObje

(pyqt) Parameters when connecting a signal to a method?

2007-09-24 Thread exhuma.twn
Some code: -- def foobar(w): print w QtCore.QObject,connect( my_line_edit, QtCore.SIGNAL("returnPressed()"), foobar ) -- How can I get this to work so "fo

Re: Using python to create windows apps that everyone can use?

2007-09-20 Thread exhuma.twn
On Sep 19, 9:46 pm, Simon Hibbs <[EMAIL PROTECTED]> wrote: > On 9/18/07, Thomas Harding <[EMAIL PROTECTED]> wrote: > > > Hi guys, sorry to post another topic on this, as I am aware that it > has > > already been posted a few times, but not with specifically what I > am looking > > for. I want a

Re: psycopg2 or pygresql?

2007-09-19 Thread exhuma.twn
On Sep 19, 5:47 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > exhuma.twn wrote: > > Plain and simple. What would you use? > > > So far I have written everything with psycopg2. One thing that annoys > > me is that I cannot easily access the column names from a quer

psycopg2 or pygresql?

2007-09-19 Thread exhuma.twn
Plain and simple. What would you use? So far I have written everything with psycopg2. One thing that annoys me is that I cannot easily access the column names from a query. I know that this is not part of the DBAPI2 so I cannot expect the model to suport it. I quite like the "mogrify" method of

Re: Keeping a database connection with a Singleton?

2007-09-19 Thread exhuma.twn
On Sep 19, 4:03 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > exhuma.twn wrote: > > On Sep 19, 3:45 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > >> exhuma.twn wrote: > > [...] > > >> By the way, there is a pythonic (near) singleton: the module

Re: Keeping a database connection with a Singleton?

2007-09-19 Thread exhuma.twn
On Sep 19, 3:45 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > exhuma.twn wrote: [...] > > By the way, there is a pythonic (near) singleton: the module. So if you go > with option 2, just move the connection setup into a separate module that > you can import into client cod

Keeping a database connection with a Singleton?

2007-09-19 Thread exhuma.twn
I remember reading about the Singleton pattern in python and how it's an unpythonic pattern and all. At the time I did not need the Singleton anyways, so I just glanced over the document. But, setting this aside: I have an application where I have a connection to a database. At some point in the a

Re: Using python to create windows apps that everyone can use?

2007-09-19 Thread exhuma.twn
On Sep 18, 9:22 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote: > On 9/18/07, Thomas Harding <[EMAIL PROTECTED]> wrote: > > > Hi guys, sorry to post another topic on this, as I am aware that it has > > already been posted a few times, but not with specifically what I am looking > > for. I want an ap

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-19 Thread exhuma.twn
On Sep 18, 11:58 pm, Richard Townsend <[EMAIL PROTECTED]> wrote: > On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson" > > <[EMAIL PROTECTED]> wrote: > >Tk is it. I'm really not interested in the others at this point. > > John Grayson's book 'Python and Tkinter Programming' has a chapter on > plotting

Re: Using python to create windows apps that everyone can use?

2007-09-18 Thread exhuma.twn
On Sep 18, 9:22 pm, "Matt McCredie" <[EMAIL PROTECTED]> wrote: > On 9/18/07, Thomas Harding <[EMAIL PROTECTED]> wrote: > > > Hi guys, sorry to post another topic on this, as I am aware that it has > > already been posted a few times, but not with specifically what I am looking > > for. I want an ap

Re: super, apply, or __init__ when subclassing?

2007-09-18 Thread exhuma.twn
On Sep 18, 2:50 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 18 Sep 2007 04:33:11 -0300, exhuma.twn <[EMAIL PROTECTED]> escribi?: > > > This is something that keeps confusing me. If you read examples of > > code on the web, you keep on seeing

Re: super, apply, or __init__ when subclassing?

2007-09-18 Thread exhuma.twn
On Sep 18, 2:45 pm, Bruno Desthuilliers wrote: > exhuma.twn a écrit : > > > This is something that keeps confusing me. If you read examples of > > code on the web, you keep on seeing these three calls (super, apply > > and __init__) to reference the super-class. T

super, apply, or __init__ when subclassing?

2007-09-18 Thread exhuma.twn
This is something that keeps confusing me. If you read examples of code on the web, you keep on seeing these three calls (super, apply and __init__) to reference the super-class. This looks to me as it is somehow personal preference. But this would conflict with the "There one way to do it" mind-se

easy_install only stable packages

2007-09-10 Thread exhuma.twn
easy_install is great. But it always automatically installs the *latest* version. Even if that is beta,alpha (or however else the developers call it). Is there no switch or possibility to disable this feature? So that it installs the latest *stable* version? I know that you can specify a specific

Re: Changing data in an QAbstractListModel

2007-09-07 Thread exhuma.twn
On Sep 7, 12:42 am, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Sep 6, 9:12 am, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > > > I defined a simple "update" method in the model which I call on > > certain events to fetch the new data in the DB. I

Changing data in an QAbstractListModel

2007-09-06 Thread exhuma.twn
Hi, I want to create a very simple read-only ListView. As the same data is used on various places in the UI, I decided to create a new ListView with a new Model instead of using the QListWidget. So far, the data displays correctly after setting it with "setModel" on the ListView. But how do I tell

twisted.web's xmlrpc with digest authencitation

2007-08-16 Thread exhuma.twn
I recently found a link[1] which demonstrates how to secure a xml-rpc service with basic HTTP-auth. But this get's send in clear-text over the net. There's also the HTTP-Digest auth mechanism which is apparently supported as well by twisted[2]. How do I secure an xml-rpc service using digest-auth

Re: Pasting an image from clipboard in Tkinter?

2007-06-12 Thread exhuma.twn
On Jun 12, 11:24 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Mon, 11 Jun 2007 14:23:48 +0200,exhuma.twn <[EMAIL PROTECTED]> wrote: > > As many might know, windows allows to copy an image into the clipboard > > by pressing the "Print Screen" butt

for ... else ?

2007-06-12 Thread exhuma.twn
On Jun 12, 6:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > [...] > > for number in range(10,100): > is_prime = True > for divisor in range(2,number): > if number % divisor == 0: > is_prime = False > break > if is_prime: > print nu

Re: Multiline lamba implementation in python.

2007-06-12 Thread exhuma.twn
On Jun 12, 5:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 12 Jun 2007 00:02:37 -0300, Josh Gilbert > <[EMAIL PROTECTED]> escribió: > > > I don't expect multiline lambdas to be added to Python. I'm not so sure > > that > > that's a bad thing. Regardless, isn't it possible to write

Re: Pasting an image from clipboard in Tkinter?

2007-06-11 Thread exhuma.twn
On Jun 11, 3:47 pm, [EMAIL PROTECTED] wrote: > On Jun 11, 7:23 am, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > > > > > As many might know, windows allows to copy an image into the clipboard > > by pressing the "Print Screen" button on the keyboard.

Pasting an image from clipboard in Tkinter?

2007-06-11 Thread exhuma.twn
As many might know, windows allows to copy an image into the clipboard by pressing the "Print Screen" button on the keyboard. Is it possible to paste such an image from the clipboard into a "Text" widget in Tkinter? Here is my first attempt with just trying to print out the image data: ---

Re: Approaches of interprocess communication

2007-02-16 Thread exhuma.twn
On Feb 16, 1:33 pm, Duncan Grisby <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > > exhuma.twn <[EMAIL PROTECTED]> wrote: > >Supposing you have two separate processes running on the same box, > >what approach would you suggest to com

Approaches of interprocess communication

2007-02-16 Thread exhuma.twn
Hi all, Supposing you have two separate processes running on the same box, what approach would you suggest to communicate between those two processes. Let me list the ones I know of: * Sockets Advantage: Supported per se in nearly every programming language without even the need to install ad

ZSI + mod_python

2007-02-15 Thread exhuma.twn
Hi, I tried for the last 2 hours now to somehow grasp how to use ZSI over mod_python. It's nice that they have a code-example in the ZSI docs, but it's incomplete and you are left guessing. The ZSI docs I used as reference can be found on http:// pywebsvcs.sourceforge.net/zsi.html#SECTION00313000

Re: Survey environment for Python?

2006-12-14 Thread exhuma.twn
Kay Schluehr wrote: > exhuma.twn schrieb: > > > Hi, > > > > Just recently I had to take over support for legacy software written in > > Blaise (www.cbs.nl). > > I don't understand the meaning of the link. Do you mean this language? > > http://blaise.

Survey environment for Python?

2006-12-14 Thread exhuma.twn
Hi, Just recently I had to take over support for legacy software written in Blaise (www.cbs.nl). As I did not know of this "Programming Language" until one year ago I started to learn it. Well more like "read it" as it's very very easy/simple. However, I don't feel comfortable in that languag

Re: What happened to RuleDispatch

2006-10-19 Thread exhuma.twn
On Oct 19, 5:32 pm, "Adam Jones" <[EMAIL PROTECTED]> wrote: > exhuma.twn wrote: > > On Oct 19, 3:44 pm, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > > > On Oct 18, 10:41 pm, "Adam Jones" <[EMAIL PROTECTED]> wrote: > > >

Re: What happened to RuleDispatch

2006-10-19 Thread exhuma.twn
On Oct 19, 3:44 pm, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > On Oct 18, 10:41 pm, "Adam Jones" <[EMAIL PROTECTED]> wrote: > > > > > exhuma.twn wrote: > > > Hi all, > > > > yesterday I wanted to install TurboGears, which depe

Re: What happened to RuleDispatch

2006-10-19 Thread exhuma.twn
On Oct 18, 10:41 pm, "Adam Jones" <[EMAIL PROTECTED]> wrote: > exhuma.twn wrote: > > Hi all, > > > yesterday I wanted to install TurboGears, which depends on > >RuleDispatch. However, I failed to download it. First I got the error > > "Bad Gatew

What happened to RuleDispatch

2006-10-17 Thread exhuma.twn
Hi all, yesterday I wanted to install TurboGears, which depends on RuleDispatch. However, I failed to download it. First I got the error "Bad Gateway" from the server, today it's simply a "Not Found" error. So what happened to it? Does somebody know? I would really need to install TurboGears in t

Re: mod_python + publisher + psp + session problems

2006-03-20 Thread exhuma.twn
[EMAIL PROTECTED] wrote: > exhuma.twn wrote: > > Hi again, > > > > as soon as I try to make use of the "session" object inside a > > psp-template file, I get the following error: > > > > Mod_python error: "PythonHandler mod_pyth

Re: combining mod_python handlers publisher and psp problem

2006-03-20 Thread exhuma.twn
[EMAIL PROTECTED] wrote: > You could also have done: > >def index(req, name='John'): > s = 'Hello, there!' > if name: > names = ['a', 'b', 'c'] > s = 'Hello, %s!' % name.capitalize() > tmpl = psp.PSP(req, filename='index.psp') > req.content_type

mod_python + publisher + psp + session problems

2006-03-20 Thread exhuma.twn
Hi again, as soon as I try to make use of the "session" object inside a psp-template file, I get the following error: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDis

Re: combining mod_python handlers publisher and psp problem

2006-03-20 Thread exhuma.twn
exhuma.twn wrote: > Simple problem: > > When I define a funtion the way you would with the publisher handler > (without using psp), all works as expected. However when I define a > publisher-like function and instantiate a PSP object in it ( as > suggested on > http://www.on

combining mod_python handlers publisher and psp problem

2006-03-20 Thread exhuma.twn
Simple problem: When I define a funtion the way you would with the publisher handler (without using psp), all works as expected. However when I define a publisher-like function and instantiate a PSP object in it ( as suggested on http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.ht