On Sun, Nov 29, 2009 at 21:06, limodou <[email protected]> wrote: > On Mon, Nov 30, 2009 at 12:59 PM, Richard D. Moores <[email protected]> > wrote: >> On Sun, Nov 29, 2009 at 18:12, limodou <[email protected]> wrote: >>> On Mon, Nov 30, 2009 at 9:47 AM, Richard D. Moores <[email protected]> >>> wrote: >>>> So 2 questions. Can Ulipad handle Python 3? Win 7? >>>> >>>> Thanks, >>>> >>>> Dick Moores >>>> >>> >>> For python 3, you can run python file in ulipad, just set python 3 >>> interpreter, >> >> Do you mean this? <http://www.rcblue.com/Misc/UlipadPrefs.png> . I >> tried to run a script in Ulipad (using F5) that employs features new >> to Python, in 3.1. >> >> x = 343456346 >> print(round(x,-4)) >> >> (This gets me 343460000.0 . Should get an integer, 343460000) > > I tried above code in python 3.0 directly and in ulipad with 3.0 > interpreter both, and I got the same result: > > 343460000.0 > > so I think you may wrong for this. > >> >> print(format(1234567, ',d')) >> >> (This gets me NameError: name 'format' is not defined . Should get 1,234,567 > > And above code when I run in python 3.0 I got : > >>>> print(format(1234567, ',d')) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ValueError: Invalid conversion specification > > and I got the same result in ulipad with 3.0 interpreter. > >> >> from collections import Counter >> print(Counter(['red', 'blue', 'red', 'green', 'blue', 'blue'])) > > Error message from python 3.0 console: > >>>> from collections import Counter > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: cannot import name Counter > > >> >> This gets me ImportError: cannot import name Counter . Should get >> Counter({'blue': 3, 'red': 2, 'green': 1}) >> >> And so on. How do I run a Python 3.1 file in Ulipad? > > So I just want to suggest that you should try above code in python > 3.0/3.1 first.
Well, as I wrote above, those features are new in 3.1, and won't work in 3.0. Got them from <http://docs.python.org/3.1/whatsnew/3.1.html> Thanks, Dick
