Пример #1
0
        public PyVariable NewInstance(PyVariableFlags flags = PyVariableFlags.Object, List <object> arguments = null)
        {
            PyVariable instance = PyVariableManager.NewVariable(flags: flags);

            instance.CallAssign(new PythonFunction(this.ClassName), arguments);
            return(instance);
        }
Пример #2
0
 /// <summary>
 /// Creates a new threading.Thread
 /// </summary>
 /// <param name="threadFuncName">The name of the function</param>
 public PyThread(string threadFuncName)
 {
     instance.CallAssign(
         new PythonFunction("threading", "Thread"),
         new List <object> {
         null, threadFuncName
     }, EscapeFlags.None
         );
 }
Пример #3
0
 /// <summary>
 /// Creates a new threading.Thread
 /// </summary>
 /// <param name="threadFuncName">The name of the function</param>
 public PyThread(string threadFuncName)
 {
     Instance.CallAssign(
         new PythonFunction("threading", "Thread"),
         new List <object> {
         null, threadFuncName
     }
         );
 }
Пример #4
0
        public PyVariable NewInstance(List <object> arguments = null)
        {
            PyVariable instance = PyVariableManager.Get.NewVariable();

            List <object> args = new List <object>()
            {
                "self.bridge"
            };

            if (arguments != null)
            {
                args.AddRange(arguments);
            }

            return(instance.CallAssign(PyFunction.ClassFunction(this.ClassName), args));
        }