PYTHON
George Pearce (1672) 11 posts |
Since the RaspberryPi seemed to be designed to use PYTHON as the programming language of choice it would be nice to have a competent version on RiscPi. I have been playing with an old version 2.2 (circa 2004) and some of it works but odd bits are not 32 bit. Any chance of this being brought up to date? Also it would be nice to have a programming environment like Geany. Any Takers? |
Chris Gransden (337) 1207 posts |
Try here for Python 2.7.2. |
Steve Pampling (1551) 8182 posts |
Hmm, without wishing to seem negative there are several reasons for not doing that: 1. It uses GTK which hasn’t been ported thus making any port of something using it rather difficult IIRC both Zap and StrongED are included in the distro for the RPi. Both have the bonus feature of having a user interface that matches normal RISC OS GUI behaviour and a direct port of an editor normally used on Linux or Windows won’t have that behaviour. Just a personal opinion. Possibly wrong in various respects. |
Steve Revill (20) 1361 posts |
Zap isn’t included because we didn’t get a clear enough response from the developers in time for release, despite several attempts. You can just download it, of course. |
Steve Pampling (1551) 8182 posts |
Furry nuff.
Would a modified version of that, packaged up and entered into the PackMan list be a sensible idea? |
Chris Hall (132) 3566 posts |
Would a modified version of that, packaged up and entered into the PackMan list be a sensible idea? Zap is on the list of downloads in !Store. |
Theo Markettos (89) 919 posts |
Packaged would be sensible. I had a go a while ago, but it turns out to be a bit awkward. Zap’s instructions say to put !ZapUser in Choices. But one thing the packaging system doesn’t do is go anywhere near Choices, because there’s where user settings are preserved over updates. Also Choices is (on some OS versions) a multi-user thing – user A may install the package but user B want to use it. So it needs additional support for something like: If Not Exists (Choices:!ZapUser) Then and that needs to be in the Zap application so, on first run, it checks for ZapUser and does the necessary – a bit like NetSurf scans fonts the first time you run it. That needs some extra code in the Zap app, which makes packaging a bit more than just moving files about. By the way, GTK has been ported – Firefox uses it. So in theory it would be possible to port something like Geany. But I agree, it wouldn’t be very nice to use compared with the native programs. |
GavinWraith (26) 1563 posts |
For a comparison of Lua and Python see My own view is that for educational use Lua is superior, because smaller and simpler. |
Rick Murray (539) 13861 posts |
IMHO Zap is the better editor. However, I think procrastination may have just killed its chances. We all know people will seldom explore beyond what is right in front of them (“why bother with that, I have this right here…”). <sigh>
Is any part of !Store available on-line (as in, from Firefox on a PC), or is the !Store application the only portal at this time? When I upgrade, can I rename it !AppStore just to really annoy you-know-who? (^_^) |
Fred Graute (114) 645 posts |
An older port of Python 2.4 can be found here It has a number of tools (mostly to interact with the RISC OS GUI) that Chris’ port doesn’t (yet?) have, that you may find useful.
Alan (Buckley) has packaged StrongED and StrED_cfg is very similar to ZapUser so he may be able to give some useful pointers.
I’d love to hear why you think that. Probably best by email, if you’re interested ( fjgraute (at) planet (dot) nl ). |
Rick Murray (539) 13861 posts |
I’m not sure it is something that would entirely make sense, or be something you could implement. Technically, Zap and StrongEd perform many of the same functions. I just “click” with how Zap does it, in preference to StrongEd. I believe Zap to be more streamlined to my way of thinking, so for me (at least), Zap would be the better choice. Likewise, I really got on well with Ovation and I pretty much loathed how Impression did things; even though for a while Impression (Style? Publisher?) was a more technically capable package. It just didn’t “feel right”. Of course, that changed with OvationPro, so I’m a happy bunny… ;-) I should have gone to bed an hour or so ago but (stupidly) decided to watch some back episodes of Chuunibyou instead of sleeping; thus this might not be the most logical post you’ve ever read. At any rate, the problem here isn’t what Zap or StrongEd can/cannot do (though I could probably find differences, petty as they might be), but more the whole “feel” of the package. I’ll hand over to somebody else if they fancy stoking up The Editor Wars… um, some two decades late… I’m too tired… |
George Pearce (1672) 11 posts |
Done this Chris but nothing seems to happen (on Iyonix) when I click the app icon. |
Chris Gransden (337) 1207 posts |
I’d forgotten there were no instructions in the zip file. You can just bring up a task window and type python27. You can also run it as an ansi task from !Nettle. Cursor keys and tab etc. work. Not all the RISC OS functionality is there yet. The ‘swi’ module should work though. |
Rachel (1641) 23 posts |
I have been using the Python from your link and it’s working fine. Thank you very much for this Chris. I didn’t realise there was a SWI module I shall have to go and have a look for that. |