Hi there!
I'm Argi.
I'd like to begin by mentioning that I'm a programmer, but I don't typically work with Python. Consequently, my question may appear somewhat basic, for which I apologize in advance.
So let's start with the fact that my problem is compiling a file with the extension '.py' to a file with the extension '.pyc'. I wrote a simple hack [for fun and to learn some Python basics], which cannot work on some servers due to security measures that delete files from the client folder.
Currently I'm loading the '.py' file through some pyLoader when the client starts, I plan to load the '.pyc' file once I manage to compile it :)
As a programmer, I am aware that when compiling a file, you need to have the sources of the modules that you import in the script and this is where things get a bit complicated :)
I've created a script named script.py that imports the following modules:
The script functions as intended, but I'm interested in compiling it into script.pyc. However, when I attempt to compile it using PyCharm, I encounter a "ModuleNotFoundError: No module named 'app'" error.
I'm sure it's possible to compile these files somehow, I just lack the knowledge. I don't know if I would need metin2 source, or maybe these modules are available somewhere and I could download them?
Or maybe there is another way to compile these files?
I'm asking for help, I'm very interested in this topic from a programmer's point of view. I suspect that there are not many programmers left on the forum who would like to share this knowledge, because the game itself is quite old.
Anyway, I'm looking forward to your replies. If you would prefer to contact me via private message, please do so.
Regards!
Additional information:
I'm Argi.
I'd like to begin by mentioning that I'm a programmer, but I don't typically work with Python. Consequently, my question may appear somewhat basic, for which I apologize in advance.
So let's start with the fact that my problem is compiling a file with the extension '.py' to a file with the extension '.pyc'. I wrote a simple hack [for fun and to learn some Python basics], which cannot work on some servers due to security measures that delete files from the client folder.
Currently I'm loading the '.py' file through some pyLoader when the client starts, I plan to load the '.pyc' file once I manage to compile it :)
As a programmer, I am aware that when compiling a file, you need to have the sources of the modules that you import in the script and this is where things get a bit complicated :)
I've created a script named script.py that imports the following modules:
HTML Code:
import app import ui import wndMgr import uiToolTip import localeInfo import dbg
I'm sure it's possible to compile these files somehow, I just lack the knowledge. I don't know if I would need metin2 source, or maybe these modules are available somewhere and I could download them?
Or maybe there is another way to compile these files?
I'm asking for help, I'm very interested in this topic from a programmer's point of view. I suspect that there are not many programmers left on the forum who would like to share this knowledge, because the game itself is quite old.
Anyway, I'm looking forward to your replies. If you would prefer to contact me via private message, please do so.
Regards!
Additional information: