Re: Off-Topic: The Machine

2014-06-24 Thread Chris Angelico
On Wed, Jun 25, 2014 at 3:52 PM, Steven D'Aprano wrote: > Taking it with a generous grain of salt is one thing, but outright > rejecting it is a bit harsh. I understand that HP has actually > demonstrated the Machine, so unless they faked the demo, the basic facts > are probably more-or-less corre

Re: Off-Topic: The Machine

2014-06-24 Thread Steven D'Aprano
On Tue, 24 Jun 2014 13:06:56 +0200, Johannes Bauer wrote: > On 24.06.2014 03:23, Steven D'Aprano wrote: >> http://www.iflscience.com/technology/new-type-computer-capable- >> calculating-640tbs-data-one-billionth-second-could >> >> Relevance: The Machine uses *eighty times less power* for the same

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-24 Thread Peter Tomcsanyi
"Ned Deily" wrote in message news:nad-d2ddcb.14070824062...@news.gmane.org... Probably easier, though, is to install Python 3.4 from MacPorts which does provide its own version of Tcl/Tk 8.6.1, the Cocoa version by default or optionally an X11 version: # after installing the base MacPorts sudo

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-24 Thread Ned Deily
In article , > Maybe this is not the right place for this kind of question... can anyone > suggest a better place so that the question has a chance to be read by the > person who is actually creating the installation packages? Should I try to > send this as a bug to bugs.python.org? P.S. Yes, i

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-24 Thread Ned Deily
In article , "Peter Tomcsanyi" wrote: > I use the Python 3.4.1 installer from > https://www.python.org/downloads/release/python-341/ > > The Windows installation comes with Tcl/Tk version 8.6 which has some new > features (compared to 8.5) that are very important to me. > > But the Mac install

Passing a frame to pdb.Pdb.set_trace

2014-06-24 Thread Rotwang
Hi all, I've found something weird with pdb and I don't understand it. I want to define a function mydebugger() which starts the debugger in the caller's frame. The following is copied from IDLE with Python 2.7.3 (I've since tried it with 3.3.0 and the same thing happens): Python 2.7.3 (defau

Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-24 Thread Peter Tomcsanyi
Hello, I use the Python 3.4.1 installer from https://www.python.org/downloads/release/python-341/ The Windows installation comes with Tcl/Tk version 8.6 which has some new features (compared to 8.5) that are very important to me. But the Mac installer does not include Tcl/Tk and the page: htt

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Ethan Furman
On 06/24/2014 07:04 AM, Chris Angelico wrote: Here's what I'd try: import sys sys.modules[d1.__class__.__module__].__file__ sys.modules[d2.__class__.__module__].__file__ Do those in both environments and see where things are actually coming from. Debugging tips always appreciated. Thanks,

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Ethan Furman
On 06/24/2014 08:58 AM, Chris Angelico wrote: Basically, C is for writing high level languages in, and Python and Pike are for writing applications. Life is good. +1 QOTW -- https://mail.python.org/mailman/listinfo/python-list

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Chris Angelico
On Wed, Jun 25, 2014 at 1:40 AM, Fabien wrote: > Other related annoying stuff when learning is the good old 2.7 VS 3 problem: > > mowglie@flappi ~ $ apt-cache search SciPy > [...] > python-scipy - scientific tools for Python > python3-scipy - scientific tools for Python 3 > > mowglie@flappi ~ $ ap

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Fabien
On 24.06.2014 16:35, Chris Angelico wrote: Would be nice if there could be some clear indication that this is the official and current repo. indeed. Also, the install procedure is a bit dangerous for new python users like me. NetCDF4 is out since 2008, it would be great if SciPy could support

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Chris Angelico
On Wed, Jun 25, 2014 at 12:27 AM, Fabien wrote: > netCDF4 has two repositories online, one on google code and one on github. I > mistakenly installed the old one, then I noticed the new one and obviously > some old stuffs remained in the dist-packages directory. I removed them from > my path and e

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Fabien
Hi Chris, On 24.06.2014 16:04, Chris Angelico wrote: Here's what I'd try: >>>import sys >>>sys.modules[d1.__class__.__module__].__file__ >>>sys.modules[d2.__class__.__module__].__file__ that was it! netCDF4 has two repositories online, one on google code and one on github. I mistakenly ins

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Fabio Zadrozny
Well, it 'appears' to be the same type, but given that the File from one is different from the other, I think they aren't... Googling a bit, I found the source: https://code.google.com/p/netcdf4-python/source/browse/trunk/netcdftime.py?r=1117 and it has a 'datetime' which says: "Phony datetime obj

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Chris Angelico
On Tue, Jun 24, 2014 at 11:59 PM, Fabien wrote: > Hi Chris, > > thanks for the hint. Indeed they are not an instance of the same class: > isinstance(d1, datetime) > Out[6]: False isinstance(d2, datetime) > Out[7]: True > > so this is something I should check with the NetCDF4 package deve

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Fabien
Hi Chris, thanks for the hint. Indeed they are not an instance of the same class: >>> isinstance(d1, datetime) Out[6]: False >>> isinstance(d2, datetime) Out[7]: True so this is something I should check with the NetCDF4 package developers. While The python interpreter can compare them, my pyde

Re: Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Chris Angelico
On Tue, Jun 24, 2014 at 11:28 PM, Fabien wrote: > So they are two instances of the same object but something in pyDev doesn't > want to compare them. Any Hint? Are they really instances of the same class? One of them comes from /usr/local/lib/python3.3/dist-packages/netcdftime.py and the other co

Error in PyDev but not in the standard python interpreter

2014-06-24 Thread Fabien
Hi, this is probably not the best place for this topic but I know this forum is widely read. I take this opportunity and apology at the same time. If I run this in my python3 interpreter everything works fine: mowglie@flappi ~ $ python3 Python 3.3.2+ (default, Feb 28 2014, 00:52:16) [GCC 4.8.

Re: What is the state of MySQL support for Python 3?

2014-06-24 Thread INADA Naoki
Hi. PyMySQL -- pure Python MySQL connector. Supports Python 3.3~. mysqlclient -- Fork of MySQLdb. Supports Python 3.3~. On Tue, Jun 24, 2014 at 5:21 PM, wrote: > Good day, > > I'm starting a new project from scratch so I think its finally a time to > switch to the latest and greatest Python 3.

Re: Standard way to generate mail/news reply?

2014-06-24 Thread Skip Montanaro
On Tue, Jun 24, 2014 at 6:46 AM, Adam Funk wrote: > Is there some standard library or code for taking an e-mail or > newsgroup message & generating a reply to it? You might try searching for "mail reply" on pypi.python.org. That will return a number of hits. I know the python.org replybot is ther

Standard way to generate mail/news reply?

2014-06-24 Thread Adam Funk
Is there some standard library or code for taking an e-mail or newsgroup message & generating a reply to it? (I mean things like quoting the original message, >> quoting etc. where necessary, & generating the right References & In-Reply-To headers.) I homebrewed some code for this in Perl (sorry)

Re: Off-Topic: The Machine

2014-06-24 Thread Johannes Bauer
On 24.06.2014 03:23, Steven D'Aprano wrote: > http://www.iflscience.com/technology/new-type-computer-capable- > calculating-640tbs-data-one-billionth-second-could > > Relevance: The Machine uses *eighty times less power* for the same amount > of computing power as conventional architectures. If t

Re: Format String: Only when value supplied

2014-06-24 Thread MRAB
On 2014-06-24 10:18, Florian Lindner wrote: Hello, I have a format string like: print "{:10} {:25} = {:6} ({})".format(mod, name, value, description) description can be None. In this case I want to print an empty string (which can be achieved by replacing it with 'description or ""') and I

Re: What is the state of MySQL support for Python 3?

2014-06-24 Thread haizaar
On Tuesday, June 24, 2014 12:48:14 PM UTC+3, Chris Angelico wrote: > > Is it completely from scratch? Can you just use PostgreSQL? It's *so* > > much better... The project is, but the database isn't. So MySQL it is. -- https://mail.python.org/mailman/listinfo/python-list

Re: Format String: Only when value supplied

2014-06-24 Thread Ned Batchelder
On 6/24/14 5:18 AM, Florian Lindner wrote: Hello, I have a format string like: print "{:10} {:25} = {:6} ({})".format(mod, name, value, description) description can be None. In this case I want to print an empty string (which can be achieved by replacing it with 'description or ""') and I

OPENPYXL

2014-06-24 Thread xristoniki
OPENPYXL_problem. Hello, i design a gui using wxpython! I want to read and edit excel files so i use the openpyxl library! But i want to delete specific columns and rows and i cant do it. In addition i want to sort columns by cell color and i cant do that either! Do you have any ideas? Thank

Re: What is the state of MySQL support for Python 3?

2014-06-24 Thread Chris Angelico
On Tue, Jun 24, 2014 at 6:21 PM, wrote: > I'm starting a new project from scratch so I think its finally a time to > switch to the latest and greatest Python 3.4. > > But I'm puzzled with MySQL support for Python 3. Is it completely from scratch? Can you just use PostgreSQL? It's *so* much bett

Re: What is the state of MySQL support for Python 3?

2014-06-24 Thread Bernd Nawothnig
On 2014-06-24, haiz...@gmail.com wrote: > I'm starting a new project from scratch so I think its finally a time > to switch to the latest and greatest Python 3.4. > > But I'm puzzled with MySQL support for Python 3. So far the only > stable library I've found it pymysql. > > All others are either a

Format String: Only when value supplied

2014-06-24 Thread Florian Lindner
Hello, I have a format string like: print "{:10} {:25} = {:6} ({})".format(mod, name, value, description) description can be None. In this case I want to print an empty string (which can be achieved by replacing it with 'description or ""') and I want to omit the brackets. Is there a way to

What is the state of MySQL support for Python 3?

2014-06-24 Thread haizaar
Good day, I'm starting a new project from scratch so I think its finally a time to switch to the latest and greatest Python 3.4. But I'm puzzled with MySQL support for Python 3. So far the only stable library I've found it pymysql. All others are either abandoned work-in-progress projects or d

Re: Adding thread module support to Ubuntu 3 for Python3

2014-06-24 Thread alister
On Mon, 23 Jun 2014 19:40:24 -0700, Larry Hudson wrote: > On 06/23/2014 01:12 PM, kenak...@gmail.com wrote: >> What package do I need to install to get thread support (import thread) >> for Python 3 running under ubuntu 3? >> >> > Just curious... Ubuntu 3 -- Are you really running a version that