I wrote a program in C, and designed its GUI using Python. Now I want to convert it to a web app.
I have GUI.py and abc.exe file.
Can I directly execute GUI Python script (GUI.py) on 'Apache2' local server? If yes, then how?
It depends on how the GUI is written, what abc.exe does and how you want to use the web interface. In general, what you want is not possible. While for local applications there is only one user and it is clear, when the user terminates the program, for web applications there can be millions of users at the same time, and when the application doesn't hear anything form a user, it is not clear, if the user closed the window, or there is a network connection broken, or anything else. That's why web applications are as far as possible stateless, or session information is written to databases. This is not the case for local applications, so you have to rewrite probably large parts of the C code.
How to run GUI Python script on Apache?