PyGameZine issue0. For details see: http://pygame.org/

2011-11-21 Thread René Dudfield
Hello, we just launched the first issue of PyGameZine. You can find out about it on the pygame website. http://www.pygame.org/ cheers! -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

[ANNOUNCE] pypiserver 0.4.0 - minimal pypi server

2011-11-21 Thread Ralf Schmitt
Hi, I've just uploaded pypiserver 0.4.0 to the python package index. pypiserver is a minimal PyPI compatible server. It can be used to serve a set of packages and eggs to easy_install or pip. pypiserver is easy to install (i.e. just easy_install pypiserver). It doesn't have any external

PyPy 1.7 - widening the sweet spot

2011-11-21 Thread Maciej Fijalkowski
== PyPy 1.7 - widening the sweet spot == We're pleased to announce the 1.7 release of PyPy. As became a habit, this release brings a lot of bugfixes and performance improvements over the 1.6 release. However, unlike the previous

LFS 0.6 beta 1 released

2011-11-21 Thread Kai
Hi, I'm happy to announce the release of LFS 0.6 beta 1. LFS is an online shop based on Django and jQuery. If you want to read more information please refer to: http://www.getlfs.com/released-06-beta-1 Thanks Kai -- http://mail.python.org/mailman/listinfo/python-list

Re: Close as Many Files/External resourcs as possible in the face of exceptions

2011-11-21 Thread Vincent Vande Vyvre
Le 21/11/11 06:46, GZ a crit: Hi, Here is my situation. A parent object owns a list of files (or other objects with a close() method). The close() method can sometimes fail and raise an exception. When the parent object's close() method is called, it needs to close down as

Re: (don't bash me too hard) Python interpreter in JavaScript

2011-11-21 Thread Alec Taylor
Just compile your python to C :] On Mon, Nov 21, 2011 at 6:41 PM, OKB (not okblacke) brennospamb...@nobrenspambarn.net wrote: Carl Banks wrote: Some people have already made an LLVM-to-Javascript compiler, and have managed to build Python 2.7 with it. The LLVM-to-Javascript project is

Re: Got some problems when using logging Filter

2011-11-21 Thread Vinay Sajip
On Nov 21, 7:15 am, sword john...@gmail.com wrote: Thank you! Maybe I should find out another way to manipulate the log, like wrap the getLogger function and add the filter at the first time :) If you are using Python 2.7, 3.2 or later, you can use dictionary- based configuration - it's

RE: ProgressBar - Python and Powershell

2011-11-21 Thread Nikunj.Badjatya
Yes I am executing powershell commands into virtual machines. Will have a look at WiX. But please, Answer my questions: My questions are: 1. Can I have a better shared mechanism between python and powershell.? As I am using a file here. Reading + writing in python and writing only

Re: Got some problems when using logging Filter

2011-11-21 Thread Jean-Michel Pichavant
sword wrote: On Nov 16, 7:40 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: sword wrote: The logging cookbook gives an Filter example, explainning how to add contextural info to log. I can't figure out how to filter log from it. Suppose I have 3 file, a.py, b.py and

Re: Close as Many Files/External resourcs as possible in the face of exceptions

2011-11-21 Thread Mel Wilson
GZ wrote: Here is my situation. A parent object owns a list of files (or other objects with a close() method). The close() method can sometimes fail and raise an exception. When the parent object's close() method is called, it needs to close down as many files it owns as possible, even if

Format the ouput in my python code

2011-11-21 Thread sl33k
I am printing the numbers from 1 to 100. In that, I want to display multiples of 3,5 and of both as mulof3, mul0f5 and mulof3and5 respectively. I am getting the output I want but I would like to format the output to print only 10 number per line. How do I go about doing this? for i in range(1,

RE: ProgressBar - Python and Powershell

2011-11-21 Thread Nikunj.Badjatya
Hey Thanks. Will do that. Just a question in general. Is it possible that we have opened one file in r+ mode ( file1.txt ). We have 2 threads, thread1 will continuously only read the file in a loop. Thread2 will only update the data in the file. Now thread2 has called other script ( written

Re: Is there any way to unimport a library

2011-11-21 Thread Jean-Michel Pichavant
Gelonida N wrote: I wondered whether there is any way to un-import a library, such, that it's occupied memory and the related shared libraries are released. My usecase is following: success = False try: import lib1_version1 as lib1 import lib2_version1 as lib2 success = True

Re: ProgressBar - Python and Powershell

2011-11-21 Thread Alec Taylor
New thread! On Mon, Nov 21, 2011 at 11:27 PM, nikunj.badja...@emc.com wrote: Hey Thanks. Will do that. Just a question in general.  Is it possible that we have opened one file in r+ mode ( file1.txt ). We have 2 threads, thread1 will continuously only read the file in a loop. Thread2 will

Re: Is there any way to unimport a library

2011-11-21 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: Gelonida N wrote: I wondered whether there is any way to un-import a library, such, that it's occupied memory and the related shared libraries are released. My usecase is following: success = False try: import lib1_version1 as lib1 import lib2_version1

Multiple Threads - I/O in Same File

2011-11-21 Thread Nikunj.Badjatya
Hi All, Just a question in general. Is it possible that we have opened one file in r+ mode ( file1.txt ). We have 2 threads, * Thread1 will continuously 'only read' the file in a loop. * Thread2 will only update the data in the file ( say a number 100 ). Now thread2 has

New memcached module

2011-11-21 Thread Jayson Santos
Hi guys, I have created a pure python module [1] to work with memcached in binary protocol with SASL authentication. I need some contributors or people to discuss some idead about it, anyone is free to contact me, any help will be appreciated. Thank You Jayson Reis [1]

JSON passing protocol

2011-11-21 Thread Alec Taylor
Good morning, I'm planning on assembling my django templates onto mobile apps using a JSON passing protocol, probably tunnels through HTTP. What's available? Thanks for all information, Alec Taylor -- http://mail.python.org/mailman/listinfo/python-list

How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread ray
I am trying to get the data from a CSV file into variables. I have used DictReader to get the field names and I can report them. When I attempt to look at the data, every row shows the combination of fieldname:data. How do I get the data out? linelist=open(

How to Get Data from DictReader for CSV Files

2011-11-21 Thread ray
I don't see how to get my data from the output. I can see the data in the rows but it is mixed in with the field names. That is, the data I get comes out as: fieldname1 : data1 , fieldname2 : data2 , etc. import csv linelist=open( C:/Users/me/line_list_r0.csv, rb ) csvReader= csv.DictReader(

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Neil Cerutti
On 2011-11-21, ray r...@aarden.us wrote: I am trying to get the data from a CSV file into variables. I have used DictReader to get the field names and I can report them. When I attempt to look at the data, every row shows the combination of fieldname:data. How do I get the data out?

Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread mlenz
I'm working on a project where I need to communicate with some devices via modem which have the possibility of using MARK and SPACE parity. These are not defined by POSIX and therefore are not directly supported under Linux. I've found the following discussion on the topic:

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
I should also note that I am aware of the following discussion on the newsgroup: https://groups.google.com/d/msg/comp.lang.python/1HyCqPSOf50/eQINFrrFKwoJ However, I believe this refers to implementing the solution for 8M1 and 8S1. -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Nizamov Shawkat
2011/11/21 ml...@nocturnal.org: I'm working on a project where I need to communicate with some devices via modem which have the possibility of using MARK and SPACE parity.  These are not defined by POSIX and therefore are not directly supported under Linux. I've found the following

Re: Format the ouput in my python code

2011-11-21 Thread Dave Angel
On 11/21/2011 07:13 AM, sl33k wrote: I am printing the numbers from 1 to 100. In that, I want to display multiples of 3,5 and of both as mulof3, mul0f5 and mulof3and5 respectively. I am getting the output I want but I would like to format the output to print only 10 number per line. How do I

Re: Format the ouput in my python code

2011-11-21 Thread Dave Angel
On 11/21/2011 09:27 AM, Dave Angel wrote: On 11/21/2011 07:13 AM, sl33k wrote: I am printing the numbers from 1 to 100. In that, I want to display multiples of 3,5 and of both as mulof3, mul0f5 and mulof3and5 respectively. I am getting the output I want but I would like to format the output

decorators and closures

2011-11-21 Thread Andrea Crotti
With one colleague I discovered that the decorator code is always executed, every time I call a nested function: def dec(fn): print(In decorator) def _dec(): fn() return _dec def nested(): @dec def fun(): print(here) nested() nested() Will give: In

Re: decorators and closures

2011-11-21 Thread Dave Angel
On 11/21/2011 09:44 AM, Andrea Crotti wrote: With one colleague I discovered that the decorator code is always executed, every time I call a nested function: def dec(fn): print(In decorator) def _dec(): fn() return _dec def nested(): @dec def fun():

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread ray
On Nov 21, 7:59 am, Neil Cerutti ne...@norwich.edu wrote: On 2011-11-21, ray r...@aarden.us wrote: I am trying to get the data from a CSV file into variables.  I have used DictReader to get the field names and I can report them.  When I attempt to look at the data, every row shows the

Re: decorators and closures

2011-11-21 Thread Andrea Crotti
On 11/21/2011 03:06 PM, Dave Angel wrote: Your function 'nested' isn't nested, 'fun' is. What you discovered is that a decorator is always executed, every time a nested decorated function is defined. You've also ust proved that it would be an incompatible change. Doesn't that answer the

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Neil Cerutti
On 2011-11-21, ray r...@aarden.us wrote: Is there a way to capture the keys outside of the for loop so when the for loop is entered, only data is extracted? I have sometimes done the following type of thing, since DictReader doesn't offer an attribute providing the field names. This is Python

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Neil Cerutti
On 2011-11-21, Neil Cerutti ne...@norwich.edu wrote: On 2011-11-21, ray r...@aarden.us wrote: Is there a way to capture the keys outside of the for loop so when the for loop is entered, only data is extracted? I have sometimes done the following type of thing, since DictReader doesn't offer

sqlalchemy beginner

2011-11-21 Thread Jabba Laci
Hi, I'm reading the Essential SQLAlchemy book from O'Reilly. It explains SqlAlch 0.4 but my current version is 0.7 and there are some differences. Here is an example from the book: user_table = Table('tf_user', metadata, Column('id', Integer, primary_key=True),

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Using 8N1 under minicom with this device resulted in garbled text when once connected. Connection using 7M1 resulted in the correct text. So there must be something else that needs to be done in my python program correct? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Get Data from DictReader for CSV Files

2011-11-21 Thread GZ
Hi, On Nov 21, 7:42 am, ray r...@aarden.us wrote: I don't see how to get my data from the output.  I can see the data in the rows but it is mixed in with the field names.  That is, the data I get comes out as: fieldname1 : data1 , fieldname2 : data2 , etc. import csv linelist=open(

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Chris Angelico
On Tue, Nov 22, 2011 at 3:28 AM, Matthew Lenz matt...@nocturnal.org wrote: Using 8N1 under minicom with this device resulted in garbled text when once connected.  Connection using 7M1 resulted in the correct text.  So there must be something else that needs to be done in my python program

What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-21 Thread W. eWatson
My criterion for success is that it puts IDLE as a choice for editor on the menu produced with a right-click on a py file. So far no response on this has solved the problem. I know it sets up that way on a 2.5 and 2.4 on other PCs I have. I know at one time it worked on my 64-bit Win 7 PC,

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread David Riley
On Nov 21, 2011, at 11:28 AM, Matthew Lenz wrote: Using 8N1 under minicom with this device resulted in garbled text when once connected. Connection using 7M1 resulted in the correct text. So there must be something else that needs to be done in my python program correct? Under minicom in

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Ahh. Ok. So how would I go about doing that with python? I think in perl (sorry for the naughty word) I could use the tr// (translate) but is there a quick way to do so with python? Is it going to be necessary to convert commands I SEND to the device or only convert what I receive? --

Re: sqlalchemy beginner

2011-11-21 Thread John Gordon
In mailman.2906.1321891043.27778.python-l...@python.org Jabba Laci jabba.l...@gmail.com writes: SAWarning: Unicode column received non-unicode default value. Column('display_name', Unicode(255), default=''), Perhaps it would help to supply the default value as a Unicode string instead of a

Re: decorators and closures

2011-11-21 Thread Dave Angel
On 11/21/2011 10:35 AM, Andrea Crotti wrote: On 11/21/2011 03:06 PM, Dave Angel wrote: Your function 'nested' isn't nested, 'fun' is. What you discovered is that a decorator is always executed, every time a nested decorated function is defined. You've also ust proved that it would be an

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-21 Thread Andrea Crotti
On 11/21/2011 04:39 PM, W. eWatson wrote: ... I'm using Win 7 Premium. So unless some brilliant idea appears, that leaves me with the choice of not using Python or this suggestion... (Let's not get off into other variations of other Pythons like Active...): Someone suggested using the mail

Re: decorators and closures

2011-11-21 Thread Andrea Crotti
On 11/21/2011 05:11 PM, Dave Angel wrote: You didn't mention what version of Python you're running. With Python 2, I got very different results. So I switched to Python 3.2, and I still don't get exactly what you have. A closure is needed if there's some non-global data outside the

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread David Riley
On Nov 21, 2011, at 11:52 AM, Matthew Lenz wrote: Ahh. Ok. So how would I go about doing that with python? I think in perl (sorry for the naughty word) I could use the tr// (translate) but is there a quick way to do so with python? Is it going to be necessary to convert commands I SEND

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread gene heskett
On Monday, November 21, 2011 11:58:53 AM David Riley did opine: On Nov 21, 2011, at 11:28 AM, Matthew Lenz wrote: Using 8N1 under minicom with this device resulted in garbled text when once connected. Connection using 7M1 resulted in the correct text. So there must be something else that

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread David Riley
On Nov 21, 2011, at 12:25 PM, gene heskett wrote: And that is 9600 baud 8n1 on both ends. Ascii is normally 7 bit and will have a low 8th bit if fed normal ascii data, so how is the 8th bit getting set other than purposely setting 7M1 on the other end of the cable? That's what I thought

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-21 Thread Cousin Stanley
W. eWatson wrote: My criterion for success is that it puts IDLE as a choice for editor on the menu produced with a right-click on a py file. So far no response on this has solved the problem. As an alternative you might consider adding a short-cut to IDLE to the Send To

Re: How to Get Data from DictReader for CSV Files

2011-11-21 Thread Ian Kelly
The point of DictReader is that it produces dicts. If you actually want a sequence, then use an ordinary csv.reader instead. -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Thanks, this will be a great help. Just wanted to confirm that you meant to use [ .. for x in ord_str] in the example conversion? Got a TypeError using the received_str. -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread David Riley
On Nov 21, 2011, at 12:59 PM, Matthew Lenz wrote: Thanks, this will be a great help. Just wanted to confirm that you meant to use [ .. for x in ord_str] in the example conversion? Got a TypeError using the received_str. Yes, I probably should have double-checked that. ord_str is indeed

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread MRAB
On 21/11/2011 16:52, Matthew Lenz wrote: Ahh. Ok. So how would I go about doing that with python? I think in perl (sorry for the naughty word) I could use the tr// (translate) but is there a quick way to do so with python? Is it going to be necessary to convert commands I SEND to the device

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread gene heskett
On Monday, November 21, 2011 01:28:16 PM David Riley did opine: On Nov 21, 2011, at 12:25 PM, gene heskett wrote: And that is 9600 baud 8n1 on both ends. Ascii is normally 7 bit and will have a low 8th bit if fed normal ascii data, so how is the 8th bit getting set other than purposely

Re: SQLObject 1.2.0

2011-11-21 Thread Daniel Fetchinson
Thanks a million Oleg! Cheers, Daniel On 11/20/11, Oleg Broytman p...@phdru.name wrote: Hello! I'm pleased to announce version 1.2.0, the first stable release of branch 1.2 of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database

[ANN] json_diff 0.9.2 released - JSON files comparator

2011-11-21 Thread Matěj Cepl
I released json_diff 0.9.2. http://pypi.python.org/pypi/json_diff json_diff is an utility comparing two JSON files and generating diff in form of another JSON file with differences for each level of the object in a dict { _append: {}, _remove: {}, _update: {} } This is the first

Re: How to: Coordinate DictReader and Reader for CSV

2011-11-21 Thread Tim Chase
On 11/21/11 09:16, ray wrote: Is there a way to capture the keys outside of the for loop so when the for loop is entered, only data is extracted? I frequently do this for things like tweaking headers (stripping space, normalizing case, etc because clients love to send us messy data): def

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Matthew Lenz
Another thing I noticed is that the and | appear to give the same result as adding or subtracting 128 from the ordinal value. I'm assuming that isn't coincidence. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Grant Edwards
On 2011-11-21, Matthew Lenz matt...@nocturnal.org wrote: Another thing I noticed is that the and | appear to give the same result as adding or subtracting 128 from the ordinal value. Nope, that's only true for some values. If we're limiting ourselves to byte values, then we're talking

SetStatusText of MDIParentFrame from MDIChildFrame

2011-11-21 Thread Illy
Dear my friends I am stucked on a problem: I can't call a function of MDIParentFrame from MDIChildFrame: myturnonmenu and mystatusbar.SetStatusText() Anybody would be so nice for telling me my mistakes? Please do me a favor. Thank you very much in advance. I created 3 files contain this

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread David Riley
On Nov 21, 2011, at 2:29 PM, Matthew Lenz wrote: Another thing I noticed is that the and | appear to give the same result as adding or subtracting 128 from the ordinal value. I'm assuming that isn't coincidence. :) It's not, though the difference is important. They're binary ANDs () and

Re: youtube-dl: way to deal with the size cap issue + new errors + issues ...

2011-11-21 Thread Philipp Hagemeister
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 As a general rule, feel free to contact youtube-dl developers and users at https://github.com/rg3/youtube-dl/issues/ . youtube-dl is just one application, which happens to be written in Python. l...@mail.python.org wrote: I did find my way

mask one array using another array

2011-11-21 Thread questions anon
I am trying to mask one array using another array. I have created a masked array using mask=MA.masked_equal(myarray,0), that looks something like: [1 - - 1, 1 1 - 1, 1 1 1 1, - 1 - 1] I have an array of values that I want to mask whereever my mask has a a '-'. how do I do this? I

Re: Close as Many Files/External resourcs as possible in the face of exceptions

2011-11-21 Thread Terry Reedy
On 11/21/2011 7:09 AM, Mel Wilson wrote: GZ wrote: Here is my situation. A parent object owns a list of files (or other objects with a close() method). The close() method can sometimes fail and raise an exception. When the parent object's close() method is called, it needs to close down as many

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-21 Thread Alan Meyer
On 11/17/2011 3:43 PM, Chris Angelico wrote: ... If you're having issues, grab a spare computer, throw Linux on it (I recommend Ubuntu or Debian, others will have other preferred distros), and see if the issues remain. Or if you're having trouble with the GUI, try things from the command line

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-21 Thread Terry Reedy
On 11/21/2011 11:39 AM, W. eWatson wrote: My criterion for success is that it puts IDLE as a choice for editor on the menu produced with a right-click on a py file. Your first criterion for success should be that IDLE runs at all, which is apparently does not. How you run it is secondary.

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Grant Edwards
On 2011-11-21, David Riley fraveyd...@gmail.com wrote: On Nov 21, 2011, at 2:29 PM, Matthew Lenz wrote: Another thing I noticed is that the and | appear to give the same result as adding or subtracting 128 from the ordinal value. I'm assuming that isn't coincidence. :) It's not, though

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Grant Edwards
On 2011-11-21, Grant Edwards invalid@invalid.invalid wrote: Like the old joke: There are 10 kinds of people in the world: those who understand binary numbers, and those who don't. OK, it's not _much_ of a joke, but I don't get to use it very often, so I couldn't let it go (for one thing,

Peculiarity of '@' in logging.Formatter

2011-11-21 Thread Charlie Martin
This is what seems like an odd bug, but in code I'd thing often-enough used it must be the expected behavior and I just don't understand. Please, sirs/mesdames, is this a bug? Example code: begin code --- #!/usr/bin/env python @-character WTF? import sys

Re: Peculiarity of '@' in logging.Formatter

2011-11-21 Thread Charlie Martin
Oops, forgot the python version etc: bash $ /usr/bin/env python -V Python 2.7 On SuSE 11.4 bash $ uname -a Linux crmartin 2.6.37.6-0.9-desktop #1 SMP PREEMPT 2011-10-19 22:33:27 +0200 x86_64 x86_64 x86_64 GNU/Linux -- http://mail.python.org/mailman/listinfo/python-list

Re: Using the Python Interpreter as a Reference

2011-11-21 Thread Travis Parks
On Nov 21, 12:44 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 21 Nov 2011 13:33:21 +1100, Chris Angelico wrote: What's your language's special feature? I like to keep track of languages using a slug - a simple one-sentence (or less) statement of when it's right

Re: sqlalchemy beginner

2011-11-21 Thread Roy Smith
In article mailman.2906.1321891043.27778.python-l...@python.org, Jabba Laci jabba.l...@gmail.com wrote: Hi, I'm reading the Essential SQLAlchemy book from O'Reilly. Everytime I've worked with SQLAlchemy, I've run away screaming in the other direction. Sure, portability is a good thing,

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

2011-11-21 Thread Chris Angelico
On Tue, Nov 22, 2011 at 10:09 AM, Grant Edwards invalid@invalid.invalid wrote: On 2011-11-21, Grant Edwards invalid@invalid.invalid wrote: Like the old joke:   There are 10 kinds of people in the world: those who understand   binary numbers, and those who don't. OK, it's not _much_ of a

Re: mask one array using another array

2011-11-21 Thread MRAB
On 21/11/2011 21:42, questions anon wrote: I am trying to mask one array using another array. I have created a masked array using mask=MA.masked_equal(myarray,0), that looks something like: [1 - - 1, 1 1 - 1, 1 1 1 1, - 1 - 1] I have an array of values that I want to mask

Re: mask one array using another array

2011-11-21 Thread questions anon
thank you, that makes sense. I should have posted this on another list (which I have now). and the change required is: If your new array is x, you can use: numpy.ma.masked_array(x, mask=mask.mask) On Tue, Nov 22, 2011 at 11:48 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 21/11/2011 21:42,

JSONBOT 0.80.3 RELEASED

2011-11-21 Thread Bart Thate
Hello world !! I released JSONBOT 0.80.3 .. the first in the 0.80 series ;] about ~ JSONBOT is a chatbot that can take commands and react to events on the network it is connected to (IRC, XMPP, WEB mostely). Push functionality is also provided (think RSS feeds to your IRC channel or XMPP

Re: sqlalchemy beginner

2011-11-21 Thread alex23
On Nov 22, 10:25 am, Roy Smith r...@panix.com wrote: Everytime I've worked with SQLAlchemy, I've run away screaming in the other direction.  Sure, portability is a good thing, but at what cost? I've never found SQLAlchemy to be anything but sane and approachable. It's really worth understanding

Re: JSONBOT 0.80.3 RELEASED

2011-11-21 Thread James Matthews
Looks good I am going to plug twisted into this. On Mon, Nov 21, 2011 at 9:49 PM, Bart Thate bth...@gmail.com wrote: Hello world !! I released JSONBOT 0.80.3 .. the first in the 0.80 series ;] about ~ JSONBOT is a chatbot that can take commands and react to events on the network it is

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-21 Thread alex23
W. eWatson wolftra...@invalid.com wrote: Comments? Please don't start multiple threads on the same issue. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Get Data from DictReader for CSV Files

2011-11-21 Thread ray
On Nov 21, 10:29 am, GZ zyzhu2...@gmail.com wrote: Hi, On Nov 21, 7:42 am, ray r...@aarden.us wrote: I don't see how to get my data from the output.  I can see the data in the rows but it is mixed in with the field names.  That is, the data I get comes out as: fieldname1 : data1 ,

Re: Multiple Threads - I/O in Same File

2011-11-21 Thread James Matthews
You may have some issues with disk reading as the drive heads move in different ways On Mon, Nov 21, 2011 at 8:15 AM, nikunj.badja...@emc.com wrote: Hi All, ** ** Just a question in general. Is it possible that we have opened one file in r+ mode ( file1.txt ). We have 2

Re: Is there any way to unimport a library

2011-11-21 Thread DevPlayer
On Nov 20, 12:21 pm, Gelonida N gelon...@gmail.com wrote: I forgot to mention, that this is at the moment more a thought experiment, than a real need. At the moment I will do exactly what you suggested. I will make sure, that always the first import fails. But I wanted to learn more what is

Re: Interesting problem about uuid1

2011-11-21 Thread alex23
On Nov 21, 5:33 pm, sword john...@gmail.com wrote: My colleague asks me an interesting problem about uuid library in python. In multicore system with multiprocessing, is it possible to get the duplicated uuid with uuid1? I just check the RFC 4122, and I can't find anything about multicore

Re: sqlalchemy beginner

2011-11-21 Thread Roy Smith
In article 8832ab6d-8def-45d1-92df-baac40e1c...@t36g2000prt.googlegroups.com, alex23 wuwe...@gmail.com wrote: On Nov 22, 10:25 am, Roy Smith r...@panix.com wrote: Everytime I've worked with SQLAlchemy, I've run away screaming in the other direction.  Sure, portability is a good thing, but

Re: decorators and closures

2011-11-21 Thread Steven D'Aprano
On Mon, 21 Nov 2011 14:44:34 +, Andrea Crotti wrote: With one colleague I discovered that the decorator code is always executed, every time I call a nested function: def is a statement which is executed at runtime. Often people will talk about definition time instead of compile time.

Re: sqlalchemy beginner

2011-11-21 Thread Cameron Simpson
On 21Nov2011 22:18, Roy Smith r...@panix.com wrote: | In article | 8832ab6d-8def-45d1-92df-baac40e1c...@t36g2000prt.googlegroups.com, | alex23 wuwe...@gmail.com wrote: | On Nov 22, 10:25?am, Roy Smith r...@panix.com wrote: | Everytime I've worked with SQLAlchemy, I've run away screaming in

[issue13433] String format documentation contains error regarding %g

2011-11-21 Thread Christian Iversen
Christian Iversen c...@sikkerhed.org added the comment: Certainly, I don't think we should be peppering the docs with warnings and notes, either. However, the elements in question _already have_ notes. I propose that the note for %g (4) simply be updated for clarity. Something like this,

[issue13437] Provide links to the source code for every module in the documentation

2011-11-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: There are usually two cases that lead me to check the code: 1) The documentation is incomplete, not clear, missing, or plain wrong; 2) I want to check how something is implemented, mostly just out of curiosity; Regarding the first case, in

[issue13443] wrong links and examples in the functional HOWTO

2011-11-21 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13443 ___

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-11-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Is Python supposed to support characters outside U+-U+10 range? No, they should be rejected. Allowing them in some specific places might cause them to leak somewhere else and cause problems, so I'd rather stick with that range

[issue9530] integer undefined behaviors

2011-11-21 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'd be happy to re-run the tests sometime. Yes, please! Alternatively, if there are easy instructions for us to re-run these tests, that would be valuable, too. Do I understand correctly that you have a publicly available extension to

[issue13170] distutils2 test failures

2011-11-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c1b1b537196d by Éric Araujo in branch 'default': Remove usage of stdlib shutil. http://hg.python.org/distutils2/rev/c1b1b537196d -- ___ Python tracker

[issue11751] Increase distutils.filelist / packaging.manifest test coverage

2011-11-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 723517bf6708 by Éric Araujo in branch 'default': Make test_manifest pass on 2.4 and 2.5 (fixes #11751). http://hg.python.org/distutils2/rev/723517bf6708 -- ___ Python

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-11-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a19dad38d4e8 by Victor Stinner in branch 'default': Issue #13441: _PyUnicode_CheckConsistency() dumps the string if the maximum http://hg.python.org/cpython/rev/a19dad38d4e8 --

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-11-21 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: No, they should be rejected. Allowing them in some specific places might cause them to leak somewhere else and cause problems, so I'd rather stick with that range and reject all the chars U+10 everywhere. That's why I added

[issue13387] suggest assertIs(type(obj), cls) for exact type checking

2011-11-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Your latest proposal is better. I would prefer mentioning subclasses, but don’t feel strongly about it. One markup nit: I’d use ``code`` instead of (ab)using :func:; the doc for assertIs is just a few paragraphs above, it won’t be hard to

[issue11751] Increase distutils.filelist / packaging.manifest test coverage

2011-11-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Did the second idea as suggested by Ezio. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13402] Document absoluteness of sys.executable

2011-11-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Patch looks good, but are you 100% sure that sys.executable is always absolute? (On all OSes, under multiprocessing, etc?) -- ___ Python tracker rep...@bugs.python.org

[issue12890] cgitb displays p tags when executed in text mode

2011-11-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23091/head-cgitb-display.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___

[issue12890] cgitb displays p tags when executed in text mode

2011-11-21 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23731/head-cgitb-display-tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___

[issue13402] Document absoluteness of sys.executable

2011-11-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Éric Araujo wrote: Patch looks good, but are you 100% sure that sys.executable is always absolute? (On all OSes, under multiprocessing, etc?) Well, its value is computed by a function named Py_GetProgramFullPath(), so I'm quite sure. I had a

[issue12890] cgitb displays p tags when executed in text mode

2011-11-21 Thread Jeff McNeil
Changes by Jeff McNeil j...@jmcneil.net: Added file: http://bugs.python.org/file23743/head-cgitb-display.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___

  1   2   >