IMGCrush 0.4.0 and IMGCrush_GUI 0.4.0 released

2009-11-03 Thread kiithsa...@gmail.com
Announcing IMGCrush 0.4.0 and IMGCrush_GUI 0.4.0 , a new release bringing new features and bugfixes, as well as considerable speedup (even though it's still quite slow) IMGCrush is an image compressor capable of compressing files to user specified size or quality using common web image formats

[ANN] stdeb 0.4.2

2009-11-03 Thread Andrew Straw
stdeb produces Debian source packages from Python packages via a new distutils command, sdist_dsc. Automatic defaults are provided for the Debian package, but many aspects of the resulting package can be customized via a configuration file. An additional command, bdist_deb, creates a Debian binary

Python-URL! - weekly Python news and links (Nov 3)

2009-11-03 Thread Gabriel Genellina
QOTW: I consider import * the first error to be fixed ... - Robert Kern, author of PyFlakes, a potential replacement for Pylint and Pychecker, on his personal style http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2 Python 2.6.4 is out; it fixes some small but

probability sequencing language 1.04 has been released

2009-11-03 Thread edexter
probability sequencing language is a text based piano roll type programming language for csound. some may refer to it as a pre processor for csound. For version 1.04 a bug has been fixed alowing floating point numbers for the step number macros are now available loaded from external files.

Open Technology Group, Inc. announces Advanced Python Training

2009-11-03 Thread Chander Ganesan
Morrisville, NC (PRWEB) November 3, 2009 -- Open Technology Group, Inc. announces Advanced Python Training. The Open Technology Group (OTG), a leader in the development and delivery of training solutions centered about Open Source technologies, released the latest in its set of Open Source

Re: list comprehension problem

2009-11-03 Thread Ben Finney
Paul Rudin paul.nos...@rudin.co.uk writes: Falcolas garri...@gmail.com writes: [s.strip() for s in hosts if s.strip()] There's something in me that rebels against seeing the same call twice. Agreed. I'd probably use: lines = [foo,, bar , , baz] [s for s in (s.strip() for s

Re: Command parsing... best module to use?

2009-11-03 Thread Collin D
Thanks for the replies. Pyparsing looks just like what I need. -- http://mail.python.org/mailman/listinfo/python-list

Re: self.__dict__ tricks

2009-11-03 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: There are no stupid questions, only stupid people. The earliest source I know for that aphorism is the fictional teacher Mister Garrisson, from South Park. Can anyone source it earlier? -- \“Read not to contradict and confute, nor to believe and

Re: substituting list comprehensions for map()

2009-11-03 Thread Anh Hai Trinh
Yes, just about any ‘map()’ operation has a corresponding list comprehension. (Does anyone know of a counter-example, a ‘map()’ operation that doesn't have a correspondingly simple list comprehension?) Try turning this into a list comprehension: vectorsum = lambda *args: map(sum,

Re: Sqlite3. Substitution of names in query.

2009-11-03 Thread Lawrence D'Oliveiro
In message mailman.2504.1257216390.2807.python-l...@python.org, Carsten Haese wrote: With all due respect, but if your experience is exclusive to MySQL/MySQLdb, your experience means very little for database programming practices in general. I wonder about the veracity of your claims,

Re: Docs Typo

2009-11-03 Thread Ben Finney
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: http://docs.python.org/library/turtle.html -- “ScrolledCavas” should be “ScrolledCanvas”. Thanks for finding and describing a fault with the Python documentation. This is not the right place for reporting it, though: this is the

Cast into custom type

2009-11-03 Thread Henning Bredel
Hi, I created a plugin mechanism for my application orientating at the mechanism described by Martin Alchy in http://martyalchin.com/2008/jan/10/simple-plugin-framework/ Now I'd like to call methods like `initialize(parent)' when the user chooses to use a plugin. As described in the blog

Re: Cast into custom type

2009-11-03 Thread Diez B. Roggisch
Henning Bredel schrieb: Hi, I created a plugin mechanism for my application orientating at the mechanism described by Martin Alchy in http://martyalchin.com/2008/jan/10/simple-plugin-framework/ Now I'd like to call methods like `initialize(parent)' when the user chooses to use a plugin. As

Re: Cast into custom type

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 06:41:37 -0300, Henning Bredel henning.bre...@gmx.de escribió: I created a plugin mechanism for my application orientating at the mechanism described by Martin Alchy in http://martyalchin.com/2008/jan/10/simple-plugin-framework/ Now I'd like to call methods like

Re: Pyfora, a place for python

2009-11-03 Thread Lorenzo Gatti
On Nov 1, 8:06 am, Saketh saketh.bhamidip...@gmail.com wrote: Hi everyone, I am proud to announce the release of Pyfora (http://pyfora.org), an online community of Python enthusiasts to supplement comp.lang.python and #python. While the site is small right now, please feel free to register

Re: Cast into custom type

2009-11-03 Thread Steven D'Aprano
On Tue, 03 Nov 2009 09:41:37 +, Henning Bredel wrote: Hi, I created a plugin mechanism for my application orientating at the mechanism described by Martin Alchy in http://martyalchin.com/2008/jan/10/simple-plugin-framework/ Regarding your subject line, Python doesn't have casts. A

Re: PyGDChart2 module

2009-11-03 Thread eb303
On Oct 28, 4:52 pm, eb303 eric.brunel.pragma...@gmail.com wrote: Hi all, I was looking for a simple chart drawing Python module and as a user of the gd library and its Python interface, I was interested in the Python interface to the gdchart library (http://www.fred.net/brv/ chart/).

Re: Pyfora, a place for python

2009-11-03 Thread M.-A. Lemburg
Kee Nethery wrote: I just noticed the tag line a place for Python. Looked it up online (http://pyfora.org/) and it will be interesting to see if it can fill the void that I experience (no centralized place to post and view user submitted sample code) in the existing Python community. There

Re: self.__dict__ tricks

2009-11-03 Thread Simon Brunning
2009/11/1 Steven D'Aprano st...@remove-this-cybersource.com.au: The only stupid question is the one you are afraid to ask. I was once asked, and I quote exactly, are there any fish in the Atlantic sea? That's pretty stupid. ;-) -- Cheers, Simon B. --

Re: convert pyc (python 2.4) to py

2009-11-03 Thread Furkan Kuru
There is an online service at http://www.depython.com converting pyc files to py. You can give it a try. It does not have file size limit. On Wed, Oct 21, 2009 at 8:58 PM, Chris Rebert c...@rebertia.com wrote: On Wed, Oct 21, 2009 at 11:35 AM, Peng Yu pengyu...@gmail.com wrote: On Tue, Oct 20,

Re: About one class/function per module

2009-11-03 Thread Diez B. Roggisch
Peng Yu wrote: On Mon, Nov 2, 2009 at 9:39 PM, alex23 wuwe...@gmail.com wrote: Peng Yu pengyu...@gmail.com wrote: I don't think that this is a problem that can not be overcome. A simple solution might be to associate a unique identifier to each file, so that even the filename has been

Re: About one class/function per module

2009-11-03 Thread Ben Finney
Diez B. Roggisch de...@nospam.web.de writes: Don't get me wrong - innovation often comes from scratching ones personal itch. But you seem to be suffering from a rather bad case of neurodermatitis. +1 QOTW -- \ “For my birthday I got a humidifier and a de-humidifier. I put | `\ them

Re: Cast into custom type

2009-11-03 Thread Henning Bredel
Diez, Gabriel, Steven, thanks for your answers. I'll mainly give response in this posting, so I hope not repeating myself. On Tue, 03 Nov 2009 10:18:29 +, Steven D'Aprano wrote: On Tue, 03 Nov 2009 09:41:37 +, Henning Bredel wrote: Now I'd like to call methods like

import from a string

2009-11-03 Thread iu2
Hi, Having a file called funcs.py, I would like to read it into a string, and then import from that string. That is instead of importing from the fie system, I wonder if it's possible to eval the text in the string and treat it as a module. For example with file('funcs.py') as f: txt = r.read()

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

2009-11-03 Thread Singletoned
On Oct 30, 8:53 am, Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: Robert Kern a écrit : On 2009-10-29 16:52 PM, Aahz wrote: (snip) Coincidentally, I tried PyFlakes yesterday and was unimpressed with the way it doesn't work with import *. I consider import * the

Help resolve a syntax error on 'as' keyword (python 2.5)

2009-11-03 Thread Oltmans
Hi, all. All I'm trying to do is to print the error message using the following code (copying/pasting from IDLE). def div(a,b): print a/b try: div(5,0) except Exception as msg: print msg but IDLE says (while highlighting the 'as' keyword) except Exception as msg: SyntaxError:

Python-URL! - weekly Python news and links (Nov 3)

2009-11-03 Thread Gabriel Genellina
QOTW: I consider import * the first error to be fixed ... - Robert Kern, author of PyFlakes, a potential replacement for Pylint and Pychecker, on his personal style http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2 Python 2.6.4 is out; it fixes some small but

Re: Pyfora, a place for python

2009-11-03 Thread Daniel Fetchinson
On 11/3/09, Diez B. Roggisch de...@nospam.web.de wrote: Daniel Fetchinson schrieb: If you have any suggestions, let me know -- this is a community effort! Suggestion: Please don't make efforts to fragment the community. When a community grows and consequently its needs also grow, how do you

Re: Help resolve a syntax error on 'as' keyword (python 2.5)

2009-11-03 Thread Vladimir Ignatov
Hi, except Exception as variable is a new python-3 syntax. You should use except Exception, variable syntax in 2.x series. Vladimir Ignatov On Tue, Nov 3, 2009 at 4:06 PM, Oltmans rolf.oltm...@gmail.com wrote: Hi, all. All I'm trying to do is to print the error message using the following

Re: Sqlite3. Substitution of names in query.

2009-11-03 Thread Carsten Haese
Lawrence D'Oliveiro wrote: In message mailman.2504.1257216390.2807.python-l...@python.org, Carsten Haese wrote: With all due respect, but if your experience is exclusive to MySQL/MySQLdb, your experience means very little for database programming practices in general. I wonder about the

Re: Help resolve a syntax error on 'as' keyword (python 2.5)

2009-11-03 Thread Xavier Ho
I don't have Python 25 on my computer, but since codepad.org is using Python 2.5.1, I did a quick test: # input try: raise Exception(Mrraa!) except Exception as msg: print msg # output t.py:3: Warning: 'as' will become a reserved keyword in Python 2.6 Line 3 except Exception as

Python-URL! - weekly Python news and links (Nov 3)

2009-11-03 Thread Cameron Laird
QOTW: I consider import * the first error to be fixed ... - Robert Kern, author of PyFlakes, a potential replacement for Pylint and Pychecker, on his personal style http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2 Python 2.6.4 is out; it fixes some small but

Re: Help resolve a syntax error on 'as' keyword (python 2.5)

2009-11-03 Thread Diez B. Roggisch
Vladimir Ignatov wrote: Hi, except Exception as variable is a new python-3 syntax. You should use except Exception, variable syntax in 2.x series. Not entirely true. This feature has been backported to python2.6 as well. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Help resolve a syntax error on 'as' keyword (python 2.5)

2009-11-03 Thread Ben Finney
Oltmans rolf.oltm...@gmail.com writes: try: div(5,0) except Exception as msg: print msg The name ‘msg’ here is misleading. The except syntax does *not* bind the target to a message object, it binds the target to an exception object. It would be clearer to write the above code as:

Handling large datastore search

2009-11-03 Thread Ahmed Barakat
In case I have a huge datastore (1 entries, each entry has like 6 properties), what is the best way to handle the search within such a huge datastore, and what if I want to make a generic search, for example you write a word and i use it to search within all properties I have for all entries?

Re: Pyfora, a place for python

2009-11-03 Thread Ben Finney
Daniel Fetchinson fetchin...@googlemail.com writes: I was referring to this comment by Ben: Suggestion: Please don't make efforts to fragment the community. This IMHO is hostile, because it presupposes that the mere goal of the OP is fragmenting the community It presupposes nothing of any

Re: Handling large datastore search

2009-11-03 Thread Michiel Overtoom
Ahmed Barakat wrote: In case I have a huge datastore (1 entries, each entry has like 6 properties) Can you show some sample entries? That way we can get an idea how your datastore looks like. By the way, 1 doesn't sound that much. At work I create python programs which do data

Re: list comprehension problem

2009-11-03 Thread Scott David Daniels
Terry Reedy wrote: What immutability has to do with identity is that 'two' immutable objects with the same value *may* actually be the same object, *depending on the particular version of a particular implementation*. t1 = (1,2,3) # an immutable object t2 = (1,2,3) # another immutable

Re: import bug

2009-11-03 Thread Ask Solem
On Nov 3, 1:52 am, Carl Banks pavlovevide...@gmail.com wrote: On Oct 31, 7:12 am, kj no.em...@please.post wrote: I'm running into an ugly bug, which, IMHO, is really a bug in the design of Python's module import scheme.  Consider the following directory structure: ham |--

Re: Why do you use python?

2009-11-03 Thread Jaime Buelta
On 1 nov, 08:54, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sat, 31 Oct 2009 06:54:27 -0700 (PDT), Jaime Buelta jaime.bue...@gmail.com declaimed the following in gmane.comp.python.general: shouldn't be heard. Talks a guy that programmed a GUI on Motif using C (plain old C) in 2003

Re: Web development with Python 3.1

2009-11-03 Thread mario ruggier
With respect to to original question regarding web frameworks + database and Python 3, all the following have been available for Python 3 since the day Python 3.0 was released: QP, a Web Framework http://pypi.python.org/pypi/qp/ Durus, a Python Object Database (the default in qp, for user

Re: Pyfora, a place for python

2009-11-03 Thread Daniel Fetchinson
I was referring to this comment by Ben: Suggestion: Please don't make efforts to fragment the community. This IMHO is hostile, because it presupposes that the mere goal of the OP is fragmenting the community It presupposes nothing of any goal. It describes a predictable result of the OP's

comparing alternatives to py2exe

2009-11-03 Thread Jonathan Hartley
Hi, Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to py2exe: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput=html Columns represent methods of deploying to end-users such that they don't have to worry

pythonw.exe under Windows-7 (Won't run for one admin user)

2009-11-03 Thread SD_V897
I have a perplexing issue, I have four users set up on a W7 computer. The program runs fine for all users except the admin user who needs it for school assignments. It's not a firewall issue as I've added localhost for pythomw.exe as allow. I've done some data dumps using sysinternals process

Re: Pyfora, a place for python

2009-11-03 Thread Diez B. Roggisch
Since when is the mere suggestion that fragmentation will occur and if that's a desirable consequence is hostile? The OP is not bound to it, and I also don't see the tone used by the two immediate answerers being hostile. Paul might have been terse - but hostility looks different IMHO. I

Re: comparing alternatives to py2exe

2009-11-03 Thread Maxim Khitrov
On Tue, Nov 3, 2009 at 10:58 AM, Jonathan Hartley tart...@tartley.com wrote: Hi, Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to py2exe: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput=html Columns

Re: substituting list comprehensions for map()

2009-11-03 Thread Steven D'Aprano
On Tue, 03 Nov 2009 10:22:28 -0500, J Kenneth King wrote: However in this case the procedure by which we derive the value is not important or even interesting. It is much more succinct to think of the operation as a value and express it accordingly. There's no need to clutter the mind with

Re: import from a string

2009-11-03 Thread Matt McCredie
iu2 israelu at elbit.co.il writes: Hi, Having a file called funcs.py, I would like to read it into a string, and then import from that string. That is instead of importing from the fie system, I wonder if it's possible to eval the text in the string and treat it as a module. For

ANN: python-dBase 0.86 Released!

2009-11-03 Thread Ethan Furman
Greetings! I am happy to announce the latest release of python-dBase (dbf for short)! At this point it supports dBase III and Visual FoxPro 6 dbf files. It's a bit quicker now since it's using array.array to hold the records and not strings, and the API has been standardized. It also now

Re: Python-URL! - weekly Python news and links (Nov 3)

2009-11-03 Thread Robert Kern
On 2009-11-03 07:29 AM, Cameron Laird wrote: QOTW: I consider import * the first error to be fixed ... - Robert Kern, author of PyFlakes, a potential replacement for Pylint and Pychecker, on his personal style http://groups.google.com/group/comp.lang.python/msg/5bf77b21b3b0caf2 I am not

Re: Pyfora, a place for python

2009-11-03 Thread Ethan Furman
Daniel Fetchinson wrote: I was referring to this comment by Ben: Suggestion: Please don't make efforts to fragment the community. This IMHO is hostile, because it presupposes that the mere goal of the OP is fragmenting the community It presupposes nothing of any goal. It describes a

Re: how to remove the same words in the paragraph

2009-11-03 Thread Peter Otten
kylin wrote: I want to remove all the punctuation and no need words form a string datasets for experiment. I need to remove the word if it appears in the paragraph twice. could some give me some clue or some useful function in the python. para = uI need to remove the word if it appears in

Re: elementtree XML() unicode

2009-11-03 Thread John Machin
On Nov 4, 12:14 pm, Kee Nethery k...@kagi.com wrote: On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery k...@kagi.com   escribió: I've removed all the stuff in my code and tried to distill it down   to just what is failing. Hopefully I

Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64 and ran into some issues. 1) When I ran the script, I got Error: needed directory /usr/lib/python2.4/config not found 2) Then I yum install python-devel which

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 5:27 PM, John Machin wrote: On Nov 4, 11:01 am, Kee Nethery k...@kagi.com wrote: Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u'''?xml version=1.0 encoding=UTF-8?

Re: import from a string

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 17:36:08 -0300, iu2 isra...@elbit.co.il escribió: On Nov 3, 7:49 pm, Matt McCredie mccre...@gmail.com wrote: iu2 israelu at elbit.co.il writes: Having a file called funcs.py, I would like to read it into a string, and then import from that string. That is instead of

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Hey Marc-Andre, Ummm - I have installed python-devel.x86_64 and checked that the /usr/lib64/python2.4/ is populated - anything else I can/shuld do to check/ensure the the devel rpm is installed? Thanks. On Tue, Nov 3, 2009 at 11:32 AM, M.-A. Lemburg m...@egenix.com wrote: Rami Chowdhury wrote:

Re: Tkinter callback arguments

2009-11-03 Thread Alf P. Steinbach
* Diez B. Roggisch: Alf P. Steinbach schrieb: * Diez B. Roggisch: Your comment about computed makes it more clear what that's all about. Also Bertrand Meyer (Eiffel language creator) had idea like that, he called it referential transparency. But I think when Python has this nice property

how to remove the punctuation and no need words from paragraphs

2009-11-03 Thread kylin
I want to remove all the punctuation and no need words form a string datasets for experiment. I am new to python, please give me some clue and direction to write this code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling large datastore search

2009-11-03 Thread Dave Angel
Ahmed Barakat wrote: In case I have a huge datastore (1 entries, each entry has like 6 properties), what is the best way to handle the search within such a huge datastore, and what if I want to make a generic search, for example you write a word and i use it to search within all properties

Calendar Problem

2009-11-03 Thread Victor Subervi
Hi; I have the following: import calendar, datetime myCal = calendar.calendar(6) today = datetime.date.today() day = today.day mo = today.month yr = today.year month = myCal.monthdayscalendar(yr, mo) The last line throws errors no matter how I try and tweak it. The current incarnation complains

Re: elementtree XML() unicode

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery k...@kagi.com escribió: Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u'''?xml version=1.0 encoding=UTF-8?

Re: Cast into custom type

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 09:07:01 -0300, Henning Bredel henning.bre...@gmx.de escribió: On Tue, 03 Nov 2009 10:18:29 +, Steven D'Aprano wrote: You need to give some actual examples of what you are trying to do, and what you are expecting to happen. How is initialized() being called?

how to remove the same words in the paragraph

2009-11-03 Thread kylin
I need to remove the word if it appears in the paragraph twice. could some give me some clue or some useful function in the python. -- http://mail.python.org/mailman/listinfo/python-list

Re: import from a string

2009-11-03 Thread iu2
On Nov 3, 7:49 pm, Matt McCredie mccre...@gmail.com wrote: iu2 israelu at elbit.co.il writes: Hi, Having a file called funcs.py, I would like to read it into a string, and then import from that string. That is instead of importing from the fie system, I wonder if it's possible to

Re: Pyfora, a place for python

2009-11-03 Thread Rhodri James
On Tue, 03 Nov 2009 15:58:30 -, Daniel Fetchinson fetchin...@googlemail.com wrote: If yes, we are almost there! In our example the request of A only makes sense if B is making an effort to fragment the community, in other words, assuming that A tries to make a meaningful request, A is

Re: Freezing python files into executables

2009-11-03 Thread Rami Chowdhury
On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian giris...@gmail.com wrote: Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64 and ran into some issues. 1) When I ran the script, I got Error:

Re: comparing alternatives to py2exe

2009-11-03 Thread iu2
On Nov 3, 5:58 pm, Jonathan Hartley tart...@tartley.com wrote: Hi, Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to py2exe: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput... Columns represent

elementtree XML() unicode

2009-11-03 Thread Kee Nethery
Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u'''?xml version=1.0 encoding=UTF-8? customershippingstatebobble/statecityhead/ citystreetcity/street/shipping/customer''' theResponseXml =

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery k...@kagi.com escribió: I've removed all the stuff in my code and tried to distill it down to just what is failing. Hopefully I have not removed something essential. Sounds like I did

Re: elementtree XML() unicode

2009-11-03 Thread John Machin
On Nov 4, 1:06 pm, Kee Nethery k...@kagi.com wrote: On Nov 3, 2009, at 5:27 PM, John Machin wrote: On Nov 4, 11:01 am, Kee Nethery k...@kagi.com wrote: Why is this not working and what do I need to do to use Elementtree with unicode? What you need to do is NOT feed it unicode. You

Re: self.__dict__ tricks

2009-11-03 Thread Rami Chowdhury
On Tue, 03 Nov 2009 09:59:32 -0800, Ethan Furman et...@stoneleaf.us wrote: Simon Brunning wrote: 2009/11/1 Steven D'Aprano st...@remove-this-cybersource.com.au: The only stupid question is the one you are afraid to ask. I was once asked, and I quote exactly, are there any fish in the

Re: Freezing python files into executables

2009-11-03 Thread Rami Chowdhury
On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian giris...@gmail.com wrote: I checked and ls /usr/lib64/python2.4/config/ returns config.c config.c.in install-sh libpython2.4.a Makefile makesetup python.o Setup Setup.config Setup.local so I am guessing the python-devel

Re: self.__dict__ tricks

2009-11-03 Thread Steven D'Aprano
On Tue, 03 Nov 2009 11:26:49 +, Simon Brunning wrote: 2009/11/1 Steven D'Aprano st...@remove-this-cybersource.com.au: The only stupid question is the one you are afraid to ask. I was once asked, and I quote exactly, are there any fish in the Atlantic sea? That's pretty stupid. ;-)

Re: elementtree XML() unicode

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery k...@kagi.com escribió: If there was a place in the official docs for me to append these nuggets of information to the sections for xml.etree.ElementTree.XML(text) and xml.etree.ElementTree.dump(elem) I would absolutely do so.

Re: how to remove the same words in the paragraph

2009-11-03 Thread Andre Engels
On Tue, Nov 3, 2009 at 11:13 PM, kylin huili.s...@gmail.com wrote: I need to remove the word if it appears in the paragraph twice. could some give me some clue or some useful function in the python. Well, it depends a bit on what you call 'the same word' (In the paragraph Fly fly, fly! does the

Re: pythonw.exe under Windows-7 (Won't run for one admin user)

2009-11-03 Thread Rhodri James
On Tue, 03 Nov 2009 16:00:16 -, SD_V897 sd_v...@nosuchmail.com wrote: I have a perplexing issue, I have four users set up on a W7 computer. The program runs fine for all users except the admin user who needs it for school assignments. A little more information, please. How does it not

Re: chr / ord

2009-11-03 Thread Sean McIlroy
thanks. that did the trick. in case anyone else is in the same boat as myself, here are the relevant correspondences: string - [int] bytes - [int] --- -- lambda string: [ord(x) for x in string] list lambda ints: ''.join([chr(x)

Re: how to remove the same words in the paragraph

2009-11-03 Thread Tim Chase
kylin wrote: I need to remove the word if it appears in the paragraph twice. could some give me some clue or some useful function in the python. Sounds like homework. To fail your class, use this one: p = one two three four five six seven three four eight s = set() print ' '.join(w for w

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Will try that. Meanwhile I went ahead and used cx_freeze and that seems to work OK. Thanks for your help Rami and Marc-Andre. On Tue, Nov 3, 2009 at 12:31 PM, Rami Chowdhury rami.chowdh...@gmail.com wrote: On Tue, 03 Nov 2009 11:57:17 -0800, Girish Venkatasubramanian giris...@gmail.com wrote:

fastPATX Panther for your speedy web browsing needs!

2009-11-03 Thread patx
fastPATX Panther is now out! It beats Firefox on startup and is very lightweight you have to try it! Download here: http://bitbucket.org/patx/fastpatx/fastpatx-panther.py -- patx, python gui and web, http://patx.me -- http://mail.python.org/mailman/listinfo/python-list

Re: elementtree XML() unicode

2009-11-03 Thread John Machin
On Nov 4, 11:01 am, Kee Nethery k...@kagi.com wrote: Having an issue with elementtree XML() in python 2.6.4. This code works fine:       from xml.etree import ElementTree as et       getResponse = u'''?xml version=1.0 encoding=UTF-8?   customershippingstatebobble/statecityhead/

Re: Freezing python files into executables

2009-11-03 Thread M.-A. Lemburg
Girish Venkatasubramanian wrote: Hey Marc-Andre, Ummm - I have installed python-devel.x86_64 and checked that the /usr/lib64/python2.4/ is populated - anything else I can/shuld do to check/ensure the the devel rpm is installed? If you have the config/ sub-dir in there, things should be fine.

Re: Help resolve a syntax error on 'as' keyword (python 2.5)

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 10:06:24 -0300, Oltmans rolf.oltm...@gmail.com escribió: Hi, all. All I'm trying to do is to print the error message using the following code (copying/pasting from IDLE). try: div(5,0) except Exception as msg: print msg SyntaxError: invalid syntax I'm using

Re: comparing alternatives to py2exe

2009-11-03 Thread Maxim Khitrov
On Tue, Nov 3, 2009 at 3:50 PM, iu2 isra...@elbit.co.il wrote: On Nov 3, 5:58 pm, Jonathan Hartley tart...@tartley.com wrote: Hi, Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to py2exe:

Re: Freezing python files into executables

2009-11-03 Thread Mike Driscoll
On Nov 3, 3:23 pm, Girish Venkatasubramanian giris...@gmail.com wrote: Will try that. Meanwhile I went ahead and used cx_freeze and that seems to work OK. Thanks for your help Rami and Marc-Andre. Something that you might want to try in the future is GUI2Exe, which allows you to play with a

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
I checked and ls /usr/lib64/python2.4/config/ returns config.c config.c.in install-sh libpython2.4.a Makefile makesetup python.o Setup Setup.config Setup.local so I am guessing the python-devel installation went off OK, from what you say. I looked at the freeze.py code and I see your point. But

Re: Can I run a python program from within emacs?

2009-11-03 Thread Jean
On Nov 1, 10:15 am, rustom rustompm...@gmail.com wrote: On Nov 1, 7:20 pm, Robinson wanderingaen...@comcast.net wrote: I have also just started with both Aquamacs and Python so I ask for   your patience as well. When I evaluate the buffer (C-c C-C) I don't see any response or   output

Re: self.__dict__ tricks

2009-11-03 Thread Ethan Furman
Simon Brunning wrote: 2009/11/1 Steven D'Aprano st...@remove-this-cybersource.com.au: The only stupid question is the one you are afraid to ask. I was once asked, and I quote exactly, are there any fish in the Atlantic sea? That's pretty stupid. ;-) Are there any fish in the Dead Sea?

Re: Calendar Problem

2009-11-03 Thread Dave Angel
MichaB Klich wrote: Dnia wtorek 03 listopada 2009 o 20:50:10 Victor Subervi napisał(a): Hi; I have the following: import calendar, datetime myCal =alendar.calendar(6) today =atetime.date.today() day =oday.day mo =oday.month yr =oday.year month =yCal.monthdayscalendar(yr, mo) The last

continuous return?

2009-11-03 Thread Someone Something
I'm trying to write something related to IRC. The thing is, I have one thread receiving and another sending. But, how can I keep the caller of the recv() function informed about what was last received so that it can all be printed out. But, I no idea how I can accomplish this. I was thinking about

Re: Freezing python files into executables

2009-11-03 Thread M.-A. Lemburg
Rami Chowdhury wrote: On Tue, 03 Nov 2009 11:15:39 -0800, Girish Venkatasubramanian giris...@gmail.com wrote: Hello, I have been using freeze.py on 32 bit linux distributions without a problem. But recently I tried to do the same on RHEL5 x86_64 and ran into some issues. 1) When I ran

Re: comparing alternatives to py2exe

2009-11-03 Thread Ryan Kelly
Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives to py2exe: http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdgoutput=html ...snip... Are there major things I'm missing or misunderstanding? A quick note -

Re: import bug

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 12:29:10 -0300, Ask Solem askso...@gmail.com escribió: If you have a module named myapp.django, and someone writes a cool library called django that you want to use, you can't use it unless you rename your local django module. file myapp/django.py: from

Re: Freezing python files into executables

2009-11-03 Thread Girish Venkatasubramanian
Hi Rami, Thanks for pointing this out. I did see that point - but apart from installing python-devel (which has created and populated /usr/lib64/python2.4/...) I am not sure what I should do - is there some setting in python where I can ask it to look at lib64 instead of lib? Thanks. On Tue, Nov

Re: continuous return?

2009-11-03 Thread Gabriel Genellina
En Wed, 04 Nov 2009 00:20:05 -0300, Someone Something fordhai...@gmail.com escribió: I'm trying to write something related to IRC. The thing is, I have one thread receiving and another sending. But, how can I keep the caller of the recv() function informed about what was last received so

unittest setup

2009-11-03 Thread Jonathan Haddad
Maybe I'm doing something wrong here, definitely not the most experienced unit tester. I've got a class, in the constructor it loads a CSV file from disc. I'd like only 1 instance of the class to be instantiated. However, when running multiple unit tests, multiple instances of the class are

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 7:06 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery k...@kagi.com escribió: If there was a place in the official docs for me to append these nuggets of information to the sections for xml.etree.ElementTree.XML(text) and

Re: unittest setup

2009-11-03 Thread Gabriel Genellina
En Wed, 04 Nov 2009 01:02:24 -0300, Jonathan Haddad j...@jonhaddad.com escribió: I've got a class, in the constructor it loads a CSV file from disc. I'd like only 1 instance of the class to be instantiated. However, when running multiple unit tests, multiple instances of the class are

Re: substituting list comprehensions for map()

2009-11-03 Thread Robert Kern
Steven D'Aprano wrote: On Tue, 03 Nov 2009 10:22:28 -0500, J Kenneth King wrote: Adding in the loop construct and name bindings doesn't enhance my understanding of what a dot-product is. I don't need to see the loop construct at all in this case. A dot product is simply the multiplication

  1   2   >