Python Forum
a fun(ny) program i want to make
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a fun(ny) program i want to make
#1
i tested this and it is possible to make a Python script be an interpreter of another script on the other script's #! line. so what i think i want to do is make a stack-oriented language that has the run-time features of Python.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
(Feb-03-2018, 04:21 AM)Skaperen Wrote: it is possible to make a Python script be an interpreter of another script on the other script's #! line.
Of course it is possible! This was already used 20 years ago in the famous (and obsolete) peak python framework. They used this feature to create "executable configuration files", files that contain ini file information but have a shebang line pointed to a python application that reads them.
Reply
#3
i never encountered peak or anything else doing this. when i thought about it, rather than ask if it could be done (that there was nothing in python that would break it), i decided to test it since such a test would be simple enough.

anyway, i am think of a stack oriented language (somewhat like Forth) but operates in the Python data space. i would add a stack and operate it in a separate local name space. it would have access to everything a Python script would have access to. an interpreter written in Python should be very simple for this. this is the kind of stuff that is fun for me.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can somebody take a look at my program and make suggestions kenwatts275 1 1,668 May-07-2020, 04:32 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020