Python Forum
using Python as an program's internal scripting system
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using Python as an program's internal scripting system
#1
i will develop a program ... it might be in C ... it might be in Pike ... it might be in Python3 ... and the program needs a scripting system to run "internally". one of the programs is a 2D image builder for websites to do things like draw simple shapes with parameters from the web request. the internal scripting will take these parameters and use them with various web shape primitives to construct the 2D image.

what i would like is for this scripting system to be based on the Python3 language so that it will be familiar to Python coders. but it will need a simple way to get the parameters and do various basic image construct actions. making this like a function seems reasonable. what i'd like to know is what are the best things to read to learn about this.

i can envision a way to do this when the base program itself is in Python3 which is to read the file that script is in, set up an environment, and call exec() with that environment. it would call mrthods in classes and in modules that set up final details for the rendering phase.
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
  an app's scripting system in Python Skaperen 0 973 May-07-2022, 04:58 AM
Last Post: Skaperen
  Where can I get information about internal logic of source code Python? AlekseyPython 1 2,488 Dec-17-2018, 05:27 AM
Last Post: siripriya
  Can a python program execute an action on another software program? lex 4 3,938 Jan-26-2018, 03:10 PM
Last Post: buran

Forum Jump:

User Panel Messages

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