| View previous topic :: View next topic |
| Author |
Message |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Mon Oct 03, 2005 1:17 am Post subject: Preliminary Python port |
|
|
Hello. I've just "released" a preliminary port of the Python programming language for the PSP, with bindings for the essential PSP APIs as well as part of pspgu.
More details on my blog: http://fraca7.free.fr/blog/
Feedback is welcome. |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Mon Oct 03, 2005 11:58 am Post subject: |
|
|
the screenshot looks promising.. have you implemented full 32-bit color? _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Mon Oct 03, 2005 2:31 pm Post subject: |
|
|
| Yes. The initial goal was to wrap enough of libpspgu to port one of the samples to Python, so the sceGuDrawArray function is part of it. Unfortunately, the API is not quite Pythonic; you have to do low-level stuff with the struct module. This will change soon. |
|
| Back to top |
|
 |
Istari
Joined: 30 Sep 2005 Posts: 10
|
Posted: Mon Oct 03, 2005 8:37 pm Post subject: |
|
|
I have been trying to build, using the code from your repository. And I'm getting errors. The command I use is:
| Code: | | python-psp/PSP$ make |
How do you fix the undefined reference to _stat?
It seems to me that you are using some voodoo to build, and haven't put all the nessecary code in svn. ;) (Please correct me if I'm wrong)
Is there any particular reason why you aren't using SWIG, or something similar, to wrap the SDK? |
|
| Back to top |
|
 |
nashdj
Joined: 27 Jan 2004 Posts: 3
|
Posted: Mon Oct 03, 2005 9:53 pm Post subject: |
|
|
| Istari wrote: | | I have been trying to build... |
I just checked out and built revision 13 with no problems. |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Mon Oct 03, 2005 9:57 pm Post subject: |
|
|
| I also got the _stat problem using an older version of psptoolchain. Just update it and it will be OK. |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Tue Oct 04, 2005 3:13 am Post subject: |
|
|
Istari: About SWIG. Apart from the classic Bison/Flex pair, I don't trust a computer program to generate correct C code. Hell, I don't even trust most C programmers to generate correct C code, for that matter.
The Python/C API is so simple and elegant that I just use it directly. It may be kind of repetitive, but hey, it's C. It's always been. |
|
| Back to top |
|
 |
Istari
Joined: 30 Sep 2005 Posts: 10
|
Posted: Tue Oct 04, 2005 4:17 am Post subject: |
|
|
OK. Fixed after I did a in the toolchain directory (It would have helped to notice that particular line in the docs sooner), followed by a rebuild of the toolchain.
Thanks for the help, and thanks for porting my favorite language to the PSP. |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Tue Oct 04, 2005 4:44 am Post subject: |
|
|
No sweat. It's also my favorite language :)
But there's still much to do. I've set up a simple Web page to keep track of evolutions, at the following URL:
http://fraca7.free.fr/pythonpsp/
If the project goes well, this will be enhanced later. Maybe moved to Sourceforge, or rather on the pspdev SVN repository. Who knows. |
|
| Back to top |
|
 |
|