c# - Loading Multiple Scripts from IronPython, Executing, and allowing them to access functions in realtime -


I am currently working on my Bot which reads chats, and people use IronPython to script those commands , But currently I do not load this script '

, and if this happens, then it does not read commands or crashes completely.

Here is the code:

  Public class ScriptEngine {Personal Static Script Engine E = Python. Cretegenine (); Private Static ScriptScope s = null; Public static async zero load () (if directory! Axis ("script")) Directory.CreateDirectory ("scripts"); S = e.CreateScope (); Var path = E. GetSearchPaths (); paths.Add ("Script"); e.SetSearchPaths (path); Directory.GetFiles (".", "* .py") .Olist (.) Identification (F => E.ExAtextfile (F, S));} } Public class ReadCommand {public string commandName {get} set;} public read command (string c) {c = CommandName;} public string read command () {while (true) {if (File.Exists (@ "logs \ current .log ")) {var ln = File.ReadLines (@" log \ current.log "). Return (); Return Commanders (ln);} Return Null;} Return Null;}}  

Edit Script1.py :

  * Def testcommand () from NotiShy import: ReadCommand ("name", "Hello from Python!") Testcommand ()  

How do I work around? I have tried to use a foreach () statement in both ways but nothing is working.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -