$ python source/main.py --interpreter
$ python source/main.py myfile.txt
Hmm seems interesting. I hope it runs commands exactly like the calc counterparts, although in the future it would be cool if it was extended for computer usage too, such as higher resolution and stuff. :D
This project kinda reminds me of Basic++ by Miotatsu actually. He tried making a TI-83+ BASIC interpreter in C++, but he lost the entire source. :(
No .exes, sorry -- you need Python 2.7 and Pygame.
No .exes, sorry -- you need Python 2.7 and Thegame.Seriously, I think I need to have my head examined... x.x
python source/main.py --interpret
:: This is where PyInstaller is located on your computer. It should be the stable (1.5.x) version!
:: Do NOT use the trunk version; it will NOT work.
@set PYINSTALLER_PATH=C:\Users\arthur\Documents\pyinstaller-1.5.1
:: This is where you want the build files to be. You should set this to the source dir\build directory, but you're free
:: to choose any directory you wish - just make sure it exists.
@set BUILD_DIR=C:\SourceCode\axeinterpreter\build
:: File to compile (this should be the main one)
@set TO_COMPILE=C:\SourceCode\axeinterpreter\source\main.py
:: Basename of Python file that you're compiling - for example:
:: Compiling C:\bla\bla\bla\interesting.py
:: The basename for this file is "interesting"
:: (do not specify quotes)
@set BASENAME=main
:: Final base file name
@set FINALNAME=AxeInterpreterv0.0
:: Uncomment if you haven't used PyInstaller before
::C:\Python27\python %PYINSTALLER_PATH%\Configure.py
C:\Python27\python %PYINSTALLER_PATH%\MakeSpec.py --onefile --windowed -o %BUILD_DIR% %TO_COMPILE%
C:\Python27\python %PYINSTALLER_PATH%\Build.py %BUILD_DIR%\%BASENAME%.spec
move %BUILD_DIR%\dist\%BASENAME%.exe %BUILD_DIR%\dist\%FINALNAME%.exe
pause
Because I don't want people to play with broken exes, here are working ones!Good tweaks indeed. :)
I made a few minor tweaks. Double-clicking the exe now starts the interpreter, you can drag and drop a text file over the exe to try and run it, and the program will drop into the interpreter mode after a text file finishes running (so that you can do a postmortem, dissect variables, etc.)
For some inexplicable reason, you need to add a 'import pygame._views' while using pyinstaller in windows but exclude it for linux.
Nice project. One bug I noticed is that even if you don't use DispGraph, entering anything in the interactive mode will cause the display to update.
Some further suggestions...
1) I suggest you look into threading (you'll be seeing that very soon in Croquette!) for Pygame event pumping. If you don't "process" the events sent to the Pygame window, Windows will think it died and ask to terminate it. :P The Pygame portion MUST remain in the main thread (unfortunately), but the CLI interpreter can be handled in the thread, making things work out nicely. :) (Even if it's odd to do graphics processing first :P)
2) Add an option to hide/show the window? (As you've demoed, some commands do not need the screen shown.)
3) CLI commands - like when I do Output(1,1,"Hello world!"), it shows it in the console instead. A flag must be toggled for this to work, of course. If you want to implement this, you need to use a mix of the ncurses module and the Windows Console module (http://effbot.org/zone/console-index.htm).
Otherwise, it's pretty nice :D
Or what about Axecutor?That sounds like a Pokémon :P
Because I don't want people to play with broken exes, here are working ones!^ That.
I made a few minor tweaks. Double-clicking the exe now starts the interpreter, you can drag and drop a text file over the exe to try and run it, and the program will drop into the interpreter mode after a text file finishes running (so that you can do a postmortem, dissect variables, etc.)
For some inexplicable reason, you need to add a 'import pygame._views' while using pyinstaller in windows but exclude it for linux.
Download Windows version: http://dl.dropbox.com/u/10645749/axe-interpreter-windows.zip (http://dl.dropbox.com/u/10645749/axe-interpreter-windows.zip)
Download Linux version: http://dl.dropbox.com/u/10645749/axe-interpreter-linux.zip (http://dl.dropbox.com/u/10645749/axe-interpreter-linux.zip)
K_BACKSPACE : 15
Does anybody know how you can use a bytearray or a list (in python) to manipulate or create a pygame Surface?Take a look at these two classes (is that the right term?):
Maybe one of the included keymap config files could be just like Wabbit's default. It's alright, but could be better IMHO.
There are two ways:Maybe one of the included keymap config files could be just like Wabbit's default. It's alright, but could be better IMHO.
Do you know where I can find an official copy of what Wabbitemu uses for key mappings? This should be pretty trivial to change.
So what does this actually do? is this meant to test axe programs on pc without a lot emulator hassles?Looks like a port of Axe to computer to me. If it is, maybe color commands should be added.
So what does this actually do? is this meant to test axe programs on pc without a lot emulator hassles?^ That. It could also eventually let you port your Axe games to be playable on the computer.
so grey just displays in fixed colour until the next update?