Umm, 'Jackepc' would like to know, me too, why Python doesn't have it's own designated script area? Python is over five years old in the Amiga OS now. I play with it and try to learn to use it. Anyone else using Python?
I've messed with Python a wee bit. I use my biggest script so far (125 lines) regularly to add photo albums to my hike albums pages, and a small one to change "?," "`," etc. to the unicode for the proper symbols in Hawaiian place names in those albums.
But I really don't know how to use it--it's pulling teeth every time I start a project, and spending a lot of time in Python-Docs-2.5. If I don't want to hurt my brain, I use ARexx.
Hi @Hans ...looks like not many people are using Python on Amiga OS at present. To me, it's climbing the 'learning curve' that makes it slow and tedious. I try to write some basic apps like 'install a file' that was written in AREXX or BCPL using PYTHON. Ever since installing OS4.1 with Python, I've inspired to study it more. A dedicated forum here could be useful... I agree!
@SSolie It's just so strange the topic of Python is so hushed...
@ kilaueabart ... every time I start a project, and spending a lot of time in Python-Docs-2.5... Yep, same here.
I really like to improve my python usage on Amiga. What is stopping me is that there is no way to manage gui elements for creating a standalone software as the native gui system TkInter is missing. Luckily Rogue said that he might implement in the future a Reaction module: finger crossed!
I am using Gui4Cli for this. At least in the learning stage, you can just launch your Python scripts from a Gui4Cli gui(from a button a listview) You can use environmental variables, files to use one gadgets result as input for an other gadget or subroutine. One of the things i am trying to do is save the output (an object) from one script to a file (say in t:), then reloading the same object later as input to an other gadget's python script. I had however the following problem:
pickle.py comes standard with AmigaPython (Python/Lib.pickle.py) The help() function >>> pickle works OK and notably describes pickle's dump function
what is wrong with the use of its dump (& dumps) function(s)?
.RAM Disk:T> python Python 2.5.5 (r255:1.2, Mar 27 2010, 21:00:30) [GCC 4.2.4 (adtools build 20090118)] on ppc-amiga Type "help", "copyright", "credits" or "license" for more information. >>> stringtje = "alpha,beta,gamma" >>> stringtje.split(",") ['alpha', 'beta', 'gamma'] >>> splitje = stringtje.split(",") >>> import pickle >>> myfile = open("test","w") >>> dump(splitje,myfile) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'dump' is not defined >>> dumps(splitje) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'dumps' is not defined >>> splitje ['alpha', 'beta', 'gamma'] >>> file2 = open("test2","w") >>> file2.dump(splitje) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'file' object has no attribute 'dump' >>> file2.close() >>> myfile.close()
Some other list that would be nice is one of packages succesfully installed on OS4 I tested just one till now: docutils. It installed easily. I am writing my experiences down using the RST (restuctured text markup) that is the standard for Python documentation. Docutils rst2html.py transforms it into HTML. You can transform those RST in a lot of formats.
It should be noted that most Python libraries are written in Python, so if one is missing in the OS4 2.5.1 version first hunt for it.
It's just so strange the topic of Python is so hushed...
I'm not sure what you mean. Python has many books available and zillions of scripts are out there. Just seems like few people are interested in using it on their Amigas.
What may be 'hushed' is the Amiga-only modules that come with Amiga Python. Those are documented but I suppose some more docs would be helpful.
As for a GUI, I did provide a small tutorial on my web site which describes how to create Python modules on the Amiga. A motivated developer with some Amiga GUI experience could whip up a GUI interface for Python rather quickly.
There is an enormous Python community out there and plenty of books and tutorials as well. The Amiga-only aspects of Amiga Python are very small.
@JosDuchIt There seems to be no answer till now why there is no such script area. Yes, I noticed. I've been hanging back to see what goes. I seems very few members care that much about Python on the AmigaOS. It's a shame too.
Isn't this the feedback forum? Yes indeed. I guess the 'main-man' is on vacation!
Hi @ssolie #11 I'm not sure what you mean. Python has many books available and zillions of scripts are out there. Yes, of course, I know that.
I think what i said was referring to and relative to Amiga Python, yes? 'ActiveStatePython' is mostly for PC/Windows. 98% of the recipes won't work in OS4 and therefore useless. I'm kind of interested in useful Python scripts/recipes on the Amiga.
Just seems like few people are interested in using it on their Amigas.
While once upon a time I were a real ARexxWizzard (tm), I'll really want to play with Python. But from pure lazyness I still mostly use ARexx...
Last night I had the strange idea to use Python, the ARexx module and PEB's Visualguimaker to build some utility. Maybe I should get more sleep and take my pills...
@orgin 1) I think the question is mainly to have a centralised script area, where to upload snippets (*) , solved problems, interaction of Python with other languages available on the Amiga. Stuff that can help newbies. Answers to questions that we did find (eg what exactly are the Python improvements on the OS4 versions ande updates?)
2) It will probably not be flooded, but it may stimulate interest in Python. This interest is there, and potential is high, but interest can only grow if newbies are not overwhelmed by the vast amount of sometimes conflicting information.
3) i also suggested to have some document, listing packages successfully downloaded and installed, updated by members
4)Searching on Amiga Python Development does not provide much usefull starting sites (except Solies site) I don't find Amiga Development sites (Utilitybase, ...) interested in Python either. IMHO there is a need for what is asked
(*) BTW i know there is a general upload possibility, but that's all i know about it. Could this be used (easily) for what is asked?
I agree totally about the creation of a specific forum area for Python. As ARexx will not be further developed and will still 68k forever, it might be a good idea to (at least) start stimulating the community about a new scripting solution and I think Python could fullfill the task. Go Python, go!
Hi@JosDuchIt #17 1) I think the question is mainly to have a centralised script area, where to upload snippets (*) , solved problems, interaction of Python with other languages available on the Amiga. Stuff that can help newbies. Thank you sir for that great response! I was trying to think of something more clear to say instead of this:
@ Orgin, ...do we really need a python forum here on amigans? Well, kind of! Consider the following Python program that was made available recently to Amiga called "PIL"-Python Imagining Library. The docs are vague about installation and don't have any info on usage. Maybe the up-loaders maybe could give us clues about the program if there was an official OS4 Python forum. Is there any member using this software right now ?
INSTALATION Installing the pre built version: Copy the contents of the drawer Python/ to PYTHON: Which directory? Any or the one called "site packages"? Any Python experts in the OS4 house that can answer this?
After reading all docs about Apple and Windows, I came-up empty handed for anything to work on Amiga. So, it was a 'developers' package and has nothing to do with the general AmigaOS user, yes?
So, I'm just saying, from my POV, that's why Amiga Python seems bit hushed: too few are interested in it, and anyone using it is an expert developer somewhere else. So I guess I should change my answer to 'NO', we don't need a Python forum. Most of the time I'm totally in the dark with Amiga Python...
Considered using it. Discovered there was no way of getting RESULT when sending commands to ARexx ports. Stuck with ARexx.
Python looks horribly complicated to me, there's nothing I want to do which can't be done simpler with ARexx. I am Python refusenik and will resist until the bitter end.
A script library for actual AmigaOS-only or AmigaOS-related scripts is better off on OS4Depot or Aminet, uploaded just like ARexx scripts are.
A support forum might be a good idea, but the general dev forums are fine for this given the volume of Python queries (ie. none), and Python questions are likely to get better answers on Python forums if they aren't AmigaOS related. UtiltyBase may be a better location for a dedicated Python forum, it already has an ARexx one.