Re: XPlatform ToolKit

2012-06-27 Thread Mark Lawrence
On 27/06/2012 23:26, Temia Eszteri wrote: On Wed, 27 Jun 2012 23:14:13 +0100, Mark Lawrence wrote: On 27/06/2012 20:12, php...@gmail.com wrote: EnTK (batteries included) http://stk.phpyjs.com/ntk.zip EsTK (pilas incluidas) http://stk.phpyjs.com/stk.zip Reverse Engineer This sihT No no

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Stefan Behnel
Serhiy Storchaka, 28.06.2012 07:36: > On 28.06.12 00:14, Terry Reedy wrote: >> Another prediction: people who code Python without reading the manual, >> at least not for new features, will learn about 'u' somehow (such as by >> reading this list) and may do either of the following, both of which ar

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Serhiy Storchaka
On 28.06.12 00:14, Terry Reedy wrote: Another prediction: people who code Python without reading the manual, at least not for new features, will learn about 'u' somehow (such as by reading this list) and may do either of the following, both of which are bad. 1. They will confuse themselves by th

Re: Question:Programming a game grid ...

2012-06-27 Thread Steven D'Aprano
On Wed, 27 Jun 2012 19:15:54 -0700, woooee wrote: > "as vars() has not been declared and it does not appear to be valid > Python syntax" > > You assume too much IMHO. Vars() was not declared in the code provided > and I do not think that we should be assuming that it is a function > returning a

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Steven D'Aprano
On Wed, 27 Jun 2012 17:44:23 -0700, alex23 wrote: > If you believe providing a complementary __past__ namespace will work - > even though I believe Guido has explicitly stated it will never happen - > then the onus is on you to come up with an implementation. Guido speaks only for CPython. Other

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Ian Kelly
On Jun 27, 2012 9:57 PM, wrote: > [1] of course that is when using `filestr.count("print")` -- I assume that the word "print" is not used excessively in comments or docstrings. Someone else can do a less naive search if they like. Or as part of a longer name, e.g. the traceback.print_* family of

Re: Recommend decent Computer Science books

2012-06-27 Thread rusi
On Jun 28, 2:00 am, David Thomas wrote: > Hi I know that this is a group about Python.  But I am just wondering if > anybody can recommend any introductory/good books on Conputer Science. > > Kind regards This is like asking: How do I live my life? or make money (or love)? etc Not that there are

Re: Question:Programming a game grid ...

2012-06-27 Thread Rick Johnson
On Jun 27, 5:21 pm, iconoclast011 wrote: > Fairly new to Python ... Is there a way to efficiently (different from my > brute > force code shown below) to set up a game grid of buttons (ie with pygame) > responding to mouse clicks ?   I would want to vary the size of the grid ... > > Thanks > > Br

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread alex23
Rick, fix your mail reader/sender, your lines aren't wrapping properly. On Jun 28, 1:53 pm, rantingrickjohn...@gmail.com wrote: > Unfortunately, even though "print" is supposedly only used by the neophytes, > the python<3.0 stdlib is full of print statements. For instance, out of 3173 > files, 9

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread rantingrickjohnson
On Tuesday, June 26, 2012 1:34:03 AM UTC-5, Stefan Behnel wrote: > First of all, the statement has a rather special syntax that is not obvious > and practically non-extensible. It also has hidden semantics that are hard > to explain and mixes formatting with output - soft-space, anyone? > > The fu

Re: exception problem

2012-06-27 Thread Steven D'Aprano
On Wed, 27 Jun 2012 17:13:00 -0700, Charles Hixson wrote: > On 06/25/2012 12:48 AM, Steven D'Aprano wrote: >> On Sun, 24 Jun 2012 16:16:25 -0700, Charles Hixson wrote: >> >> >>> But what I wanted was to catch any exception. >>> >> Be careful of what you ask for, since you might get it. >> >>

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread rantingrickjohnson
On Tuesday, June 26, 2012 1:24:43 AM UTC-5, Stefan Behnel wrote: > Maybe we should add a remote error reporting mode to Python that sends all > syntax error messages not only to the local screen but also directly to the > PSF so that they can fund developers who are able to delete that error > mes

Re: Recommend decent Computer Science books

2012-06-27 Thread Greg
On Wednesday, June 27, 2012 2:00:03 PM UTC-7, David Thomas wrote: > Hi I know that this is a group about Python. But I am just wondering if > anybody can recommend any introductory/good books on Conputer Science. > > Kind regards I recommend "Python Programming: An Introduction to Computer Scie

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread rantingrickjohnson
On Monday, June 25, 2012 10:35:14 PM UTC-5, Steven D'Aprano wrote: > (Rick, don't make me regret communicating with you again.) Well unfortunately Steven i am not sure what causes you to stop communicating with me for these seeming random periods of time -- although i can deduce from past experi

Re: Question:Programming a game grid ...

2012-06-27 Thread Temia Eszteri
On Wed, 27 Jun 2012 19:43:07 -0700 (PDT), alex23 wrote: >There are two ways to help people: by trying to understand what >they're doing, or by submitting them to endless pedantry. Only one of >those is actually helpful. Is it alright if I use that as a quote? Properly attributed, of course. --

Re: Question:Programming a game grid ...

2012-06-27 Thread iconoclast011
In reply to "alex23" who wrote the following: > On Jun 28, 12:15=A0pm, woo...@gmail.com wrote: > > You assume too much IMHO. =A0Vars() was not declared in > > the code provided and I do not think that we should be > > assuming that it is a function returning a dictionary instead > > of an error. >

Re: Question:Programming a game grid ...

2012-06-27 Thread alex23
On Jun 28, 12:15 pm, woo...@gmail.com wrote: > You assume too much IMHO.  Vars() was not declared in > the code provided and I do not think that we should be > assuming that it is a function returning a dictionary instead > of an error. http://docs.python.org/library/functions.html#vars Do you ha

Re: Is there any way to decode String using unknown codec?

2012-06-27 Thread Benjamin Kaplan
On Wed, Jun 27, 2012 at 6:14 PM, wrote: > Hi > I'm a Korean and when I use modules like sys, os, &c, > sometimes the interpreter show me broken strings like > '\x13\xb3\x12\xc8'. > It mustbe the Korean "alphabet" but I can't decode it to the rightway. > I tried to decode it using codecs like cp94

Re: Question:Programming a game grid ...

2012-06-27 Thread woooee
On Wednesday, June 27, 2012 5:15:09 PM UTC-7, Steven D'Aprano wrote: > On Wed, 27 Jun 2012 16:24:30 -0700, David wrote: > > > First, you should be getting an error on > > vars()[var] = Button(f3, text = "00", bg = "white") > > as vars() has not been declared > > The Fine Manual says differently:

Re: Slow output

2012-06-27 Thread alex23
On Jun 28, 3:33 am, subhabangal...@gmail.com wrote: > May any one suggest me what may be the likely issue? In situations like this, it always helps to see your code, especially if you can reduce it down to only the part doing the loading. One thing that can help reduce memory usage is to replace

Is there any way to decode String using unknown codec?

2012-06-27 Thread howmuchistoday
Hi I'm a Korean and when I use modules like sys, os, &c, sometimes the interpreter show me broken strings like '\x13\xb3\x12\xc8'. It mustbe the Korean "alphabet" but I can't decode it to the rightway. I tried to decode it using codecs like cp949,mbcs,utf-8 but It failed. The only way I found is ev

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread alex23
On Jun 28, 8:11 am, Christian Tismer wrote: > Random notes without context and reasoning are no better than spam. > My answer as well, of course, so let's stop here. It's more that all of this has been discussed at length. Repeatedly. It's very easy to criticise the current state of affairs when

Re: exception problem

2012-06-27 Thread alex23
On Jun 28, 10:13 am, Charles Hixson wrote: > On 06/25/2012 12:48 AM, Steven D'Aprano wrote: > > "Catch any exception" is almost certainly the wrong thing to do, almost > > always. > This time it was the right thing, as I suspected that *SOME* exception > was being thrown, but had no idea what one

Re: Question:Programming a game grid ...

2012-06-27 Thread alex23
On Jun 28, 8:21 am, iconoclast011 wrote: > Fairly new to Python ... Is there a way to efficiently (different from my > brute > force code shown below) to set up a game grid of buttons (ie with pygame) > responding to mouse clicks ?   I would want to vary the size of the grid ... It hasn't been u

Re: Question:Programming a game grid ...

2012-06-27 Thread Steven D'Aprano
On Wed, 27 Jun 2012 16:24:30 -0700, David wrote: > First, you should be getting an error on > vars()[var] = Button(f3, text = "00", bg = "white") > as vars() has not been declared The Fine Manual says differently: Python 2: http://docs.python.org/library/functions.html#vars Python 3: http://do

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Grant Edwards" wrote in message news:jsg4o8$o4p$1...@reader1.panix.com... > On 2012-06-27, Adam wrote: >> >>> Actually, I believe someone in an earlier thread in the newsgroup or >>> elsewhere pointed out that serial ports automatically open under >>> Windows. I'd have to look it back up when

Re: exception problem

2012-06-27 Thread Charles Hixson
On 06/25/2012 12:48 AM, Steven D'Aprano wrote: On Sun, 24 Jun 2012 16:16:25 -0700, Charles Hixson wrote: But what I wanted was to catch any exception. Be careful of what you ask for, since you might get it. "Catch any exception" is almost certainly the wrong thing to do, almost alwa

Re: Question:Programming a game grid ...

2012-06-27 Thread MRAB
On 27/06/2012 23:21, iconoclast011 wrote: Fairly new to Python ... Is there a way to efficiently (different from my brute force code shown below) to set up a game grid of buttons (ie with pygame) responding to mouse clicks ? I would want to vary the size of the grid ... [code snipped] Someth

Re: Question:Programming a game grid ...

2012-06-27 Thread Chris Angelico
On Thu, Jun 28, 2012 at 9:35 AM, Chris Angelico wrote: > On Thu, Jun 28, 2012 at 9:24 AM, David wrote: >> First, you should be getting an error on >> vars()[var] = Button(f3, text = "00", bg = "white") >> as vars() has not been declared and it does not appear to be valid Python >> syntax. > > It

Re: Question:Programming a game grid ...

2012-06-27 Thread Chris Angelico
On Thu, Jun 28, 2012 at 9:24 AM, David wrote: > First, you should be getting an error on > vars()[var] = Button(f3, text = "00", bg = "white") > as vars() has not been declared and it does not appear to be valid Python > syntax. It's valid syntax, but highly inadvisable. What it does is call the

Re: Question:Programming a game grid ...

2012-06-27 Thread David
First, you should be getting an error on vars()[var] = Button(f3, text = "00", bg = "white") as vars() has not been declared and it does not appear to be valid Python syntax. I don't see a reason to store a reference to the button since you won't be modifying them. Also, you can not mix pack()

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Adam wrote: > >> Actually, I believe someone in an earlier thread in the newsgroup or >> elsewhere pointed out that serial ports automatically open under >> Windows. I'd have to look it back up when I have the time, which I >> don't have at the moment, unfortunately. What they're r

Re: Getting lazy with decorators

2012-06-27 Thread Josh English
On Monday, June 25, 2012 11:57:39 PM UTC-7, Peter Otten wrote: > > > > There is nothing in the documentation (that I have found) that points to > > this solution. > > That's because I "invented" it. > Oh bother. The lines I completely overlooked were in your __getattr__ override. Boy is my fa

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Temia Eszteri" wrote in message news:ra2nu7h75720i75ijhabg12dngrab75...@4ax.com... > On Wed, 27 Jun 2012 22:18:59 + (UTC), Grant Edwards > wrote: > >>> Can you post a small example showing what you're doing? >> >>The best way to get help is to write as small a program as possible >>that de

Re: Recommend decent Computer Science books

2012-06-27 Thread Chris Angelico
On Thu, Jun 28, 2012 at 7:00 AM, David Thomas wrote: > Hi I know that this is a group about Python.  But I am just wondering if > anybody can recommend any introductory/good books on Conputer Science. Well, there are books about Python specifically. They get discussed periodically on this list,

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Temia Eszteri
On Wed, 27 Jun 2012 22:18:59 + (UTC), Grant Edwards wrote: >> Can you post a small example showing what you're doing? > >The best way to get help is to write as small a program as possible >that demonstrates the problem, and post it. I'll help you get >started... > >Does this program work? >

Re: Py330b1, un café crème sucré

2012-06-27 Thread gst
On 27 juin, 22:48, Karim wrote: > > Euhhh, j'ai pas tout suivi. C'est quoi la feinte? > Perso je suis pas sûr qu'il y en ait une. Je dirais que l'OP a peut-être eu un grand besoin de café crème sucré et a voulu partager son plaisir avec d'autres, why not ;) regards, gst. > > Le 27/06/2012

Re: XPlatform ToolKit

2012-06-27 Thread Temia Eszteri
On Wed, 27 Jun 2012 23:14:13 +0100, Mark Lawrence wrote: >On 27/06/2012 20:12, php...@gmail.com wrote: >> EnTK (batteries included) http://stk.phpyjs.com/ntk.zip >> EsTK (pilas incluidas) http://stk.phpyjs.com/stk.zip >> >> Reverse Engineer This >> > >sihT No no no, clearly it's sihT reenignE.

Question:Programming a game grid ...

2012-06-27 Thread iconoclast011
Fairly new to Python ... Is there a way to efficiently (different from my brute force code shown below) to set up a game grid of buttons (ie with pygame) responding to mouse clicks ? I would want to vary the size of the grid ... Thanks Brute force code: from Tkinter import * root = T

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Grant Edwards wrote: > On 2012-06-27, Adam wrote: >> "Grant Edwards" wrote: >>> Why do you need to open it a second time? >> >> As far as I can tell, the wireless hardware connected to the >> USB-to-serial converter is receiving data (which may have the serial >> port open?). I

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 6/27/12 8:58 PM, Serhiy Storchaka wrote: On 27.06.12 17:34, Christian Tismer wrote: That's why I was unhappy with py3's missing flexibility. Excessive flexibility is amorphism. Random notes without context and reasoning are no better than spam. My answer as well, of course, so let's stop

Re: XPlatform ToolKit

2012-06-27 Thread Mark Lawrence
On 27/06/2012 20:12, php...@gmail.com wrote: EnTK (batteries included) http://stk.phpyjs.com/ntk.zip EsTK (pilas incluidas) http://stk.phpyjs.com/stk.zip Reverse Engineer This sihT -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Adam wrote: > "Grant Edwards" wrote: >> On 2012-06-27, Adam wrote: >> >>> The Python script needed a call to ser.close() before ser.open() in >>> order to work. >> >> IOW, the port opened OK, but when you tried to open it a second time >> without closing it first, _that's_ when th

Re: question about numpy, subclassing, and a DeprecationWarning

2012-06-27 Thread Robert Kern
On 6/27/12 10:02 PM, Jason Swails wrote: Hello, I'm running into an unexpected issue in a program I'm writing, and I was hoping someone could provide some clarification for me. I'm trying to subclass numpy.ndarray (basically create a class to handle a 3D grid). When I instantiate a numpy.ndarr

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Grant Edwards" wrote in message news:jsftah$bb5$1...@reader1.panix.com... > On 2012-06-27, Adam wrote: > >> The Python script needed a call to ser.close() before ser.open() in >> order to work. > > IOW, the port opened OK, but when you tried to open it a second time > without closing it first,

Re: Executing Python Scripts on Mac using Python Launcher

2012-06-27 Thread Hans Mulder
On 27/06/12 22:45:47, David Thomas wrote: > Thank you ever so much raw_input works fine. > Do you think I should stick with Python 2 before I go to 3? I think so. The differences are not that big, but big enough to confuse a beginner. Once you know pyhton2, read http://docs.python.org/py3k/what

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, Adam wrote: > The Python script needed a call to ser.close() before ser.open() in > order to work. IOW, the port opened OK, but when you tried to open it a second time without closing it first, _that's_ when the .open() call failed. That's a restriction built in to Win32. You ca

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Terry Reedy
On 6/27/2012 3:08 PM, Serhiy Storchaka wrote: On 27.06.12 14:22, Stefan Behnel wrote: For comparison, the revival of the "u" string prefix in Py3.3 is a simple change in the parser grammar that's easy to maintain And even this simple change has caused unexpected issues (see issues #15054 and

Recommend decent Computer Science books

2012-06-27 Thread David Thomas
Hi I know that this is a group about Python. But I am just wondering if anybody can recommend any introductory/good books on Conputer Science. Kind regards -- http://mail.python.org/mailman/listinfo/python-list

question about numpy, subclassing, and a DeprecationWarning

2012-06-27 Thread Jason Swails
Hello, I'm running into an unexpected issue in a program I'm writing, and I was hoping someone could provide some clarification for me. I'm trying to subclass numpy.ndarray (basically create a class to handle a 3D grid). When I instantiate a numpy.ndarray, everything works as expected. When I c

Re: Executing Python Scripts on Mac using Python Launcher

2012-06-27 Thread David Thomas
Thank you ever so much raw_input works fine. Do you think I should stick with Python 2 before I go to 3? I have a text book which is using 3 but I've been using an online tutorial which has been helping me lots, which uses version 2. I found by just typing python then having a space and dragging

Re: Py330b1, un café crème sucré

2012-06-27 Thread Karim
Euhhh, j'ai pas tout suivi. C'est quoi la feinte? Cheers Karim Le 27/06/2012 21:49, wxjmfa...@gmail.com a écrit : # -*- coding: cp1252 -*- # café.py import sys print(sys.version) sys.path.append('d:\\crème') import crème import sucré s = ' '.join(['un', 'café', crème.tag, sucré.tag]) print

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Paul" wrote in message news:jsfhv2$ta9$1...@dont-email.me... > Adam wrote: > >> >> This is a tough one. > > Try > >handle -a > allhand.txt > > Then open the allhand.txt with Notepad and look for interesting entries. > > *** > > I tested right now, and first opened a session in HyperTerm

Re: Slow output

2012-06-27 Thread Steven D'Aprano
On Wed, 27 Jun 2012 19:06:08 +0100, MRAB wrote: > On 27/06/2012 18:33, subhabangal...@gmail.com wrote: >> Dear Group, >> I am Sri Subhabrata Banerjee writing from India. I am running a small >> program which exploits around 12 1 to 2 KB .txt files. I am using MS >> Windows XP Service Pack 3 and Py

Py330b1, un café crème sucré

2012-06-27 Thread wxjmfauth
# -*- coding: cp1252 -*- # café.py import sys print(sys.version) sys.path.append('d:\\crème') import crème import sucré s = ' '.join(['un', 'café', crème.tag, sucré.tag]) print(s) input(':') #-- # .\sucré.py: # -*- coding: cp1252 -*- #tag = 'sucré' #-- # d:\crème\crème.py # -*- coding

ANN: psutil 0.5.0 released

2012-06-27 Thread Giampaolo Rodolà
Hi folks, I'm pleased to announce the 0.5.0 release of psutil: http://code.google.com/p/psutil/ === Major new features === - system users - (Linux, Windows) process CPU affinity (get and set) - (POSIX) process number of opened file descriptors. - (Windows) process number of opened handles. - psut

Re: cmd i/o stream module

2012-06-27 Thread Temia Eszteri
[Default] On Wed, 27 Jun 2012 18:37:52 +0530, prakash jp wrote: >Hi All, > >I am interested to interact with the command prompt, is there a module to >control the input/output stream. Thanks in advance for the pointers > >Thanks >Prakash Well, from the start, the sys module gives access to the s

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Serhiy Storchaka
On 27.06.12 14:22, Stefan Behnel wrote: For comparison, the revival of the "u" string prefix in Py3.3 is a simple change in the parser grammar that's easy to maintain but that has a huge impact on the Py3 compatibility of code that accepts to drop support for Py2.5 and earlier (as well as Py3.[01

Re: Slow output

2012-06-27 Thread Jean-Michel Pichavant
MRAB wrote: On 27/06/2012 18:33, subhabangal...@gmail.com wrote: Dear Group, I am Sri Subhabrata Banerjee writing from India. I am running a small program which exploits around 12 1 to 2 KB .txt files. I am using MS Windows XP Service Pack 3 and Python 2.6 where IDLE is GUI. The text is plain AS

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Serhiy Storchaka
On 27.06.12 17:34, Christian Tismer wrote: That's why I was unhappy with py3's missing flexibility. Excessive flexibility is amorphism. -- http://mail.python.org/mailman/listinfo/python-list

Re: Executing Python Scripts on Mac using Python Launcher

2012-06-27 Thread Hans Mulder
On 27/06/12 19:05:44, David Thomas wrote: > Is this why I keep getting an error using launcher? No. Yesterday your problem was that you tried this: input("\n\nPress the enter key to exit") That works fine in Pyhton3, but you are using python2 and in python2, the you must do this instead:

Re: 2to6 ?

2012-06-27 Thread Terry Reedy
On 6/27/2012 10:36 AM, Thomas Heller wrote: Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Others have expressed a similar wish, but I do not know that anyone has actually revised 2to3 to make a 2to6, o

Re: Slow output

2012-06-27 Thread MRAB
On 27/06/2012 18:33, subhabangal...@gmail.com wrote: Dear Group, I am Sri Subhabrata Banerjee writing from India. I am running a small program which exploits around 12 1 to 2 KB .txt files. I am using MS Windows XP Service Pack 3 and Python 2.6 where IDLE is GUI. The text is plain ASCII text. The

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Paul
Adam wrote: This is a tough one. Try handle -a > allhand.txt Then open the allhand.txt with Notepad and look for interesting entries. *** I tested right now, and first opened a session in HyperTerminal with one of my USB to serial adapters. The second serial adapter, is connect to

Re: json.loads() should return a more specific error

2012-06-27 Thread Terry Reedy
On 6/27/2012 8:45 AM, Roy Smith wrote: Before I go open an enhancement request, what do people think of the idea that json.load() should return something more specific than ValueError? I do not know of any written policy about when to create custom error classes in the stdlib. I know there are

Slow output

2012-06-27 Thread subhabangalore
Dear Group, I am Sri Subhabrata Banerjee writing from India. I am running a small program which exploits around 12 1 to 2 KB .txt files. I am using MS Windows XP Service Pack 3 and Python 2.6 where IDLE is GUI. The text is plain ASCII text. The RAM of the machine is around 2 GB. To run the progr

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Paul" wrote in message news:jsfatv$djt$1...@dont-email.me... > Adam wrote: >> "Paul" wrote in message >> news:jseu9c$sp3$1...@dont-email.me... >>> Adam wrote: "John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... > On 6/26/2012 9:12 PM, Adam wrote: >> Host OS

Re: Executing Python Scripts on Mac using Python Launcher

2012-06-27 Thread David Thomas
On Tuesday, June 26, 2012 10:48:22 PM UTC+1, Hans Mulder wrote: > On 26/06/12 22:41:59, Dave Angel wrote: > > On 06/26/2012 03:16 PM, Hans Mulder wrote: > >> > >> > >> Python is an executable, and is > >> typically located in a "bin" directory. To find out where > >> it is, type > >> > >> ty

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Paul
Adam wrote: "Paul" wrote in message news:jseu9c$sp3$1...@dont-email.me... Adam wrote: "John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Termina

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"Paul" wrote in message news:jseu9c$sp3$1...@dont-email.me... > Adam wrote: >> "John Nagle" wrote in message >> news:jse604$1cq$1...@dont-email.me... >>> On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open po

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Grant Edwards
On 2012-06-27, David H. Lipman wrote: > From: "Adam" >> "John Nagle" wrote in message >> news:jse604$1cq$1...@dont-email.me... >>> On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulato

2to6 ?

2012-06-27 Thread Thomas Heller
Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 27.06.12 15:44, Stefan Behnel wrote: Christian Tismer, 27.06.2012 15:15: print, function or not, is not important enough to enforce a rewrite everywhere because of syntax error. That hides the real semantic changes which _are_ important. So what I would have done is to let it work in an impe

Re: [newbie] problem with data (different behaviour between batch and interactive use)

2012-06-27 Thread Justin Barber
When you are reading it in measurement is a string. The indicies of the string are going to be returned in your print statements. Similar to having done this in the interpreter: In [17]: measurement = '+3.874693E01,+9.999889E03,+9.91E+37,+1.876595E+04,+3.994000E+04' In [18]: measurement[1]

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Stefan Behnel
Christian Tismer, 27.06.2012 15:15: > print, function or not, is not important enough to enforce a rewrite > everywhere because of syntax error. That hides the real semantic > changes which _are_ important. > > So what I would have done is to let it work in an imperfect way. People > then have the

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Chris Angelico
On Wed, Jun 27, 2012 at 11:15 PM, Christian Tismer wrote: > So what I would have done is to let it work in an imperfect way. People > then have the chance to rewrite with the print function, where it makes > sense. But old packages which need to be changed, only because they > have lots of > >    

Re: Python and Facebook

2012-06-27 Thread Jerry Rocteur
> > > > > (Among our points are such diverse elements as... wrong Pythons, but > whatever.) > > > > > There's no official Python-Facebook module (afaik!!), but a quick web > > > search for 'python facebook' should get you to the couple that I saw, > > > and possibly others. The next question is, do

Re: tiffany 0.6 released

2012-06-27 Thread Christian Tismer
On 27.06.12 15:24, Christian Tismer wrote: ... Thanks for the adjustment. Now I'm feeling fine and will move on to other targets ;-) By the way: Our conversation seems to have a real effect on downloads. :-) It has been quite a boost since 20 hours from some 25-40 to now over 200. but it _ma

Re: [newbie] problem with data (different behaviour between batch and interactive use)

2012-06-27 Thread Cousin Stanley
Jean Dupont wrote: > I have some data which is presented > in the following format to me : > > +3.874693E-01,+9.999889E-03,+9.91E+37,+1.876595E+04,+3.994000E+04 > > I'm only interested in the first two fields i.e. > > +3.874693E-01,+9.999889E-03 > The following program will read line

Re: tiffany 0.6 released

2012-06-27 Thread Christian Tismer
... Thanks for the adjustment. Now I'm feeling fine and will move on to other targets ;-) By the way: Our conversation seems to have a real effect on downloads. :-) It has been quite a boost since 20 hours from some 25-40 to now over 200. cheers -- chris -- Christian Tismer :^)

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 27.06.12 13:02, Chris Angelico wrote: On Wed, Jun 27, 2012 at 8:25 PM, Christian Tismer wrote: I think, for the small importance of the print statement in code, it would have made the transition easier, if python 3 was as flexible as python 2.7, with a symmetric "from __past__ import print_

cmd i/o stream module

2012-06-27 Thread prakash jp
Hi All, I am interested to interact with the command prompt, is there a module to control the input/output stream. Thanks in advance for the pointers Thanks Prakash -- http://mail.python.org/mailman/listinfo/python-list

Re: [newbie] problem with data (different behaviour between batch and interactive use)

2012-06-27 Thread Jussi Piitulainen
Jean Dupont writes: > If I start python interactively I can separate the fields as > follows: > >measurement=+3.874693E01,+9.999889E03,+9.91E+37,+1.876[...] > >print measurement[0] > 0.3874693 [...] > The script does this: > measurement=serkeith.readline().replace('\x11','').replace([...] > pr

json.loads() should return a more specific error

2012-06-27 Thread Roy Smith
Before I go open an enhancement request, what do people think of the idea that json.load() should return something more specific than ValueError? I've got some code that looks like try: response = requests.get(url) except RequestException as ex: logger.exception(ex)

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread David H. Lipman
From: "Adam" "John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulator. So, what can cause PySerial to generate the following error

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Paul
Adam wrote: "John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... On 6/26/2012 9:12 PM, Adam wrote: Host OS:Ubuntu 10.04 LTS Guest OS:Windows XP Pro SP3 I am able to open port COM4 with Terminal emulator. So, what can cause PySerial to generate the following error ...

[newbie] problem with data (different behaviour between batch and interactive use)

2012-06-27 Thread Jean Dupont
I have some data which is presented in the following format to me: +3.874693E-01,+9.999889E-03,+9.91E+37,+1.876595E+04,+3.994000E+04 I'm only interested in the first two fields i.e. +3.874693E-01,+9.999889E-03 If I start python interactively I can separate the fields as follows: >measurement=+3

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Chris Angelico
On Wed, Jun 27, 2012 at 9:24 PM, Devin Jeanpierre wrote: > On Wed, Jun 27, 2012 at 7:02 AM, Chris Angelico wrote: >> Much easier to simply say no. > > It's also easier to cease developing Python at all. > > By which I mean: just because something is hard doesn't mean it > shouldn't be done. Lots

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Roy Smith
In article , rantingrickjohn...@gmail.com wrote: > On Monday, June 25, 2012 5:10:47 AM UTC-5, Michiel Overtoom wrote: > > It has not. Python2 and Python3 are very similar. It's not like if > > you learn Python using version 2, you have to relearn the language > > when you want to switch Python3.

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Devin Jeanpierre
On Wed, Jun 27, 2012 at 7:02 AM, Chris Angelico wrote: > Much easier to simply say no. It's also easier to cease developing Python at all. By which I mean: just because something is hard doesn't mean it shouldn't be done. Lots of things Python does are hard, but they make users' lives easier. Th

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Stefan Behnel
Chris Angelico, 27.06.2012 13:02: > On Wed, Jun 27, 2012 at 8:25 PM, Christian Tismer wrote: >> I think, for the small importance of the print statement in code, it >> would have made the transition easier, if python 3 was as flexible >> as python 2.7, with a symmetric >> >> "from __past__ import p

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Chris Angelico
On Wed, Jun 27, 2012 at 8:25 PM, Christian Tismer wrote: > I think, for the small importance of the print statement in code, it > would have made the transition easier, if python 3 was as flexible > as python 2.7, with a symmetric > > "from __past__ import print_statement" construct. > For how lo

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread Christian Tismer
On 26.06.12 08:34, Stefan Behnel wrote: Devin Jeanpierre, 26.06.2012 08:15: On Mon, Jun 25, 2012 at 11:35 PM, Steven D'Aprano Making print a statement in the first place was a mistake, but fortunately it was a simple enough mistake to rectify once the need for backward compatibility was relaxed

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-27 Thread Adam
"John Nagle" wrote in message news:jse604$1cq$1...@dont-email.me... > On 6/26/2012 9:12 PM, Adam wrote: >> Host OS:Ubuntu 10.04 LTS >> Guest OS:Windows XP Pro SP3 >> >> >> I am able to open port COM4 with Terminal emulator. >> >> So, what can cause PySerial to generate the following erro