ANN: TakeNote 0.4.1 - Note taking and organization

2008-08-11 Thread rasmus
This release contains - several bug fixes - better support for HTML and image copy and paste - customizable word-wrap TakeNote is a simple cross-platform note taking program implemented in Python. I have been using it for my research and class notes, but it should be applicable to many note

ANN: yolk 0.4.1

2008-08-11 Thread Rob Cakebread
yolk 0.4.1 has been released. This is mainly a bugfix release. Changes: * Added HTTP proxy support for XML-RPC * -f is now case-insensitive * -S does not return the entire PyPI index if a package doesn't exist (this was fixed upstream in PyPI) * Check for integer with -L What is yolk?

[Elisa] Elisa Media Center 0.5.5 Release

2008-08-11 Thread Olivier Tilloy
Dear Elisa users, This mail announces the release of Elisa Media Center 0.5.5 codenamed Submission. An accent has been put on stability during this release cycle which resulted in 18 bugs fixed. We have also introduced new features and re-introduced some that were in the 0.3.x series and had

ANN: cssutils 0.9.5.1

2008-08-11 Thread Christof Hoeke
what is it -- A Python package to parse and build CSS Cascading Style Sheets. (Not a renderer though!) about this release -- 0.9.5.1 is a bugfix release. main changes 0.9.5.1 080811 + **BUGFIX**: Fixed parsing of ``}a,b`` which resulted in TypeError

Re: for x,y in word1, word2 ?

2008-08-11 Thread ssecorp
On Aug 11, 6:40 am, Mensanator [EMAIL PROTECTED] wrote: On Aug 10, 11:18 pm, ssecorp [EMAIL PROTECTED] wrote: Is there a syntax for looping through 2 iterables at the same time? for x in y: for a in b: is not what I want. I want: for x in y and for a in b: Something like this?

Re: Free software and video codecs (was: ANN: Chandler 1.0)

2008-08-11 Thread Kay Schluehr
On 11 Aug., 07:24, Ben Finney [EMAIL PROTECTED] wrote: Kay Schluehr [EMAIL PROTECTED] writes: On 11 Aug., 04:43, SPE - Stani's Python Editor [EMAIL PROTECTED] wrote: As an open source project please be kind to Linux users and provide also your screencasts in open source video standards

Re: for x,y in word1, word2 ?

2008-08-11 Thread Jon Clements
On Aug 11, 5:40 am, Mensanator [EMAIL PROTECTED] wrote: On Aug 10, 11:18 pm, ssecorp [EMAIL PROTECTED] wrote: Is there a syntax for looping through 2 iterables at the same time? for x in y: for a in b: is not what I want. I want: for x in y and for a in b: Something like this?

Re: Wildcards for regexps?

2008-08-11 Thread Diez B. Roggisch
ssecorp schrieb: If I have an expression like bob marley and I want to match everything with one letter wrong, how would I do? so bob narely and vob marley should match etc. Fuzzy matching is better done using Levensthein-distance [1] or n-gram-matching [2]. Diez [1]

Re: for x,y in word1, word2 ?

2008-08-11 Thread [EMAIL PROTECTED]
On Aug 10, 11:14 pm, ssecorp [EMAIL PROTECTED] wrote: On Aug 11, 6:40 am, Mensanator [EMAIL PROTECTED] wrote: On Aug 10, 11:18 pm, ssecorp [EMAIL PROTECTED] wrote: Is there a syntax for looping through 2 iterables at the same time? for x in y: for a in b: is not what I want.

Re: for x,y in word1, word2 ?

2008-08-11 Thread Marc 'BlackJack' Rintsch
On Sun, 10 Aug 2008 23:14:50 -0700, ssecorp wrote: I know zip but lets say I have a word painter and I want to compare it to a customer's spelling, he might have written paintor and I want to check how many letters are the same. Now I know how I could do this, it is not hard. I am just

Re: adding python libraries (for shared hosting)

2008-08-11 Thread Diez B. Roggisch
Joseph schrieb: Hi all, My shared host provides python 2.3. Since it is a shared hosting, he is not willing to upgrade to a newer version. He doesn't need to upgrade, he can install in parallel. I am looking for option to upload 2.5 on my own. Is this possible and if so, can anyone please

Re: shelve save object

2008-08-11 Thread alex23
hypermonkey2 wrote: In any case, I shelve into a file test.txt. I notice that when i try running the program on a different computer (by either emailing or transfering the file test.txt via USB key), the program is unable to load the shelve file. You might find the 3rd party module 'shove' is

updating dictionaries from/to dictionaries

2008-08-11 Thread Brandon
Hi all, I am not altogether experienced in Python, but I haven't been able to find a good example of the syntax that I'm looking for in any tutorial that I've seen. Hope somebody can point me in the right direction. This should be pretty simple: I have two dictionaries, foo and bar. I am

Re: updating dictionaries from/to dictionaries

2008-08-11 Thread Calvin Spealman
for k in foo: foo[k] += bar.get(k, 0) On Mon, Aug 11, 2008 at 3:27 AM, Brandon [EMAIL PROTECTED] wrote: Hi all, I am not altogether experienced in Python, but I haven't been able to find a good example of the syntax that I'm looking for in any tutorial that I've seen. Hope somebody can

Re: Second python program: classes, sorting

2008-08-11 Thread Eric Brunel
Others have replied to your original question. As an aside, just a few stylistic notes: class Score: def __init__(self, name_, score_): self.name = name_ self.score = score_ These trailing underscores look like a habit from another language. They are unneeded in

Re: Eclipse, Python, wxPython and code completion

2008-08-11 Thread leon . domingo
On 11 ago, 04:34, SPE - Stani's Python Editor [EMAIL PROTECTED] wrote: On 10 aug, 20:42, [EMAIL PROTECTED] wrote: Hello, I've installed Eclipse, Python 2.5 and wxPython on Ubuntu 8.04. The problem is that I can't get code completion for wx module. I don't know if it occurs the same

Re: benchmark

2008-08-11 Thread M8R-n7vorv
On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and never use psyco. But I guess for most of my work with Python performance hasn't been a issue. I

Re: updating dictionaries from/to dictionaries

2008-08-11 Thread John Machin
On Aug 11, 6:24 pm, Calvin Spealman [EMAIL PROTECTED] wrote: for k in foo:   foo[k] += bar.get(k, 0) An alternative: for k in bar: foo[k] += bar[k] The OP asserts that foo keys are a superset of bar keys. If that assertion is not true (i.e. there are keys in bar that are not in foo, your

Re: benchmark

2008-08-11 Thread cokofreedom
On Aug 11, 10:55 am, [EMAIL PROTECTED] wrote: On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and never use psyco. But I guess for most of my work

Printing a text file using Python

2008-08-11 Thread Robin Lee
Serge: in your code i believe that you did one read of your whole input file, and then you emitted that to the dc with textout. textout's use is actually (x,y,string). hence one line got printed (actually the whole file got printed but truncated) you will have to detect all the end of

Digitally sign PDF files

2008-08-11 Thread haxier
Hi all I'm developing an application with some reports and we're looking for advice. This reports should be openoffice.org .odf files, pdf files, and perhaps microsoft word files (.doc, .docx?) and must be digitally signed. Is out there some kind of libraries to ease this tasks? * Access to the

Re: ANN: P4D 1.2

2008-08-11 Thread Gerhard Häring
Kay Schluehr wrote: P4D = E4X style embedded DSL for Python but without E and X. The main feature of P4D 1.2 are *Bytelets*. While the primary purpose of P4D 1.1 was the support textual data which can be considered as isomorphic to XML the new release is focussed on binary data. Bytelets are P4D

Re: benchmark

2008-08-11 Thread Peter Otten
[EMAIL PROTECTED] wrote: On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and never use psyco. But I guess for most of my work with Python performance

Re: benchmark

2008-08-11 Thread M8R-n7vorv
On Aug 11, 2:09 pm, [EMAIL PROTECTED] wrote: On Aug 11, 10:55 am, [EMAIL PROTECTED] wrote: On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and

How to execute commands in internal zones of solaris using python running from the global zone ?

2008-08-11 Thread Hishaam
How to execute commands in internal zones of solaris using python running from the global zone ? i tried -- 1 os.popen(zlogin zone1) 2 os.popen(zonename) the 2nd command executes back into the global zone and not into the internal zone can anyone help? Hishaam --

DATICS'09 - Call For Papers

2008-08-11 Thread SS DATICS
Apologies for any multiple copies received. We would appreciate it if you could distribute the following call for papers to any relevant mailing lists you know of.

paretovariate

2008-08-11 Thread zhjchen
I want to realize a list of numbers. They follow pareto distribution. For instance, the average value is 10 and alpha is 1.0 I do not know how to use the function of paretovariate(alpha). It only provides alpha parameter. How should I set the average value? --

Re: SSH utility

2008-08-11 Thread Alan Franzoni
James Brady was kind enough to say: Hi all, I'm looking for a python library that lets me execute shell commands on remote machines. I've tried a few SSH utilities so far: paramiko, PySSH and pssh; unfortunately all been unreliable, and repeated questions on their respective mailing lists

Re: benchmark

2008-08-11 Thread Kris Kennaway
Peter Otten wrote: [EMAIL PROTECTED] wrote: On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and never use psyco. But I guess for most of my work with

Re: SSH utility

2008-08-11 Thread Kris Kennaway
James Brady wrote: Hi all, I'm looking for a python library that lets me execute shell commands on remote machines. I've tried a few SSH utilities so far: paramiko, PySSH and pssh; unfortunately all been unreliable, and repeated questions on their respective mailing lists haven't been

Jordan 3 paypal payment $28/pairs www.mall-aol.com ( http://photo.163.com/photos/huayuexiehang/106616893/ )

2008-08-11 Thread micahel
Please chat with me by www.mall-aol.comto get the price and more photos, we take paypal payment $28/pairs as payment. please see the photo album below for our product list. jordan shoes paypal payment $28/pairs www.mall-aol.com ( http://photo.163.com/photos/huayuexiehang/118447112/ ) jordan

Re: paretovariate

2008-08-11 Thread Casey
On Aug 11, 3:14 am, zhjchen [EMAIL PROTECTED] wrote: I want to realize a list of numbers. They follow pareto distribution. For instance, the average value is 10 and alpha is 1.0 I do not know how to use the function of paretovariate(alpha). It only provides alpha parameter. How should I set

Re: SSH utility

2008-08-11 Thread Edwin . Madari
for similar tasks, I use pexpect http://pypi.python.org/pypi/pexpect. spawning bash process and simulate an interactive session. Here sending ls command, retrieving results and exiting. In the spawned process ssh or any other command, is just another command. actual

Re: SSH utility

2008-08-11 Thread Jean-Paul Calderone
On Sun, 10 Aug 2008 21:25:38 -0700 (PDT), James Brady [EMAIL PROTECTED] wrote: Hi all, I'm looking for a python library that lets me execute shell commands on remote machines. I've tried a few SSH utilities so far: paramiko, PySSH and pssh; unfortunately all been unreliable, and repeated

Re: for x,y in word1, word2 ?

2008-08-11 Thread Edwin . Madari
sounds like *soundex* is what you are looking for. google soundex regards Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc 'BlackJack' Rintsch Sent: Monday, August 11, 2008 3:09 AM To: python-list@python.org Subject: Re: for x,y in word1,

Beta testing website

2008-08-11 Thread mike222
Hi All, This is a bit off-topic but may be of interest to some people. I have just found a website that looks interesting. It lets companies register their products for beta testing, and testers specify what sort of products that they would like to test. Sort of a beta testing

Suggestion for converting PDF files to HTML/txt files

2008-08-11 Thread srinivasan srinivas
Could someone suggest me ways to convert PDF files to HTML files?? Does Python have any modules to do that job?? Thanks, Srini Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ --

Re: SSH utility

2008-08-11 Thread Michael Mabin
I use pexpect. On Mon, Aug 11, 2008 at 7:22 AM, Jean-Paul Calderone [EMAIL PROTECTED]wrote: On Sun, 10 Aug 2008 21:25:38 -0700 (PDT), James Brady [EMAIL PROTECTED] wrote: Hi all, I'm looking for a python library that lets me execute shell commands on remote machines. I've tried a few

if len(str(a)) == len(str(r)) and isMult(a, r): faster if isMult is slow?

2008-08-11 Thread maestro
If isMult is slow then: if len(str(a)) == len(str(r)) and isMult(a, r): trues.append((a, r)) will be much faster than: if isMult(a, r) and len(str(a)) == len(str(r)): trues.append((a, r)) right? seems obvious but there is no magic going on that wouldn't make

Re: if len(str(a)) == len(str(r)) and isMult(a, r): faster if isMult is slow?

2008-08-11 Thread Chris
On Aug 11, 3:03 pm, maestro [EMAIL PROTECTED] wrote: If isMult is slow then: if len(str(a)) == len(str(r)) and isMult(a, r):                 trues.append((a, r)) will be much faster than: if isMult(a, r) and len(str(a)) == len(str(r)):                 trues.append((a, r)) right? seems

Re: Video information

2008-08-11 Thread Geoffrey Clements
Bill McClain [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2008-08-09, dusans [EMAIL PROTECTED] wrote: Is there a py module, which would get me information of a movie file: - resolution - fps I don't know of one. I use the transcode utilities for this and parse their

dynamically creating html code with python...

2008-08-11 Thread anartz
Hi, how can I combine some dynamically generated html code (using python) with the output of a urllib.openurl() call? I have tried to use the StringIO() class with .write functions, but it did not work. Below is the code that does not work. [CODE] f=StringIO.StringIO()

Re: dynamically creating html code with python...

2008-08-11 Thread Carsten Haese
[EMAIL PROTECTED] wrote: Hi, how can I combine some dynamically generated html code (using python) with the output of a urllib.openurl() call? I have tried to use the StringIO() class with .write functions, but it did not work. Below is the code that does not work. Help us help you. Does

Re: dynamically creating html code with python...

2008-08-11 Thread Jerry Hill
On Mon, Aug 11, 2008 at 9:15 AM, [EMAIL PROTECTED] wrote: [CODE] f=StringIO.StringIO() f.write('htmlheadtitledata analysis/title/headbody') f.write(urllib.urlopen(http://localhost/path2Libs/myLibs.py;, urllib.urlencode(TheData))) f.write(/body/html) print Content-type: text/html\n print

Re: Suggestion for converting PDF files to HTML/txt files

2008-08-11 Thread brad
srinivasan srinivas wrote: Could someone suggest me ways to convert PDF files to HTML files?? Does Python have any modules to do that job?? Thanks, Srini Unless there is some recent development, the answer is no, it's not possible. Getting text out of PDF is difficult (to say the least) and

RE: internet searching program

2008-08-11 Thread Support Desk
Google does'nt allow use of their API's anymore, I belive Yahoo has one or you could do something like below. searchstring = 'stuff here' x = os.popen('lynx -dump http://www.google.com/search?q=%s' % searchstring).readlines() -Original Message- From: Steven D'Aprano [mailto:[EMAIL

Unable to read data from transport connection

2008-08-11 Thread abhishek
Hello group, i am running a web server on cherrypy 2.2.0 using python2.5 and turbogears1.0. I have a client application in C#.NET which uploads the data on to web server over HTTP. Very frequently i encounter error logs on my client application which says -- Unable to read data from

Re: Second python program: classes, sorting

2008-08-11 Thread Bruno Desthuilliers
WP a écrit : Hello, here are some new things I've problems with. I've made a program that opens and reads a text file. Each line in the file contains a name and a score. I'm assuming the file has the correct format. Each name-score pair is used to instantiate a class Score I've written. This

at_most: search dictionary for less than or equal

2008-08-11 Thread slais-www
Before I set out to reinvent the wheel. I want a dictionary-like structure for which most lookups will be on a key that is not in the dictionary; in which case I want a key/value returned which is the closest key that is less than the search term. The batch solution of matching the values

Re: at_most: search dictionary for less than or equal

2008-08-11 Thread bearophileHUGS
slais-www, a BK-tree maybe isn't right what you need but it may be enough: http://code.activestate.com/recipes/572156/ Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: How to execute commands in internal zones of solaris using python running from the global zone ?

2008-08-11 Thread Calvin Spealman
You might try subprocess, first of all. Use it to launch zlogin and then treat it like a shell and write 'zonename\n' to its stdin, to simulate running it as a user. This is a good bet, but I don't have either available to try it. The subprocess documentation covers invoking a process and writing

Re: at_most: search dictionary for less than or equal

2008-08-11 Thread Paul McGuire
On Aug 11, 9:18 am, slais-www [EMAIL PROTECTED] wrote: Before I set out to reinvent the wheel. I want a dictionary-like structure for which most lookups will be on a key that is not in the dictionary; in which case I want a key/value returned which is the closest key that is less than the

eval or execute, is this the (most) correct way ?

2008-08-11 Thread Stef Mientki
hello, I'm trying to make an editor with an integrated Shell. So when type: 2+5 I want the answer on the next line: 7 When I type: myvar = 55 myvar I want the value of myvar: 55 So AFAIK, sometimes I've to use eval and sometimes I need exec, so I use the following code (global / local

Re: dynamically creating html code with python...

2008-08-11 Thread anartz
Sorry, my fault... I am trying to build a web application for data analysis. Basically some data will be read from a database and passed to a python script (myLibs.py) to build an image as follows. [CODE] f=urllib.urlopen(http://localhost/path2Libs/myLibs.py,urllib.urlencode(TheData)) print

Re: Python for Blackberry mobile phones

2008-08-11 Thread Timothy Grant
On Sun, Aug 10, 2008 at 9:54 PM, [EMAIL PROTECTED] wrote: I'm looking for a version of Python for Blackberry mobile phones - has anyone heard of such a thing? I've been googling this topic without success. Thanks, Malcolm My understanding is that the BB's run Java, so there *may* be some

Re: Wildcards for regexps?

2008-08-11 Thread Timothy Grant
On Sun, Aug 10, 2008 at 9:10 PM, ssecorp [EMAIL PROTECTED] wrote: If I have an expression like bob marley and I want to match everything with one letter wrong, how would I do? so bob narely and vob marley should match etc. At one point I needed something like this so did a straight port of the

Re: for x,y in word1, word2 ?

2008-08-11 Thread Casey
My first thought is that you should be looking at implementations of Hamming Distance. If you are actually looking for something like SOUNDEX you might also want to look at the double metaphor algorithm, which is significantly harder to implement but provides better matching and is less

Re: Eclipse, Python, wxPython and code completion

2008-08-11 Thread azrael
if you need a good python ide with great code completition, then why don't you try WingIde. On 11 kol, 10:49, [EMAIL PROTECTED] wrote: On 11 ago, 04:34, SPE - Stani's Python Editor [EMAIL PROTECTED] wrote: On 10 aug, 20:42, [EMAIL PROTECTED] wrote: Hello, I've installed

Problems returning data from embedded Python

2008-08-11 Thread Cromulent
Okay I'm having a few issues with this and I can't seem to get it sorted out (most likely due to my inexperience with Python). Here is my Python code: def fileInput(): data = [] s = raw_input(Please enter the filename to process (enter full path if not in current directory): )

Re: Psycho question

2008-08-11 Thread David C. Ullrich
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: John Krukoff: One possibility for the performance difference, is that as I understand it the psyco developer has moved on to working on pypy, and probably isn't interested in keeping psyco updated and optimized for new python

Re: dynamically creating html code with python...

2008-08-11 Thread anartz
I have tried calling a script containing the code below from a web browser and it did not get the text. [CODE] #!c:/Python25/python.exe -u import StringIO f=StringIO.StringIO() f.write('htmlheadtitledata analysis site/title/headbody') f.write(pThis is a trial test/p) f.write(/body/html) print

Re: eval or execute, is this the (most) correct way ?

2008-08-11 Thread Steven D'Aprano
On Mon, 11 Aug 2008 17:26:56 +0200, Stef Mientki wrote: I'm trying to make an editor with an integrated Shell. ... Is this the (most) correct / elegant way, or are there better solutions ? The best solution is not to re-invent the wheel: import code is the way to emulate Python's

Re: New python module to simulate arbitrary fixed and infinite precision binary floating point

2008-08-11 Thread Steven D'Aprano
On Sun, 10 Aug 2008 16:34:34 -0400, Rob Clewley wrote: Dear Pythonistas, How many times have we seen posts recently along the lines of why is it that 0.1 appears as 0.10001 in python? that lead to posters being sent to the definition of the IEEE 754 standard and the decimal.py

Re: ANN: P4D 1.2

2008-08-11 Thread Kay Schluehr
On 11 Aug., 11:41, Gerhard Häring [EMAIL PROTECTED] wrote: Kay Schluehr wrote: P4D = E4X style embedded DSL for Python but without E and X. The main feature of P4D 1.2 are *Bytelets*. While the primary purpose of P4D 1.1 was the support textual data which can be considered as isomorphic

Re: dynamically creating html code with python...

2008-08-11 Thread Jerry Hill
On Mon, Aug 11, 2008 at 12:26 PM, [EMAIL PROTECTED] wrote: I have tried calling a script containing the code below from a web browser and it did not get the text. You quoted my post that answered this question, but did not implement either of the two solutions I suggested. I continue to

pympi and threading in python

2008-08-11 Thread Dina Ali
Hello there I am confused in the usage/differences of pympi and threading in python. What I want to do it to run multiple MCMC simulations by dividing the number of the chains I want to run on number of the processors available. Some methods need to be synchronized/locked until some addition

Re: benchmark

2008-08-11 Thread Peter Otten
Kris Kennaway wrote: Peter Otten wrote: [EMAIL PROTECTED] wrote: On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and never use psyco. But I guess for

Re: updating dictionaries from/to dictionaries

2008-08-11 Thread Steven D'Aprano
On Mon, 11 Aug 2008 00:27:46 -0700, Brandon wrote: This should be pretty simple: I have two dictionaries, foo and bar. I am certain that all keys in bar belong to foo as well, but I also know that not all keys in foo exist in bar. All the keys in both foo and bar are tuples (in the bigram

Re: dynamically creating html code with python...

2008-08-11 Thread anartz
Hi, Thanks for your patience. I got the text displayed in the web browser with the following code: [CODE] f=StringIO.StringIO() f.write('htmlheadtitledata analysis site/title/headbody') f.write(pThis is a trial test/p) f.write(/body/html) print Content-type: text/html\n print f.getvalue()

Re: benchmark

2008-08-11 Thread bearophileHUGS
Peter Otten: In general I think that if you want to promote a particular coding style you should pick an example where you can demonstrate actual benefits. That good thing is that Python 3 has only xrange (named range), so this discussion will be mostly over ;-) Bye, bearophile --

Re: New python module to simulate arbitrary fixed and infinite precision binary floating point

2008-08-11 Thread Rob Clewley
Is this related to minifloats? http://en.wikipedia.org/wiki/Minifloat Strictly speaking, yes, although after a brief introduction to the general idea, the entry on that page focuses entirely on the interpretation of the values as integers. My code *only* represents the values in the same way

Re: benchmark

2008-08-11 Thread Kris Kennaway
Peter Otten wrote: Kris Kennaway wrote: Peter Otten wrote: [EMAIL PROTECTED] wrote: On Aug 10, 10:10 pm, Kris Kennaway [EMAIL PROTECTED] wrote: jlist wrote: I think what makes more sense is to compare the code one most typically writes. In my case, I always use range() and never use

dict.update() useful or not?

2008-08-11 Thread Steven D'Aprano
dict1.update(dict2) is of course equivalent to this code: for key, value in dict2.iteritems(): dict1[key] = value Note that it replaces values in dict1 with the value taken from dict2. I don't know about other people, but I more often want to keep the values in dict1 regardless of what's

Re: eval or execute, is this the (most) correct way ?

2008-08-11 Thread Stef Mientki
Steven D'Aprano wrote: On Mon, 11 Aug 2008 17:26:56 +0200, Stef Mientki wrote: I'm trying to make an editor with an integrated Shell. ... Is this the (most) correct / elegant way, or are there better solutions ? The best solution is not to re-invent the wheel: import code

Re: dict.update() useful or not?

2008-08-11 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: dict1.update(dict2) is of course equivalent to this code: for key, value in dict2.iteritems(): dict1[key] = value Note that it replaces values in dict1 with the value taken from dict2. I don't know about other people, but I more often want to

Re: dynamically creating html code with python...

2008-08-11 Thread Timothy Grant
On Mon, Aug 11, 2008 at 10:05 AM, [EMAIL PROTECTED] wrote: Hi, Thanks for your patience. I got the text displayed in the web browser with the following code: [CODE] f=StringIO.StringIO() f.write('htmlheadtitledata analysis site/title/headbody') f.write(pThis is a trial test/p)

Re: Missing exceptions in PEP 3107

2008-08-11 Thread Matimus
Maybe the following syntax would be even more intuitive: def foo(a: a info, b: b info) return ret info raise exc info:         return hello world I don't know how determined the - syntax is already. That seems much more intuitive and extensible. The - syntax has always bothered me. The main

Re: Video information

2008-08-11 Thread Peter Otten
dusans wrote: Is there a py module, which would get me information of a movie file: - resolution - fps http://doc.freevo.org/2.0/Kaa#head-919960011a3523a465d1cacc57f2f8e7b0e8ad00 (I haven't used it myself) Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: for x,y in word1, word2 ?

2008-08-11 Thread Timothy Grant
On Mon, Aug 11, 2008 at 8:44 AM, Casey [EMAIL PROTECTED] wrote: My first thought is that you should be looking at implementations of Hamming Distance. If you are actually looking for something like SOUNDEX you might also want to look at the double metaphor algorithm, which is significantly

Re: Eclipse, Python, wxPython and code completion

2008-08-11 Thread Stef Mientki
[EMAIL PROTECTED] wrote: Hello, I've installed Eclipse, Python 2.5 and wxPython on Ubuntu 8.04. The problem is that I can't get code completion for wx module. I don't know if it occurs the same with other libraries outside the python core. If I compile/run my code containing the wx library, I

Re: dynamically creating html code with python...

2008-08-11 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: Hi, Thanks for your patience. I got the text displayed in the web browser with the following code: [CODE] f=StringIO.StringIO() f.write('htmlheadtitledata analysis site/title/headbody') f.write(pThis is a trial test/p) f.write(/body/html) print

Re: Video information

2008-08-11 Thread Tobias Billep
2008/8/9 dusans [EMAIL PROTECTED] Is there a py module, which would get me information of a movie file: - resolution - fps -- http://mail.python.org/mailman/listinfo/python-list if you have linux installed you can use gstreamer and the bindings pygst -tobias --

Inheritance crossover packages

2008-08-11 Thread Johannes Bauer
Hello group, I'm having a seemingly simple problem. I want to generate a hierarchy of modules, like this one: GenerationScripts/ GenerationScripts/dhcp GenerationScripts/bind9 And the files: GenerationScripts/dhcp/__init__.py GenerationScripts/bind9/generator.py

A Question about ctypes and a function f(void **)

2008-08-11 Thread sapsi
Hello, I have a C function f(void**,int *), in which it writes some information (it is a RGB32 image). Here is what i do rowlength=c_int() data=c_void_p() d=pointer(data) f(d,byref(rowlength) The call works (no segmentation fault), now how do i access the data in d? Because i need to pass it to a

Re: for x,y in word1, word2 ?

2008-08-11 Thread Dave Webster
Thanks, Timothy. I'm pretty sure that there is no such thing as a beautiful implementation of double-metaphone but I would personally like to have a copy of your python implementation. I have a fairly elegant version of the original metaphone algorithm I wrote myself (in PERL, many years ago)

Professional Grant Proposal Writing Workshop (August 2008: Boston, Massachusetts - University of Phoenix Campus)

2008-08-11 Thread Anthony Jones
The Grant Institute: Certificate in Professional Program Development and Grant Communication will be heldat the University of Phoenix - Burlington Campus, August 18 - 22, 2008. Interested development professionals, researchers, faculty, and graduate students should register as soon as possible,

Re: for x,y in word1, word2 ?

2008-08-11 Thread Timothy Grant
On Mon, Aug 11, 2008 at 12:13 PM, Dave Webster [EMAIL PROTECTED] wrote: Thanks, Timothy. I'm pretty sure that there is no such thing as a beautiful implementation of double-metaphone but I would personally like to have a copy of your python implementation. I have a fairly elegant version of

RE: SSH utility

2008-08-11 Thread Support Desk
What about pexpect? http://www.noah.org/wiki/Pexpect -Original Message- From: Alan Franzoni [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2008 5:41 AM To: python-list@python.org Subject: Re: SSH utility James Brady was kind enough to say: Hi all, I'm looking for a python

Re: Inheritance crossover packages

2008-08-11 Thread Bruno Desthuilliers
Johannes Bauer a écrit : Hello group, I'm having a seemingly simple problem. I want to generate a hierarchy of modules, like this one: GenerationScripts/ GenerationScripts/dhcp GenerationScripts/bind9 And the files: GenerationScripts/dhcp/__init__.py GenerationScripts/bind9/generator.py

Re: Python for Blackberry mobile phones

2008-08-11 Thread James Matthews
It would be also nice to see python on an iPhone On Mon, Aug 11, 2008 at 8:29 AM, Timothy Grant [EMAIL PROTECTED]wrote: On Sun, Aug 10, 2008 at 9:54 PM, [EMAIL PROTECTED] wrote: I'm looking for a version of Python for Blackberry mobile phones - has anyone heard of such a thing? I've been

Re: dynamically creating html code with python...

2008-08-11 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Sorry, my fault... I am trying to build a web application for data analysis. Basically some data will be read from a database and passed to a python script (myLibs.py) to build an image as follows. [CODE]

Re: Digitally sign PDF files

2008-08-11 Thread Hartmut Goebel
Hi, I'm developing an application with some reports and we're looking for advice. This reports should be openoffice.org .odf files, pdf files, and perhaps microsoft word files (.doc, .docx?) and must be digitally signed. Is out there some kind of libraries to ease this tasks? For signing you

Full Time Python developer position in Dallas TX

2008-08-11 Thread Bhavani
please respond with resume. Candidates must be in the USA. -- http://mail.python.org/mailman/listinfo/python-list

Re: A Question about ctypes and a function f(void **)

2008-08-11 Thread Nick Craig-Wood
sapsi [EMAIL PROTECTED] wrote: I have a C function f(void**,int *), in which it writes some information (it is a RGB32 image). Here is what i do rowlength=c_int() data=c_void_p() d=pointer(data) f(d,byref(rowlength) The call works (no segmentation fault), now how do i access the

Custom PyQt4 Slots

2008-08-11 Thread ff
Is it possible to create custom PyQt4 Slots, i have searched high and low to no avail; I have an application that can set animation speed to different levels, i want the user to alter this, now quite clearly i can write a single function to control setting any speed with something like: def

Re: list question... unique values in all possible unique spots

2008-08-11 Thread Tobiah
On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote: 40329146112660563558400 I think it's only 4 septillion. Perfectly manageable. ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom PyQt4 Slots

2008-08-11 Thread Diez B. Roggisch
ff schrieb: Is it possible to create custom PyQt4 Slots, i have searched high and low to no avail; I have an application that can set animation speed to different levels, i want the user to alter this, now quite clearly i can write a single function to control setting any speed with something

Re: list question... unique values in all possible unique spots

2008-08-11 Thread Tobiah
On Mon, 11 Aug 2008 13:46:10 -0700, Tobiah wrote: On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote: 40329146112660563558400 I think it's only 4 septillion. I meant 403. ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/python-list

Re: list question... unique values in all possible unique spots

2008-08-11 Thread Tobiah
On Mon, 11 Aug 2008 13:46:10 -0700, Tobiah wrote: On Sat, 09 Aug 2008 08:07:26 -0700, Mensanator wrote: 40329146112660563558400 I think it's only 4 septillion. I meant to say 403. ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom PyQt4 Slots

2008-08-11 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: ff schrieb: Is it possible to create custom PyQt4 Slots, i have searched high and low to no avail; I have an application that can set animation speed to different levels, i want the user to alter this, now quite clearly i can write a single function to control setting

  1   2   >