^title
It seems like it wouldn't be too hard. It could read from files, which you would select from a command line. I don't know what to name it. It will use Python 3, so upgrade to 3 if you want to join.
Offline
This doesn't really belong in Scratch...
Offline
Codebreaker wrote:
This doesn't really belong in Scratch...
It's a collaboration. They are allowed for other languages.
Offline
maxdoss wrote:
I would join if I had Python.
You can get it free here.
Offline
Let's try this in Advanced Topics...I think that might be a better fit.
Offline
I started a language class, so it can easily be implemented into an interpreter or interactive mode.
Offline
http://scratch.mit.edu/forums/viewtopic.php?id=22543 (Old Attempt). Out of curiosity, how do you plan on making the GUI?
Last edited by Magnie (2011-12-10 00:16:04)
Offline
Python programming language has been more security. So most of the website owners are interested to develop their web site in python
Offline
I am interested in helping if you decide to use 2.7 instead.
Offline
Magnie wrote:
I am interested in helping if you decide to use 2.7 instead.
+1
Offline
Magnie wrote:
http://scratch.mit.edu/forums/viewtopic.php?id=22543 (Old Attempt). Out of curiosity, how do you plan on making the GUI?
tkinter, probably. A GUI won't be priority.
Offline
ohaiderstudios wrote:
Magnie wrote:
I am interested in helping if you decide to use 2.7 instead.
+1
Sorry guys, I find 3.2 easier because of little things like input instead of raw_input.
Offline
I just realized you want to make a programming language and not a clone of Scratch ( whoops
). You should try asking in communities that use Python or communities that make programming languages. Most people on Scratch are new to programming and those who are moving on from Scratch are learning new languages.
Offline
Wow, thats sounds pretty difficult.
Offline
I could try... I was planning to upgrade to 3 anyway. I'm not sure how I would go about doing it though.
Offline
First I want to see your work, to make sure I'm not pulling your weight. Do you understand classes and functions? Do you know all of the operators? When is an elif necessary? I hope you know how to use tkinter. Otherwise we might be able to use easygui. Also I hope that you know how to package programs in .exe or .app files, because I don't.
Offline
nickbrickmaster wrote:
First I want to see your work, to make sure I'm not pulling your weight. Do you understand classes and functions? Do you know all of the operators? When is an elif necessary? I hope you know how to use tkinter. Otherwise we might be able to use easygui. Also I hope that you know how to package programs in .exe or .app files, because I don't.
You won't need to pull my weight, I get tkinter, get classes and functions, although I can't do EXEs.
Offline
Okayz I'm working on Peppermint-InteractiveMode.
Working on variables at the moment.
Offline
nickbrickmaster wrote:
Okayz I'm working on Peppermint-InteractiveMode.
Working on variables at the moment.
I already started. let me upload first.
Offline
Here is the code:
Peppermint.py:
varnames = []
varvalues = []
exit = 0
while exit == 0:
user_input = input("Peppermint> ").split()
if user_input[0] == "var":
file = open(user_input[0] + ".txt")
todo = ''
for i in file.readlines():
todo += i
file.close()
exec(todo)
else:
for i in user_input:
for d in varnames:
if i == d:
indx=user_input.index(i)
user_input.remove(i)
user_input.insert(indx, varvalues[varnames.index(d)])
try:
file = open(user_input[0] + ".txt")
except IOError:
print("No Peppermint command called " + user_input[0])
else:
todo = ''
for i in file.readlines():
todo += i
exec(todo)
file.close()output.txt:
whattoprint = []
for d in user_input:
if d != 'output':
whattoprint.append(d)
for d in whattoprint:
print(d, end = ' ')
print('\n')var.txt:
newvarname = user_input[1] newvarvalue = user_input[2] varnames.append(newvarname) varvalues.append(newvarvalue)
exit.txt:
exit = 1
Put these all in the same folder and run Peppermint.py.
Offline
nickbrickmaster wrote:
Here is the code:
Peppermint.py:Code:
varnames = [] varvalues = [] exit = 0 while exit == 0: user_input = input("Peppermint> ").split() if user_input[0] == "var": file = open(user_input[0] + ".txt") todo = '' for i in file.readlines(): todo += i file.close() exec(todo) else: for i in user_input: for d in varnames: if i == d: indx=user_input.index(i) user_input.remove(i) user_input.insert(indx, varvalues[varnames.index(d)]) try: file = open(user_input[0] + ".txt") except IOError: print("No Peppermint command called " + user_input[0]) else: todo = '' for i in file.readlines(): todo += i exec(todo) file.close()output.txt:
Code:
whattoprint = [] for d in user_input: if d != 'output': whattoprint.append(d) for d in whattoprint: print(d, end = ' ') print('\n')var.txt:
Code:
newvarname = user_input[1] newvarvalue = user_input[2] varnames.append(newvarname) varvalues.append(newvarvalue)exit.txt:
Code:
exit = 1Put these all in the same folder and run Peppermint.py.
I tried to tell you. If you can't follow instructions, you can't be in this. Anyway, we didn't agree on Peppermint as the name.
Offline
samtwheels wrote:
nickbrickmaster wrote:
Here is the code:
Peppermint.py:Code:
varnames = [] varvalues = [] exit = 0 while exit == 0: user_input = input("Peppermint> ").split() if user_input[0] == "var": file = open(user_input[0] + ".txt") todo = '' for i in file.readlines(): todo += i file.close() exec(todo) else: for i in user_input: for d in varnames: if i == d: indx=user_input.index(i) user_input.remove(i) user_input.insert(indx, varvalues[varnames.index(d)]) try: file = open(user_input[0] + ".txt") except IOError: print("No Peppermint command called " + user_input[0]) else: todo = '' for i in file.readlines(): todo += i exec(todo) file.close()output.txt:
Code:
whattoprint = [] for d in user_input: if d != 'output': whattoprint.append(d) for d in whattoprint: print(d, end = ' ') print('\n')var.txt:
Code:
newvarname = user_input[1] newvarvalue = user_input[2] varnames.append(newvarname) varvalues.append(newvarvalue)exit.txt:
Code:
exit = 1Put these all in the same folder and run Peppermint.py.
I tried to tell you. If you can't follow instructions, you can't be in this. Anyway, we didn't agree on Peppermint as the name.
1. This is a collab. You are not giving me instructions.
2. I just wanted to show you what I had.
3. Fine then. It doesn't have to be Peppermint. You never said anything else.
4. Good luck finding someone else to do it.
Last edited by nickbrickmaster (2011-12-16 16:47:46)
Offline
nickbrickmaster wrote:
samtwheels wrote:
nickbrickmaster wrote:
Here is the code:
Peppermint.py:Code:
varnames = [] varvalues = [] exit = 0 while exit == 0: user_input = input("Peppermint> ").split() if user_input[0] == "var": file = open(user_input[0] + ".txt") todo = '' for i in file.readlines(): todo += i file.close() exec(todo) else: for i in user_input: for d in varnames: if i == d: indx=user_input.index(i) user_input.remove(i) user_input.insert(indx, varvalues[varnames.index(d)]) try: file = open(user_input[0] + ".txt") except IOError: print("No Peppermint command called " + user_input[0]) else: todo = '' for i in file.readlines(): todo += i exec(todo) file.close()output.txt:
Code:
whattoprint = [] for d in user_input: if d != 'output': whattoprint.append(d) for d in whattoprint: print(d, end = ' ') print('\n')var.txt:
Code:
newvarname = user_input[1] newvarvalue = user_input[2] varnames.append(newvarname) varvalues.append(newvarvalue)exit.txt:
Code:
exit = 1Put these all in the same folder and run Peppermint.py.
I tried to tell you. If you can't follow instructions, you can't be in this. Anyway, we didn't agree on Peppermint as the name.
1. This is a collab. You are not giving me instructions.
2. I just wanted to show you what I had.
3. Fine then. It doesn't have to be Peppermint. You never said anything else.
4. Good luck finding someone else to do it.
1. I am the leader of this collab.
2. I wanted to finish mine first.
3. We should agree on a name.
4. I don't need anyone else. I have decided to do this on my own, considering that you cannot comply.
Offline