[ANN] BleachBit 0.8.1 released

2010-10-05 Thread Andrew Z
BleachBit (a pure PyGTK app) deletes traces of online Internet usage and recovers wasted disk space. Highlight of changes since 0.8.0: * Delete DOM Storage in Firefox 3, Google Chrome, Opera, Internet Explorer, Safari * Delete evercookie tracking * Delete more localizations (16MB more on Ubuntu

Pydev 1.6.3 Released

2010-10-05 Thread Fabio Zadrozny
Hi All, Pydev 1.6.3 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Improved editor preferences page when using Aptana themes * Icons updated to work better with dark backgrounds

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message e8b46ea8-8d1e-4db9-91ba-501fd1a44...@g18g2000yqk.googlegroups.com, James Harris wrote: On 29 Sep, 18:20, Seebs usenet-nos...@seebs.net wrote: On 2010-09-29, Tracubik affdfsdfds...@b.com wrote: button = gtk.Button((False,, True,)[fill==True]) Oh, what a nasty idiom. I'm

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message mailman.1166.1285774349.29448.python-l...@python.org, Philip Semanchuk wrote: Does Python make any guarantee that int(True) == 1 and int(False) == 0 will always hold, or are their values an implementation detail? There has never been a rationally-designed language where this was

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message 877hi44w53@xemacs.org, Hrvoje Niksic wrote: BTW adding ==True to a boolean value is redundant and can even break for logically true values that don't compare equal to True (such as the number 10 or the string foo). I wonder if there’s a name for this sort of thing: “boolnoob”,

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message mailman.1232.1285927634.29448.python-l...@python.org, Antoon Pardon wrote: On Wed, Sep 29, 2010 at 01:38:48PM +0200, Hrvoje Niksic wrote: BTW adding ==True to a boolean value is redundant and can even break for logically true values that don't compare equal to True (such as the

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message 4ca96440$0$1674$742ec...@news.sonic.net, John Nagle wrote: Yes, bool is a subtype of int in Python. This was because the original design of Python didn't have bool (a rather strange mistake for a language designed this late) and the retrofit had to have some backwards

Simple database explorer

2010-10-05 Thread dusans
Hi. Im making a simple database explorer in PyQt. I hope somebody here might find it usefull :) http://code.google.com/p/simple-database-explorer/ Simple database explorer for: - Netezza - Oracle - Sqlite - MySQL - PostgreSQL - all the others having ODBC drivers... --

Re: I don't get why sys.exit(1) doesn't exit the while loop in the follow case

2010-10-05 Thread Seebs
On 2010-10-05, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 87iq1hz6rc@benfinney.id.au, Ben Finney wrote: Don't ever use a bare ???except??? unless you know exactly why you're doing so. In other news, don???t ever put a loaded gun in your mouth and pull the

Re: Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-05 Thread Pascal Polleunus
On 05/10/10 00:11, Diez B. Roggisch wrote: Pascal Polleunusp...@especific.be writes: Hi, I've problems to install psycopg2 in a virtualenv on Ubuntu 10.04. My problem is also explained on stackoverflow:

Re: How to convert a string into a list

2010-10-05 Thread Chris Rebert
On Mon, Oct 4, 2010 at 10:33 PM, Arnaud Delobelle arno...@gmail.com wrote: MRAB pyt...@mrabarnett.plus.com writes: On 05/10/2010 02:10, Mark Phillips wrote: I have the following string - ['1', '2'] that I need to convert into a list of integers - [1,2]. The string can contain from 1 to many

Re: Help with sets

2010-10-05 Thread Ian Kelly
On Mon, Oct 4, 2010 at 8:31 PM, B. M. Whealton bwheal...@futurewavedesigns.com wrote: self._pos = {predicate:{object:set([subject])}} We have the first dictionary keyed off the first term, the second dictionary keyed off the second term, and the set containing the third terms(note

Re: Help with sets

2010-10-05 Thread Chris Rebert
On Tue, Oct 5, 2010 at 12:01 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Oct 4, 2010 at 8:31 PM, B. M. Whealton bwheal...@futurewavedesigns.com wrote: self._pos = {predicate:{object:set([subject])}}       We have the first dictionary keyed off the first term, the second dictionary

Re: I don't get why sys.exit(1) doesn't exit the while loop in the follow case

2010-10-05 Thread Lawrence D'Oliveiro
In message slrnialg8v.28c5.usenet-nos...@guild.seebs.net, Seebs wrote: On 2010-10-05, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 87iq1hz6rc@benfinney.id.au, Ben Finney wrote: Don't ever use a bare ‘except’ unless you know exactly why you're doing so. In

Re: Help with sets

2010-10-05 Thread Steven D'Aprano
On Mon, 04 Oct 2010 22:31:50 -0400, B. M. Whealton wrote: I did get a bit confused in reading about the concept of sets in python and why you would use them instead of a dictionary for example. Why would you use a spoon instead of a paper clip? Why would you use a hat-stand instead of a

Re: I don't get why sys.exit(1) doesn't exit the while loop in the follow case

2010-10-05 Thread Steven D'Aprano
On Tue, 05 Oct 2010 11:13:53 +0800, Von wrote: Try to use sys.exit(0) Maybe you should print out the error in your except block. Not exiting with a status-code of 0 is no more helpful than not exiting with a status-code of 1. It's actually *less* helpful, if the intention is actually to exit

Re: Help with sets

2010-10-05 Thread Paul Rudin
B. M. Whealton bwheal...@futurewavedesigns.com writes: I did get a bit confused in reading about the concept of sets in python and why you would use them instead of a dictionary for example. Use a set when something is naturally modelled as a set... it's a collection of unordered objects that

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread Diez B. Roggisch
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message a6080839-c74d-4466-aa21-f8c4827cb...@y12g2000prb.googlegroups.com, TheOne wrote: I want the source files to have BOM character. What exactly is the point of a BOM in a UTF-8-encoded file? It's a MS-specific thing

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread Diez B. Roggisch
TheOne daewon.y...@gmail.com writes: On Oct 4, 9:26 pm, de...@web.de (Diez B. Roggisch) wrote: TheOne daewon.y...@gmail.com writes: Hi. I installed eclipse/pydev today. I created a pydev project and added python source files with utf-8 BOM. Eclipse/Pydev reports lexical error :  

Re: Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-05 Thread Diez B. Roggisch
Pascal Polleunus p...@especific.be writes: On 05/10/10 00:11, Diez B. Roggisch wrote: Pascal Polleunusp...@especific.be writes: Hi, I've problems to install psycopg2 in a virtualenv on Ubuntu 10.04. My problem is also explained on stackoverflow:

Re: Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-05 Thread Alex Willmer
On Oct 5, 7:41 am, Pascal Polleunus p...@especific.be wrote: On 05/10/10 00:11, Diez B. Roggisch wrote: Install the python-dev-package. It contains the Python.h file, which the above error message pretty clearly says. Usually, it's a good idea to search package descriptions of debian/ubuntu

unable to mkvirtualenv

2010-10-05 Thread Julian
Hi, when creating a virtualenv with mkvirtualenv, I receive an error: http://pastebin.com/1N8yRZUv I've updated the relating packages (virtualenv, virtualenvwrapper, distutils, distribute, pip) and couldn't solve my problem via google. -- http://mail.python.org/mailman/listinfo/python-list

Re: if the else short form

2010-10-05 Thread Antoon Pardon
On Tue, Oct 05, 2010 at 06:55:33PM +1300, Lawrence D'Oliveiro wrote: In message mailman.1232.1285927634.29448.python-l...@python.org, Antoon Pardon wrote: On Wed, Sep 29, 2010 at 01:38:48PM +0200, Hrvoje Niksic wrote: BTW adding ==True to a boolean value is redundant and can even break

Re: That interesting notation used to describe how long a loop will take.

2010-10-05 Thread Niklasro
On 4 Okt, 20:38, Tobiah t...@rcsreg.com wrote: It gets used here frequently, but not having majored in programming, I'm not familiar with it.  One might say: Don't do it that way, it will result in O(n**2)! Or something like that.  I read this to mean that the execution time varies with

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread TheOne
On Oct 5, 5:10 pm, de...@web.de (Diez B. Roggisch) wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message a6080839-c74d-4466-aa21-f8c4827cb...@y12g2000prb.googlegroups.com, TheOne wrote: I want the source files to have BOM character. What exactly is the point

Re: Strong typing vs. strong testing

2010-10-05 Thread Pascal Costanza
On 05/10/2010 05:36, salil wrote: On Sep 30, 1:38 pm, Lie Ryanlie.1...@gmail.com wrote: The /most/ correct version of maximum() function is probably one written in Haskell as: maximum :: Integer - Integer - Integer maximum a b = if a b then a else b Integer in Haskell has infinite

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread Lawrence D'Oliveiro
In message 2752e2e4-76fe-475a-a476-e5458bbfd...@z30g2000prg.googlegroups.com, TheOne wrote: Anyway, it would be great if I could make my eclipse/pydev to understand the BOM character and suppress the lexical error msg. What exactly is the point of a BOM in a UTF-8-encoded file? --

subclass constructor problem

2010-10-05 Thread Nikola Skoric
I have a superclass Element and a subclass Family. All Family.__init__() does is run Element.__init__() and self.__parse(). For some reason it seems like self.__parse() isn't run. Here is the code:

add bitbucket repo url to install_requires

2010-10-05 Thread Julian
Hi, I'm developing a django app which depends on an app in a private bitbucket repository, for example ssh://h...@bitbucket.org/username/my-django-app. is it possible to add this url to the list of install_requires in my setup.py? tried various possibilities, but none worked. --

force coredump from child created by subprocess

2010-10-05 Thread David Sveningsson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I am running a process using subprocess and detect if the process crashes using .returncode. I would like to force coredumps being created regardless of the system settings, eg run ulimit -c unlimited in the childprocess. I've had no luck using

Re: force coredump from child created by subprocess

2010-10-05 Thread Christian Heimes
Am 05.10.2010 14:15, schrieb David Sveningsson: Hi, I am running a process using subprocess and detect if the process crashes using .returncode. I would like to force coredumps being created regardless of the system settings, eg run ulimit -c unlimited in the childprocess. I've had no luck

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread Diez B. Roggisch
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message 2752e2e4-76fe-475a-a476-e5458bbfd...@z30g2000prg.googlegroups.com, TheOne wrote: Anyway, it would be great if I could make my eclipse/pydev to understand the BOM character and suppress the lexical error msg. What

Re: force coredump from child created by subprocess

2010-10-05 Thread David Sveningsson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/05/2010 02:37 PM, Christian Heimes wrote: Am 05.10.2010 14:15, schrieb David Sveningsson: Hi, I am running a process using subprocess and detect if the process crashes using .returncode. I would like to force coredumps being created

Pydev 1.6.3 Released

2010-10-05 Thread Fabio Zadrozny
Hi All, Pydev 1.6.3 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Improved editor preferences page when using Aptana themes * Icons updated to work better with dark backgrounds

Re: How to convert a string into a list

2010-10-05 Thread Mark Phillips
Thanks to everyone for their suggestions. I learned a lot from them! Mark On Mon, Oct 4, 2010 at 11:54 PM, Chris Rebert c...@rebertia.com wrote: On Mon, Oct 4, 2010 at 10:33 PM, Arnaud Delobelle arno...@gmail.com wrote: MRAB pyt...@mrabarnett.plus.com writes: On 05/10/2010 02:10, Mark

direct print to log file

2010-10-05 Thread Dirk Nachbar
How can I direct all print to a log file, eg some functions have their own print and I cannot put a f.write() in front of it. Dirk -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem installing psycopg2 in virtualenv (Ubuntu 10.04, Python 2.5)

2010-10-05 Thread Pascal Polleunus
On 05/10/10 10:18, Alex Willmer wrote: On Oct 5, 7:41 am, Pascal Polleunusp...@especific.be wrote: On 05/10/10 00:11, Diez B. Roggisch wrote: Install the python-dev-package. It contains the Python.h file, which the above error message pretty clearly says. Usually, it's a good idea to search

Global hoykey on windows

2010-10-05 Thread Sebastian Alonso
Hey everyone, I've been working on an app that uses global hotkey and it's a very important part of the app, so far I have been using python-keybinder [0] and it's been working great on linux, but now I want to make it work under windows and there was no way to make it work. Any other library

Re: direct print to log file

2010-10-05 Thread Diez B. Roggisch
Dirk Nachbar dirk...@gmail.com writes: How can I direct all print to a log file, eg some functions have their own print and I cannot put a f.write() in front of it. you can replace sys.stdout with something that performs logging. class MyWriter(object): def __init__(self, old_stream):

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-05 Thread Jonas H.
On 10/04/2010 11:41 PM, Antoine Pitrou wrote: Well, it should work, but you have to call PyType_Ready() to fill in the NULL fields with default values (for those where it's necessary). Does it solve it for you? Yes, thank you! Although I do not understand which fields I have to provide. I

Re: direct print to log file

2010-10-05 Thread Dave Angel
On 2:59 PM, Dirk Nachbar wrote: How can I direct all print to a log file, eg some functions have their own print and I cannot put a f.write() in front of it. Dirk When code does a print() without specifying a file, it goes to sys.stdout So you just have to create a new file object and

Re: direct print to log file

2010-10-05 Thread Benjamin Kaplan
On Tue, Oct 5, 2010 at 10:41 AM, Dave Angel da...@ieee.org wrote: On 2:59 PM, Dirk Nachbar wrote: How can I direct all print to a log file, eg some functions have their own print and I cannot put a f.write() in front of it. Dirk When code does a print() without specifying a file, it

Re: Global hoykey on windows

2010-10-05 Thread Alex Hall
On 10/5/10, Sebastian Alonso alon.sebast...@gmail.com wrote: Hey everyone, I've been working on an app that uses global hotkey and it's a very important part of the app, so far I have been using python-keybinder [0] and it's been working great on linux, but now I want to make it work under

Re: Best Git library for Python?

2010-10-05 Thread Dun Peal
On Oct 4, 7:23 pm, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: You can already check the exit status from the subprocess. What more do you need? A robust mechanism to deal with said issues... Of course I can write it myself, but it would save much time and effort if I could

Module loading trickery

2010-10-05 Thread Jonas Galvez
Is there a way to inject something into a module right before it's loaded? For instance, a.py defines foo. b.py print()s foo. I want to load b.py into a.py, but I need to let b.py know about foo before it can execute. Is this any way to achieve this? -- Jonas --

Re: Module loading trickery

2010-10-05 Thread Jean-Michel Pichavant
Jonas Galvez wrote: Is there a way to inject something into a module right before it's loaded? For instance, a.py defines foo. b.py print()s foo. I want to load b.py into a.py, but I need to let b.py know about foo before it can execute. Is this any way to achieve this? -- Jonas No that

Re: subclass constructor problem

2010-10-05 Thread Diez B. Roggisch
Nikola Skoric n...@fly.srk.fer.hr writes: I have a superclass Element and a subclass Family. All Family.__init__() does is run Element.__init__() and self.__parse(). For some reason it seems like self.__parse() isn't run. Here is the code:

Re: Module loading trickery

2010-10-05 Thread Thomas Jollans
On Tuesday 05 October 2010, it occurred to Jonas Galvez to exclaim: Is there a way to inject something into a module right before it's loaded? For instance, a.py defines foo. b.py print()s foo. I want to load b.py into a.py, but I need to let b.py know about foo before it can execute.

Re: Help with sets

2010-10-05 Thread nn
Semantic web.  I did get a bit confused in reading about the concept of sets in python and why you would use them instead of a dictionary for Sets are faster and more convenient to do intersections, unions, differences. They also use less space than dictionaries. Finally they also help

Re: Module loading trickery

2010-10-05 Thread Jonas Galvez
Thanks a million, runpy is exactly what I was looking for! I will send you a link to what I'm using it for when it's done. Then you'll understand ;) -- Jonas On Tue, Oct 5, 2010 at 1:06 PM, Thomas Jollans tho...@jollybox.de wrote: On Tuesday 05 October 2010, it occurred to Jonas Galvez to

Re: How to convert a string into a list

2010-10-05 Thread Matteo Landi
What about using the json library? It could handle errors for you: import json s = '[1, 2]' json.loads(s) [u'1', u'2'] Now you can convert then to integer values. Best regards, Matteo On Tue, Oct 5, 2010 at 3:41 PM, Mark Phillips m...@phillipsmarketing.biz wrote: Thanks to everyone for their

Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread chaoticcran...@gmail.com
So, I have a rather tricky string comparison problem: I want to search for a set pattern in a variable source. To give you the context, I am searching for set primer sequences within a variable gene sequence. In addition to the non-degenerate A/G/ C/T, the gene sequence could have degenerate

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread MRAB
On 05/10/2010 20:03, chaoticcran...@gmail.com wrote: So, I have a rather tricky string comparison problem: I want to search for a set pattern in a variable source. To give you the context, I am searching for set primer sequences within a variable gene sequence. In addition to the non-degenerate

Re: Fastest technique for string concatenation

2010-10-05 Thread Will Hall
On Oct 3, 8:19 am, Roy Smith r...@panix.com wrote: My local news feed seems to have lost the early part of this thread, so I'm afraid I don't know who I'm quoting here: My understanding is that appending to a list and then joining this list when done is the fastest technique for string

Re: [Python-ideas] [Python-Dev] Inclusive Range

2010-10-05 Thread MRAB
On 05/10/2010 20:23, spir wrote: On Tue, 05 Oct 2010 13:45:56 +0200 Boris Borcicbbor...@gmail.com wrote: Nick Coghlan wrote: [...] Being able to say things like 10:00= x '12:00, 10.0= x 12.0, a= x n are much clearer than trying to specify their closed range equivalents. makes one

Re: Please help: pylint does not work with Emacs23 on Windows

2010-10-05 Thread Dsrt Egle
On Oct 4, 3:53 am, Alexandre Fayolle alexandre.fayo...@logilab.fr wrote: Alexandre Fayolle wrote: DsrtEglewrote: Hi, I am trying to use Pylint with Emacs on Windows XP. My Emacs version is EmacsW32 23.1, pylint is 0.21.3 with Python 2.5. After easy_install pylint, I added the code

Re: Fastest technique for string concatenation

2010-10-05 Thread Will Hall
On Oct 5, 2:39 pm, Will Hall wrs...@gmail.com wrote: On Oct 3, 8:19 am, Roy Smith r...@panix.com wrote: My local news feed seems to have lost the early part of this thread, so I'm afraid I don't know who I'm quoting here: My understanding is that appending to a list and then joining

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread chaoticcran...@gmail.com
On Oct 5, 3:38 pm, MRAB pyt...@mrabarnett.plus.com wrote: On 05/10/2010 20:03, chaoticcran...@gmail.com wrote: So, I have a rather tricky string comparison problem: I want to search for a set pattern in a variable source. To give you the context, I am searching for set primer sequences

Double Clicking on .pyw File Doesn't Work in Windows 7

2010-10-05 Thread Saul Spatz
When I double-click on a file with a .pyw extension, nothing appears to happen. Control panel shows that pythonw is associated with this extension, and if I right-click on the filename, the program suggested to open it is pythonw.exe. If I make a desktop shortcut with the target pythonw.exe

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread Tim Chase
On 10/05/10 15:06, chaoticcran...@gmail.com wrote: On Oct 5, 3:38 pm, MRABpyt...@mrabarnett.plus.com wrote: On 05/10/2010 20:03, chaoticcran...@gmail.com wrote: So, I have a rather tricky string comparison problem: I want to search for a set pattern in a variable source. To give you the

Re: PyQt imageViewer does not working properly...

2010-10-05 Thread Hans-Peter Jansen
On Tuesday 05 October 2010, 00:29:04 Polimeno wrote: Hello guys, I have been looking throughout the web for some PyQt Image Viewer : http://nullege.com/codes/show/src%40pyformex-0.8.2%40pyformex%40gui%40ima geViewer.py/78/PyQt4.QtGui.QImage# Unfortunately, everytime I input any kind of

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread MRAB
On 05/10/2010 21:06, chaoticcran...@gmail.com wrote: On Oct 5, 3:38 pm, MRABpyt...@mrabarnett.plus.com wrote: On 05/10/2010 20:03, chaoticcran...@gmail.com wrote: So, I have a rather tricky string comparison problem: I want to search for a set pattern in a variable source. To give you

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread MRAB
[snip] Additional: I forgot to mention that you should understand the difference between the .match() and .search() mthods. .match() is anchored to the starting position, so you'll want to use .search() instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] [Python-Dev] Inclusive Range

2010-10-05 Thread Wolfgang Rohdewald
On Dienstag 05 Oktober 2010, MRAB wrote: About notation, even if loved right-hand-half-open intervals, I would wonder about [a,b] noting it. I guess 99.9% of programmers and novices (even purely amateur) have learnt about intervals at school in math courses. Both notations I know of use

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread Terry Reedy
On 10/5/2010 5:13 AM, TheOne wrote: It's a MS-specific thing that makes a file identifieable as UTF-8-encoded under windows. The name BOM is obviously BS, but it's the way it is. I didn't know that it's a MS-thing. (Is it really?) Yes, who else would 'customize' an international standard

Re: Help with sets

2010-10-05 Thread Terry Reedy
On 10/5/2010 3:01 AM, Ian Kelly wrote: self._pos = {predicate: {object: {subject: None}}} That's a bit ugly because the None serves no purpose here; the value associated with the subject has no meaning in this context. This is what we did in Python before sets were added. It also

Re: I don't get why sys.exit(1) doesn't exit the while loop in the follow case

2010-10-05 Thread Nobody
On Tue, 05 Oct 2010 13:57:11 +1100, Ben Finney wrote: Here's your problem. Don't ever use a bare ‘except’ unless you know exactly why you're doing so. Rather, figure out what exception types you want to catch, and catch *only* those types. If I use a bare except, I usually have a good reason,

Re: [Python-ideas] [Python-Dev] Inclusive Range

2010-10-05 Thread Chris Rebert
On Tue, Oct 5, 2010 at 1:31 PM, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Dienstag 05 Oktober 2010, MRAB wrote: About notation, even if loved right-hand-half-open intervals, I would wonder about [a,b] noting it. I guess 99.9% of programmers and novices (even purely amateur) have

Re: Help with sets

2010-10-05 Thread Terry Reedy
On 10/5/2010 3:39 AM, Steven D'Aprano wrote: Sets aren't an alternative to dictionaries. They have a completely different purpose. A dict/mapping is a specialized set -- a set of ordered pairs in which each first member (the 'key') only appears once as a first member. The set union of two

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread Arnaud Delobelle
chaoticcran...@gmail.com chaoticcran...@gmail.com writes: So, I have a rather tricky string comparison problem: I want to search for a set pattern in a variable source. To give you the context, I am searching for set primer sequences within a variable gene sequence. In addition to the

How to save a binary file?

2010-10-05 Thread hidura
Hello, how i can save a binary file, i read in the manual in the IO area but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() If needs the binary code i could upload. --

Re: Best Git library for Python?

2010-10-05 Thread Ben Finney
Dun Peal dunpea...@gmail.com writes: Of course I can write it myself, but it would save much time and effort if I could use something that's already written. You don't mention which ones you've already evaluated or are aware of, so I'll point out that Bazaar and Mercurial both use the Dulwich

Re: Wildcard String Comparisons: Set Pattern to a Wildcard Source

2010-10-05 Thread chaoticcran...@gmail.com
Ah, very good, it's working perfectly now. Thank you so much for your help - regular expressions are very powerful! On Oct 5, 4:26 pm, MRAB pyt...@mrabarnett.plus.com wrote: [snip] Additional: I forgot to mention that you should understand the difference between the .match() and .search()

Re: How to save a binary file?

2010-10-05 Thread Jonas H.
On 10/05/2010 11:11 PM, hid...@gmail.com wrote: Hello, how i can save a binary file, i read in the manual in the IO area but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() So where's the

Re: Re: Re: How to save a binary file?

2010-10-05 Thread hidura
I did but the mistake is: Error interpreting JPEG image file (Not a JPEG file: starts with 0x5c 0x6e) I think the problem is maybe in the binary code here is:

meta-class review

2010-10-05 Thread Ethan Furman
On one the many mini-reports we use, we have a bunch of counts that are frequently zero; because the other counts can also be low, it becomes easy to miss the non-zero counts. For example: Code Description Conv Errors : 6 31,N DPV Failure : 4

Re: How to save a binary file?

2010-10-05 Thread MRAB
On 05/10/2010 23:50, hid...@gmail.com wrote: I did but the mistake is: Error interpreting JPEG image file (Not a JPEG file: starts with 0x5c 0x6e) I think the problem is maybe in the binary code here is: [snip] Sorry for the last send. On Oct 5, 2010 6:18pm, Jonas H. jo...@lophus.org wrote:

Re: meta-class review

2010-10-05 Thread MRAB
On 06/10/2010 00:17, Ethan Furman wrote: On one the many mini-reports we use, we have a bunch of counts that are frequently zero; because the other counts can also be low, it becomes easy to miss the non-zero counts. For example: Code Description Conv Errors : 6

Re: Best Git library for Python?

2010-10-05 Thread Lawrence D'Oliveiro
In message ac9b63bc-88ca-4b7b-b3f0-e4563ed7d...@t20g2000yqa.googlegroups.com, Dun Peal wrote: On Oct 4, 7:23 pm, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: You can already check the exit status from the subprocess. What more do you need? A robust mechanism to deal with

Re: Eclipse/PyDev - BOM Lexical Error

2010-10-05 Thread Lawrence D'Oliveiro
In message 87d3rorf2f@web.de, Diez B. Roggisch wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: What exactly is the point of a BOM in a UTF-8-encoded file? It's a marker like the coding: utf-8 in python-files. It tells the software aware of it that the content is

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message mailman.1339.1286268545.29448.python-l...@python.org, Antoon Pardon wrote: On Tue, Oct 05, 2010 at 06:55:33PM +1300, Lawrence D'Oliveiro wrote: In message mailman.1232.1285927634.29448.python-l...@python.org, Antoon Pardon wrote: On Wed, Sep 29, 2010 at 01:38:48PM +0200,

Re: Module loading trickery

2010-10-05 Thread Dave Angel
On 2:59 PM, Thomas Jollans wrote: snip % cat a.py foo = 'Meh.' import b % cat b.py from a import foo print(foo) % python a.py Meh. % But there are now two modules containing separate items foo, one is called __main__, and the other is called a. The former is the script you ran, and

Re: if the else short form

2010-10-05 Thread Andreas Waldenburger
On Tue, 05 Oct 2010 18:54:42 +1300 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: “boolnoob” Bwahahahah! Nice! I'd love to say that I'll add this to my active vocabulary, but I don't think there will be enough opportunities to use it. :-/ /W -- INVALID? DE! --

www.dating4url.blogspot.com

2010-10-05 Thread roshini begum
Hi visit my website www.dating4url.blogspot.com for hot dating images, real dating tips -- http://mail.python.org/mailman/listinfo/python-list

help!!!

2010-10-05 Thread fkrafi
plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it#includecstdio int main() { int a[100], n; freopen(input.txt, r, stdin); scanf(%d, n); for(int i=1; i=n; i++)

Re: help!!!

2010-10-05 Thread James Mills
On Wed, Oct 6, 2010 at 1:54 PM, fkr...@aboutrafi.net23.net wrote: plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it Should take you 10 minutes to convert this to Python assuming you know a little C/C++. Doing this

Free download: Hot HD movies: Torrent, RAPIDSHARE, megaupload .... LINK, update daily...

2010-10-05 Thread Sheila maria
HD Family Club -- download HD DVD Movies with rapidshare, megaupload, torrent link ... 100% free .. The Expendables (2010), hot movie!!! Sylvester Stallone, Jason Statham, Jet Li, Dolph Lundgren http://hd-family.blogspot.com/2010/09/expendables-2010.html Redline (2007) RAPIDSHARE LINK;

Re: help!!!

2010-10-05 Thread Jason Swails
This looks like homework. There's very little to be gained by having an anonymous forum poster do your HW for you. (it looks like all it does is fill an array from a file, anyway, not terribly difficult). If you want to learn python, google the necessary tasks (i.e. opening a file and parsing

Re: Re: How to save a binary file?

2010-10-05 Thread hidura
I has to use repr to convert in this string: ÿØÿà\x00\x10JFIF? On Oct 5, 2010 8:03pm, MRAB pyt...@mrabarnett.plus.com wrote: On 05/10/2010 23:50, hid...@gmail.com wrote: I did but the mistake is: Error interpreting JPEG image file (Not a JPEG file: starts with 0x5c 0x6e) I think the

Re: Re: How to save a binary file?

2010-10-05 Thread Chris Rebert
On Oct 5, 2010 8:03pm, MRAB pyt...@mrabarnett.plus.com wrote: On 05/10/2010 23:50, hid...@gmail.com wrote: I did but the mistake is: Error interpreting JPEG image file (Not a JPEG file: starts with 0x5c 0x6e) I think the problem is maybe in the binary code here is: snip   On Oct 5, 2010

Re: meta-class review

2010-10-05 Thread Ethan Furman
MRAB wrote: On 06/10/2010 00:17, Ethan Furman wrote: [snip] Any comments appreciated, especially ideas on how to better handle class- and staticmethods I think that's a bit of overkill. The problem lies in the printing part, but you're spreading the solution into the rest of the

Re: if the else short form

2010-10-05 Thread Lawrence D'Oliveiro
In message 20101005223520.3f5d9...@geekmail.invalid, Andreas Waldenburger wrote: On Tue, 05 Oct 2010 18:54:42 +1300 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: “boolnoob” Bwahahahah! Nice! And of course, an instance of such boolnoobery can be referred to as a

[issue9907] interactive mode TAB does not insert on OS X built with editline instead of GNU readline

2010-10-05 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The modified patch looks OK to me and tests OK. The rl_read_init_file call seems like a reasonable thing for users who are used to using libedit's .editrc. As a practical matter, though, I think the only thing that would be affected is an .editrc

[issue10021] Format parser is too permissive

2010-10-05 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I seem to remember this having been discussed before, but I cannot find the right thread. It came up in the issue 7951 discussion, I think. -- ___ Python tracker rep...@bugs.python.org

[issue9980] str(float) failure

2010-10-05 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9980 ___ ___

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-10-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: If you were worried about performance, then surrogateescape is certainly much slower than latin1. If you were really worried about performance, the bytes type is maybe faster than: decode bytes to str using latin-1, process str

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-10-05 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The test_heading_callback failure appears to be another Tk 8.4 vs Tk 8.5 problem. Datapoints: the test fails using the Apple-supplied Tk 8.4 in OS X 10.6 and with a recent ActiveState Aqua Tk 8.4 on OS X 10.5; the test succeeds with the

[issue7330] PyUnicode_FromFormat segfault

2010-10-05 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: I update the patch. Hope somebody could do a review. -- Added file: http://bugs.python.org/file19131/issue_7330.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330

[issue7330] PyUnicode_FromFormat segfault

2010-10-05 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: I update the patch. Hope somebody could do a review. -- Added file: http://bugs.python.org/file19132/issue_7330.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330

[issue7330] PyUnicode_FromFormat segfault

2010-10-05 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Oooops! Sorry for re-submit the request... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___

  1   2   >