A
A
alekseyHunter2019-08-17 15:19:28
Python
alekseyHunter, 2019-08-17 15:19:28

How to implement code rewriting by the application during its execution?

There is a voice assistant written in python. You want to add a feature that allows you to make changes to the program code while the application is running.
Example:
-Jarvis, crack that thing over there.
- Sir, I can't.
- So learn, Jarvis.
- The learning process has begun.
My execution plan:

  • Create a copy of the project files
  • Open the required file for editing
  • Add code
  • Build project (via console)
  • Run a new project in the background
  • Kill the current (old) application process

Now the fun part... Will it work? If not, please make adjustments to this mega detailed plan xD

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2019-08-17
@alekseyHunter

Jarvis, read about AST .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question