Re: Python Book for a C Programmer?

2012-05-23 Thread Michael Poeltl
hi, take 'Pro Python' (by Marty Alchin) regards Michael * hsa...@gmail.com [2012-05-24 07:54]: > I am trying to join an online class that uses python. I need to brush up on > the language quickly. Is there a good book or resource that covers it well > but does not have to explain what an if..

Re: A better contextlib.contextmanager

2012-05-23 Thread Ethan Furman
Michele Simionato wrote: but I am asking a question instead: should I add this feature to the next release of the decorator module? I think it would be an excellent addition to your module. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Applying a patch from a diff in python (if possible)

2012-05-23 Thread Astan
On May 24, 1:24 pm, Astan wrote: > Hi, > I'm trying to synch up two databases that are very far from each other > using diff and patch. Currently, what happens is a mysqldump on > database A (which is linux) which is sent over to database B and over > time the diff of this mysql is sent over to da

PyDev IPython Confusion

2012-05-23 Thread Wanderer
I have two versions of Python and Ipython; Python 2.6.6 with Ipython 0.11 and Python 2.7.3 with Ipython 0.12. When I run the Eclipse PyDev console for the Python 2.7.3 it says it is using Ipython 0.11 as the interpreter. Ipython 0.11 should not be in the Path for Python 2.7.3. Is this a bug in Ipy

Applying a patch from a diff in python (if possible)

2012-05-23 Thread Astan
Hi, I'm trying to synch up two databases that are very far from each other using diff and patch. Currently, what happens is a mysqldump on database A (which is linux) which is sent over to database B and over time the diff of this mysql is sent over to database B. The database B lives on a NAS serv

Re: Fallen Angels, Originators of Evil on Planet Earth?

2012-05-23 Thread seededfromstars
I don't believe that angels originated evil. Take a look at this book http://www.amazon.com/The-Change-Freiderici-Ms/dp/147508076X/ref=sr_1_1?ie=UTF8&qid=1337792796&sr=8-1 -- http://mail.python.org/mailman/listinfo/python-list

Python Book for a C Programmer?

2012-05-23 Thread hsaziz
I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to explain what an if..then..else statement is? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Korean fonts on Python 2.6 (MacOsX)

2012-05-23 Thread 20_feet_tall
I have a problem with the visualization of korean fonts on Python. When I try to type in the characters only squares come out. I have tried to install the CJK codec, the hangul 1.0 codec but still no result. Hoep someone can help me out. -- http://mail.python.org/mailman/listinfo/python-list

problem loading matlab data with ompc and python

2012-05-23 Thread no1
Hi, we're investigating transitioning our company from matlab to python. We found OMPC as a MATLAB m-file-to Python translator, but we're encountering a problem using the translated code to import MATLAB data structures into Python. For example, when we save data within MATLAB this way: x.a = 5

A better contextlib.contextmanager

2012-05-23 Thread Michele Simionato
Python 3.2 enhanced contextlib.contextmanager so that it is possible to use a context manager as a decorator. For instance, given the contextmanager factory below @contextmanager def before_after(): print(before) yield print(after) it is possibile to use it to generate decorators: @b

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-23 Thread Fayaz Yusuf Khan
Jean-Michel Pichavant wrote: > Meanwhile you can shorten the code this way: > > root.addHandler(FileHandler('debug.log')) > root.handlers[-1].setLevel(DEBUG) > Eh? Readability was the aim. -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_

Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Dan Stromberg
On Wed, May 23, 2012 at 3:30 AM, Chris Withers wrote: > On 23/05/2012 00:34, Dan Stromberg wrote: > >> >> I find it more than a little disappointing that the Python Job Board >> doesn't do latitude and longitude. It's a big missed opportunity. Yes, >> it's not an identical process from nation t

Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Dan Stromberg
On Wed, May 23, 2012 at 2:27 AM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > Dan Stromberg wrote: > >> >> On Tue, May 22, 2012 at 3:20 PM, Ben Finney >> > ben+python@benfinney.**id.au >> wrote: >> >>Python Recruiter mailto:ro...@omniumit.com>> >>writes: >> >>> Can any one

Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Mark Lawrence
On 23/05/2012 11:30, Chris Withers wrote: On 23/05/2012 00:34, Dan Stromberg wrote: I find it more than a little disappointing that the Python Job Board doesn't do latitude and longitude. It's a big missed opportunity. Yes, it's not an identical process from nation to nation, but it's still imp

Re: Install python 2.6 and python 2.7 on Windows

2012-05-23 Thread Mark Lawrence
On 23/05/2012 21:45, Andrew Berg wrote: On 5/23/2012 3:25 PM, Gelonida N wrote: So I just install 2.7 and uncheck this box and I'll keep 2.6 right? Different versions are installed in different locations by default, and if you uncheck that box, the installer will leave file associations alone.

Re: Install python 2.6 and python 2.7 on Windows

2012-05-23 Thread Andrew Berg
On 5/23/2012 3:25 PM, Gelonida N wrote: > So I just install 2.7 and uncheck this box and I'll keep 2.6 right? Different versions are installed in different locations by default, and if you uncheck that box, the installer will leave file associations alone. -- CPython 3.3.0a3 | Windows NT 6.1.7601

Question about argparse and namespace

2012-05-23 Thread Kevin Anthony
the documentation says argparse.prase_args creates a new empty namespace, but if i pass it a existing namespace, it seems to append the arguments to the existing namespace An example is if it's part of a class, calling parser.parse_args(namespace=self) doesn't seem to have any ill effects. Is this

Re: append method

2012-05-23 Thread Chris Kaynor
On Wed, May 23, 2012 at 12:42 PM, Dave Angel wrote: > On 05/23/2012 03:13 PM, Emile van Sebille wrote: >> A design decision -- there's currently a mix of methods that return >> themselves and not.  Mostly is appears to me that mutables modify in >> place without returning self and immutables retur

Re: append method

2012-05-23 Thread Dave Angel
On 05/23/2012 03:13 PM, Emile van Sebille wrote: > On 5/23/2012 5:23 AM 水静流深 said... >> >>> s=[1,2,3] >> >>> s.append(5) >> >>> s >> [1, 2, 3, 5] >> >>> s=s.append(5) >> >>> s >> >>> print s >> None >> >> why can't s=s.append(5) > > It could, but it doesn't. > > >> ,what is the reason? > > >

Re: append method

2012-05-23 Thread Emile van Sebille
On 5/23/2012 5:23 AM 水静流深 said... >>> s=[1,2,3] >>> s.append(5) >>> s [1, 2, 3, 5] >>> s=s.append(5) >>> s >>> print s None why can't s=s.append(5) It could, but it doesn't. ,what is the reason? A design decision -- there's currently a mix of methods that return themselves and not

Re: append method

2012-05-23 Thread Karl Knechtel
On Wed, May 23, 2012 at 8:23 AM, 水静流深 <1248283...@qq.com> wrote: s=[1,2,3] s.append(5) s > [1, 2, 3, 5] s=s.append(5) s print s > None > > why can't  s=s.append(5)  ,what is the reason? For the same reason that you don't see `[1, 2, 3, 5]` immediately after doing `s.a

Re: escaping/encoding/formatting in python

2012-05-23 Thread John Nagle
On 4/5/2012 10:10 PM, Steve Howell wrote: On Apr 5, 9:59 pm, rusi wrote: On Apr 6, 6:56 am, Steve Howell wrote: You've one-upped me with 2-to-the-N backspace escaping. Early attempts at UNIX word processing, "nroff" and "troff", suffered from that problem, due to a badly designed macro

Re: append method

2012-05-23 Thread Jean-Michel Pichavant
wrote: >>> s=[1,2,3] >>> s.append(5) >>> s [1, 2, 3, 5] >>> s=s.append(5) >>> s >>> print s None why can't s=s.append(5) ,what is the reason? Because the append method returns None, not the object. It modifies the object in place, and does not create any copy. You can still write s

append method

2012-05-23 Thread ????????
>>> s=[1,2,3] >>> s.append(5) >>> s [1, 2, 3, 5] >>> s=s.append(5) >>> s >>> print s None why can't s=s.append(5) ,what is the reason?-- http://mail.python.org/mailman/listinfo/python-list

Re: GUI toolkits and dynamic table browser widget

2012-05-23 Thread Sibylle Koczian
Am 22.05.2012 04:37, schrieb Simon Cropper: On 22/05/12 05:35, Sibylle Koczian wrote: So I suppose you're using Python 2 or that's acceptable for you at least. In this case I'd take a long look at Dabo: http://www.dabodev.com/ That's based on wxPython but easier to use and explicitly made for da

How to launch idle -n on windows ?

2012-05-23 Thread Franck Ditter
I have some problems with Python 3.2 on Windows. I want to use the turtle package, works fine, but I can't close the turtle windows. On MacOS-X, I launch idle -n and it's fine. How can I do that on Windows ? Thanks, fd -- http://mail.python.org/mailman/listinfo/python-list

Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Chris Withers
On 23/05/2012 00:34, Dan Stromberg wrote: I find it more than a little disappointing that the Python Job Board doesn't do latitude and longitude. It's a big missed opportunity. Yes, it's not an identical process from nation to nation, but it's still important. If you had experience of how in

Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Chris Angelico
On Wed, May 23, 2012 at 7:27 PM, Jean-Michel Pichavant wrote: > Sorry for asking but what do you mean by "doing latitude and longitude". I > tried dictionaries + google and didn't find how these geographical terms > apply to job boards. Since you said it's important... My understanding of that is

Re: Please use the Python Job Board for recruiting

2012-05-23 Thread Jean-Michel Pichavant
Dan Stromberg wrote: On Tue, May 22, 2012 at 3:20 PM, Ben Finney mailto:ben+pyt...@benfinney.id.au>> wrote: Python Recruiter mailto:ro...@omniumit.com>> writes: > Can any one help? I am looking for a Senior Python Developer Yes, please use the Python Job Board for this purpo

Re: install python 2.6 on Ubuntu 12.04

2012-05-23 Thread Christian Heimes
Am 23.05.2012 09:40, schrieb Christian Heimes: > You recall correctly. That's the recommended and correct way to install > Python 2.6 on a recent machine, with one exception. You must compile it > with the option MACHDEP=linux2, otherwise sys.platform will contain the > string "linux3" [1]. You als

Re: install python 2.6 on Ubuntu 12.04

2012-05-23 Thread Christian Heimes
Am 23.05.2012 02:51, schrieb Benjamin Kaplan: > Even easier: > > ./configure > make > sudo make altinstall > > If I recall correctly, that will install it in > /usr/local/lib/python2.6 and it will create /usr/local/bin/python2.6 > but it will not create /usr/local/bin/python so it won't clobber t