ricanthug2nv
02-18-2007, 11:30 PM
i downloaded the python for psp thing and i couldnt get it working. could someone help me with this cuz i would really love my psp to interpret python since im at an intermediate level with it! :rolleyes:
PSdonkey
02-19-2007, 02:21 PM
Most people just use LUA since it is a more detailed scripting language then python. However if your really want to use python, check this tutorial here:
http://fraca7.free.fr/pythonpsp/doc/tutorial.html
ricanthug2nv
02-19-2007, 10:39 PM
this is soooo confusing! it tells me to download some files or something and it doesnt give me links to em or anything. and it also says that that tutorial is OBSCELETE
Chernobyl
02-19-2007, 10:46 PM
I dont see why you would want to use python anyway, why not use C or something ?
ttly11
02-19-2007, 11:58 PM
Besides. Python's a snake.
Duh.
tinman
02-20-2007, 12:11 AM
i downloaded the python for psp thing and i couldnt get it working. could someone help me with this cuz i would really love my psp to interpret python since im at an intermediate level with it! :rolleyes:
You should get it from SVN, it includes everything needed.
svn co svn://svn.ps2dev.org/psp/trunk/python
Most people just use LUA since it is a more detailed scripting language then python. However if your really want to use python, check this tutorial here:
http://fraca7.free.fr/pythonpsp/doc/tutorial.html
Python
(+) Is better equipped. Huge library of very useful functionality. Very useful for off line work, e.g. tool scripting. Huge catalog of example scripts [2], tutorials [3], help [4] and general reference material [5].
(+) Extremely high performance numeric computing (ala scientific and graphics) is possible with an add-on module that implements true multidimensional arrays. Strictly speaking, Lua has no arrays and must use a table structure for them. Lua arrays are tables, that's true. The implementation has dual nature, however, and array usage (1..N indices) is optimized as it should be. -ak
(+) ctypes (a module available for Python 2.4 and scheduled for core inclusion in 2.5) allows access to existing shared libraries (.so or .dll) without writing a C wrapper.
(+) Has a remote debugger [6].
* There does appear to be a debugger for Lua which has a remote target addon, see Titmouse on LuaAddons. Has anyone used the remote debugging functionality that could comment? --NDT (wxLua5 has it?)
(+) Python has a nice simple syntax and behaves "as you would expect". ie. no gotchas for scripters like undeclared local variables default to global. Note: this is being resolved in Lua with the new -w flag "(Lua 5.1, but it could be done before, using metamethods)". Python is potentially easier to script for inexperienced scripters/game designers. Really, is it? -ak Yes, it is. I find myself and others having to explain lua quirks to game scripters. python's syntax is more natural (yes, even including the indentation) -DanHollis?
(+) Python has extensive slicing for strings and lists, which is a big productivity gain. I would recommend a slicing library be used by those who want to be more productive in Lua.
(+) Python is properly localized, where lua needs dirty hacks to avoid such stupid things like floating point numbers. Using floating point numbers with some locales brings lua to stop working.
(+) Python has more extensive (though by no means perfect) Unicode support.
(-) Numerous modules including binary DLL's with the standard distribution make it difficult to bundle python with other programs; it may be difficult to modify and specialize if it is not exactly what you require.
(-) Python is whitespace sensitive. While this has its upsides, this can be awful if you happen to be editing the script with some sort of embedded property page that converts tabs to spaces or doesn't accept entered tabs when the source is formatted with them. When using a proportional width font, indentation may become much narrower and more difficult to see (and official python sources tend to mandate use of space).
(-) Python does not support multiple threads with multiple interpreters in a single process. Multiple threads can access the Python interpreter but each thread must hold a global lock while doing so. This is incorrect. The global interpreter lock" is per-interpreter as its name implies, not per process; you could indeed imbed multiple interpreters in a single process. -JonathanEllis?
Lua
(+) Smaller footprint than Python. e.g. Look at the size of python22.dll, 824kb. A basic Lua engine, including parser/compiler/interpreter, but excluding standard libraries, weighs in at under 100kb.
(+) Uses less memory [7]
(+) Faster interpreter (Lua vs. Python) and faster JIT compiler (LuaJIT vs. Psyco) [8].
(+) Has a nice simple API for talking between script and C, with very little generation of glue code required. Try creating and manipulating lists and dictionaries in Python and then doing it in Lua.
(+) Doesn't use reference counting for objects which can get complex and error prone. Although you can use things like the Python Boost library [9] if you're into C++.
(+) Lua started off as a configuration language. This has some nice quirks in that it's great for creating and configuring things - which is what you want to do in a game. Python is probably ahead if you want to write big complicated apps because Lua has some issues, but then Lua is catching up (e.g. table syntax, anonymous functions).
(+) Has a nice, simple, and very powerful syntax. I find you can write the same thing in Lua with less code than Python and you have more flexibilty because of Lua's metamechanisms. e.g. tables are lists and dictionaries combined in Lua (although you can make them behave like PythonLists and PythonDictionaries). Anonymous functions are also particularly nice for configuring things. In Python you get their poor cousin, lambda functions.
(+) Small, simple, stable codebase. Easy to poke around inside and modify if need be. Probably not as well documented and commented as Python.
(+) Lua does support multiple threading. Multiple Lua intrepreters can exist in the same process and each one can run independently in its own thread. Thus Lua is more suitable for embedding in multithreaded programs.
(!) There is still a lack of introductory material for Lua. I think the wiki should probably contain something like the Python tutorial [3]. Ok, see LuaTutorial.
(-) Floating point numbers locale bug. Lua needs some dirty hacks to keep your scripts working when using floating point numbers.
(-) Programs are much more error prone, due to automatic coercion, accessing of unset variables without an exception, and having to check most functions for nil values, rather than just catching the exceptions. There may be some advantages to some of these points however.
IMO the only decent way of solving this is static analysis. Most of my catastrophic globals typos have been in less-used codepaths, and even had -w survived, they would have blown up on people at the worst times. Hence LuaLint, which I suppose I should have a go at for 5.1... --JayCarlson
(-) Lua handles only one type of numbers, usually C doubles or floats, which can lead to overwhelming processing. You should look at the work Python does to add two integers, and think about what overwhelming processing might mean. (In Python, every integer outside of the range [-1, 100) is freshly allocated, for example.) Lua number type can easily be changed at compile time to double, float, even long or int (if one doesn't care for floating points..). But there is a genuine need to have separate int and number types, I agree. -ak
(-) Lack of built-in binary operators (or, and, xor, ..). Embedded systems would really benefit from these (can be made as addon libraries, or using LuaX enumerations).
(-/+?) Lua starts table indices at 1, which is strange for a language designed to interface with C where arrays start at 0. (Comment: Ad-hoc , there is no problem to use index 0 or even -1 ... So if you are a C programmer, you can use "t[0]=t[-1]" etc. But if you are not programmer... for example math-scientisct you can feel familiar with tables t[1..n] )
Rbman
02-21-2007, 07:29 PM
tinman
where can i just download those files, looks like i have to copy paste everything into text files and junk
ttly11
02-21-2007, 08:04 PM
Download subversion here:
http://subversion.tigris.org/files/docu … -setup.exe (3.4MB)
This program will allow you to download PSP libraries and PSPware that are stored off the internet through your command line.
Now just install it.
Take a look at all the psp libraries here:
http://svn.ps2dev.org/listing.php?repna … 0&sc=0
You can browse through them by clicking on each one. Now say you want to download the library libmad (which allows you to load MP3s into your program).
Once you already installed subversion, double click your pspdev.bat file to open up your command line.
Then type this:
svn checkout svn://svn.ps2dev.org/psp/trunk/libmad
and hit enter. You should now see your library downloading into your pspdev folder.
Open it up, take a look at it, read the documentations, and try to learn what that library does and how it works.
You can do this with all of the libraries. To download a different library, just take out the word libmad and add the library that you wanted to download.
For example, if you wanted to download the library libpng (which allows you to add .png files to your program), type this in your command screen:
svn checkout svn://svn.ps2dev.org/psp/trunk/libpng
and hit enter. Now this and the other libraries do not need to be compiled and installed since we already did that earlier with the library installer. But you can read these libraries to see how they work and how to use them.
PSDonkey explains how to dl the libraries there ^ just read/follow links.
PSdonkey
02-21-2007, 08:17 PM
Most people just use LUA since it is a more detailed scripting language then python. However if your really want to use python, check this tutorial here:
http://fraca7.free.fr/pythonpsp/doc/tutorial.html
Python
(+) Is better equipped. Huge library of very useful functionality. Very useful for off line work, e.g. tool scripting. Huge catalog of example scripts [2], tutorials [3], help [4] and general reference material [5].
What I meant by LUA being a more detailed scripting language is that I meant that LUA is used more in the PSP development. There are many examples of LUA coding and tutorials all over the internet for the PSP. It would be a lot easier to pick up and learn LUA in my opinion because of it's extensive detailedness all over the internet for the PSP.
I agree with everything you said about python though. It's ashame that LUA is more the standard in PSP promgramming simply because it is more documented all over the internet for use in the PSP.
python862
02-24-2007, 12:48 AM
This has nothing to do with this post, but HEY! THAT'S MY NAME!
vBulletin® v3.8.5, Copyright ©2000-2010, Jelsoft Enterprises Ltd.