Hello to you all!

I am currently working on a Python Interpreter CE in ICE, as mentioned in the title.
So far, I've just begun. But I plan on making these programs:
prgmPYTHON
prgmPTEXT

prgmPTEXT is the Python Text Editor, you put your code here, and the program will save that to an appvar (name is of your choosing).
Then, in prgmPYTHON, you can execute your Python code, given you have inputted the name of the code's appvar.
The first 2 lines of code that will be available is:
print("[your text here]"), print(variable) and variable saving, like:
variable = 51

prgmPYTHON will be like a console.
Feedback is appreciated. Screenshots will arrive asap, once the program is completed.
Will this be completely up to spec or just a language with similar syntax?
If you need help, we are here. But keep in mind this is a major undertaking and it may take forever, if ever, to finish. Perhaps a subset of the Python interpreter would be sufficient?
TimmyTurner62 wrote:
I am currently working on a Python Interpreter CE in ICE

MateoConLechuga wrote:
If you need help, we are here. But keep in mind this is a major undertaking and it may take forever, if ever, to finish. Perhaps a subset of the Python interpreter would be sufficient?


Thx to you all for help!
So far, print("[text]") works.
This outputs [text] to the homescreen console.
More commands will be added later!

Simply make a program, and type:
:PRINT("[text]")--

The '--' represents the colon ':'. I can only do this because the ICE program cannot read colons, as it will think that colon is a new line of code. So just replace the colon with '--'. After runnning, press [clear
] to exit. The program will tell you how many Python lines were executed! Then press enter to exit.

Should I release the program (as it is right now)???
TimmyTurner62 wrote:
MateoConLechuga wrote:
If you need help, we are here. But keep in mind this is a major undertaking and it may take forever, if ever, to finish. Perhaps a subset of the Python interpreter would be sufficient?


Thx to you all for help!
So far, print("[text]") works.
This outputs [text] to the homescreen console.
More commands will be added later!

Based on the limited progress, it probably doesn't need a release. You should probably look into how to do more complex interpretation behavior (i.e. if, while, arrays, strings, any other advanced behaviors) before simple things like PRINT, as the way you parse the program will change the way you implement simpler functions. I've found in the past that, when I write complex programs, top-down programming like this becomes a complex spagettified mess of kludges.

I'm sorry if I come off a bit negative. Just, maybe spend some time actually plotting some of the actual structure of the program before working on things like 'PRINT.'
s
From some other thread:
Quote:
I'm already doing that. It will be in ICE, but I already added one command: print("[text]")
However, to signify a new command, you will need to add a '--' (2 '-' 's)

You should be able to tell when a new command starts by the newline, because python has meaningful whitespace. not that this will get very far anyway if you start working from the top down, but whatever
commandblockguy wrote:
From some other thread:
Quote:
I'm already doing that. It will be in ICE, but I already added one command: print("[text]")
However, to signify a new command, you will need to add a '--' (2 '-' 's)

You should be able to tell when a new command starts by the newline, because python has meaningful whitespace. not that this will get very far anyway if you start working from the top down, but whatever


I looked it up, is it '/n'? I'm not too sure

EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!
commandblockguy wrote:
Will this be completely up to spec or just a language with similar syntax?


Answer:
For now, a program with *similar* syntax. After I get everything done, I will change all the code for checking the scripts and then make it up to spec Very Happy
TimmyTurner62 wrote:
commandblockguy wrote:
From some other thread:
Quote:
I'm already doing that. It will be in ICE, but I already added one command: print("[text]")
However, to signify a new command, you will need to add a '--' (2 '-' 's)

You should be able to tell when a new command starts by the newline, because python has meaningful whitespace. not that this will get very far anyway if you start working from the top down, but whatever


I looked it up, is it '/n'? I'm not too sure

EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!


have you found a way to use varibles?
Alvajoy123 wrote:
TimmyTurner62 wrote:
commandblockguy wrote:
From some other thread:
Quote:
I'm already doing that. It will be in ICE, but I already added one command: print("[text]")
However, to signify a new command, you will need to add a '--' (2 '-' 's)

You should be able to tell when a new command starts by the newline, because python has meaningful whitespace. not that this will get very far anyway if you start working from the top down, but whatever


I looked it up, is it '/n'? I'm not too sure

EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!


have you found a way to use varibles?


Here's a link to what I have as of right now:
https://github.com/TimmyTurner51/Python-Interpreter-for-TI-84-Plus-CE/tree/master
And Nope :/ I can't get it to know when a new line (in this case, a '/n') begins. Because of this, it doesn't recognize the only command I have added so far: print("[text]").
Help needed tho Smile
TimmyTurner62 wrote:
EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!

I ran into this same problem with ScriptCE
I can send you the code if you think it will help you
calclover2514 wrote:
TimmyTurner62 wrote:
EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!

I ran into this same problem with ScriptCE
I can send you the code if you think it will help you


Man thanks!!! Smile
Now I need to see where it reads program code
TimmyTurner62 wrote:
calclover2514 wrote:
TimmyTurner62 wrote:
EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!

I ran into this same problem with ScriptCE
I can send you the code if you think it will help you


Man thanks!!! Smile
Now I need to see where it reads program code

prgmLUAFSRC fixes the string, prgmLUALSRC and prgmLUAESRC interpret the string.
Hope this helps!
calclover2514 wrote:
TimmyTurner62 wrote:
calclover2514 wrote:
TimmyTurner62 wrote:
EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!

I ran into this same problem with ScriptCE
I can send you the code if you think it will help you


Man thanks!!! Smile
Now I need to see where it reads program code

prgmLUAFSRC fixes the string, prgmLUALSRC and prgmLUAESRC interpret the string.
Hope this helps!


What reads the script program and saves it's code to a string?
TimmyTurner62 wrote:
calclover2514 wrote:
TimmyTurner62 wrote:
calclover2514 wrote:
TimmyTurner62 wrote:
EDIT: URGENT!!! HELP NEEDED!!!
Help! I need to find a way to get all of the contents from a program and save it to Str0!
Here's how I'm making it work:
1.) You type a program name that contains your python code.
2.) I NEED the program to read the contents of that program exactly. For example, if I had in prgmTEST:
:print(''HELLO WORLD!'')/n
And I read it, I want it to read it to Str0 exactly like it was.
Please help!

I ran into this same problem with ScriptCE
I can send you the code if you think it will help you


Man thanks!!! Smile
Now I need to see where it reads program code

prgmLUAFSRC fixes the string, prgmLUALSRC and prgmLUAESRC interpret the string.
Hope this helps!


What reads the script program and saves it's code to a string?

The bottom of prgmLUAMSRC
Thank you calclover! Thank you all for all the help. I have 4 more posts to become an advanced member so...
UPDATE TIME...
Thanks to calclover's code, I was able to make an auto-detect routine for finding programs beginning with ':PYTHONSRC'.
You can also search for a script if it does not auto detect it.

So far, variables can be defined, example:

Code:
 :MYINT = 10

Also, PRINT(" <TEXT> ") can be used. I also added PAUSE, for pausing so the user can see what was printed on the screen.
Finally, if you type

Code:
 :<script name>.py

This will enable the basic output system, so that PRINT("") can be used.
Thankd for the ongoing support! And I hope I can make this to be a successful program!
newlines are "\n" (backslash, n), not "/n" (forward slash, n)
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement