Python 3 on Ulipad? Ulipad on Win 7?

55 views
Skip to first unread message

Richard D. Moores

unread,
Nov 29, 2009, 8:47:29 PM11/29/09
to ulipad
So 2 questions. Can Ulipad handle Python 3? Win 7?

Thanks,

Dick Moores

limodou

unread,
Nov 29, 2009, 9:12:12 PM11/29/09
to uli...@googlegroups.com
For python 3, you can run python file in ulipad, just set python 3
interpreter, but you can't run ulipad in python 3 directly. Because
many packages have not ported to python 3, especially wxpython.

For win 7, I think ulipad can run on it.

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliWeb <<simple web framework>>: http://uliwebproject.appspot.com
My Blog: http://hi.baidu.com/limodou

Richard D. Moores

unread,
Nov 29, 2009, 11:59:39 PM11/29/09
to uli...@googlegroups.com
On Sun, Nov 29, 2009 at 18:12, limodou <lim...@gmail.com> wrote:
> On Mon, Nov 30, 2009 at 9:47 AM, Richard D. Moores <rdmo...@gmail.com> 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)

print(format(1234567, ',d'))

(This gets me NameError: name 'format' is not defined . Should get 1,234,567

from collections import Counter
print(Counter(['red', 'blue', 'red', 'green', 'blue', 'blue']))

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?

> but you can't run ulipad in python 3 directly. Because
> many packages have not ported to python 3, especially wxpython.
>
> For win 7, I think ulipad can run on it.

Good.

Dick Moores

limodou

unread,
Nov 30, 2009, 12:06:16 AM11/30/09
to uli...@googlegroups.com
On Mon, Nov 30, 2009 at 12:59 PM, Richard D. Moores <rdmo...@gmail.com> wrote:
> On Sun, Nov 29, 2009 at 18:12, limodou <lim...@gmail.com> wrote:
>> On Mon, Nov 30, 2009 at 9:47 AM, Richard D. Moores <rdmo...@gmail.com> 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.

Richard D. Moores

unread,
Nov 30, 2009, 12:12:54 AM11/30/09
to uli...@googlegroups.com
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

limodou

unread,
Nov 30, 2009, 12:24:18 AM11/30/09
to uli...@googlegroups.com
> 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
>

I installed 3.1 python, and add new interpreter in Setup Python
Interpreter dialog, and the result is right, no problem at all. So
please check the message window, the first line should be something
like:

> "D:\Python31\python.exe" "D:\project\test\a.py"
343460000

Here the directory means I'm running the 3.1 python version. So how about yours?

Richard D. Moores

unread,
Nov 30, 2009, 12:32:04 AM11/30/09
to uli...@googlegroups.com
On Sun, Nov 29, 2009 at 21:24, limodou <lim...@gmail.com> wrote:
>> 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
>>
>
> I installed 3.1 python, and add new interpreter in Setup Python
> Interpreter dialog, and the result is right, no problem at all. So
> please check the message window, the first line should be something
> like:
>
>> "D:\Python31\python.exe"  "D:\project\test\a.py"
> 343460000
>
> Here the directory means I'm running the 3.1 python version. So how about yours?

"E:\Python25\pythonw.exe" -u "E:\P31 Working\testOfP31.py" Sorry I
didn't notice that. But I showed you what I'd done
(<http://www.rcblue.com/Misc/UlipadPrefs.png>). If I did that wrong,
please show me how to add the 3.1 interpreter in Setup Python.

Thanks,

Dick

limodou

unread,
Nov 30, 2009, 12:46:34 AM11/30/09
to uli...@googlegroups.com
What you should is just the list of available python interpreters, but
not the default python interpreter which you want to use. So you
should set it in [Python]->[Set Arguments...].

Richard D. Moores

unread,
Nov 30, 2009, 1:05:24 AM11/30/09
to uli...@googlegroups.com
On Sun, Nov 29, 2009 at 21:46, limodou <lim...@gmail.com> wrote:>
> What you should is just the list of available python interpreters, but
> not the default python interpreter which you want to use. So you
> should set it in [Python]->[Set Arguments...].

Ah. That's it. Thanks!

The shell is still 2.64, and the Input Assistant is definitely not
attuned to Python 3x, but they will be later on, right?

Dick

limodou

unread,
Nov 30, 2009, 1:10:25 AM11/30/09
to uli...@googlegroups.com
When wxpython ported to python 3, I'll try to port ulipad to python 3.
But it will be a great work I think. Because there are also many other
packages used in ulipad.
Reply all
Reply to author
Forward
0 new messages