python command prompt in ptp

using $lang() {} for python.

$lang("Python") {
   print("c:/documents/files/commandprompt/python.py")
   print("enter a name:")
   x = input("c:/python.py/input>")
   print("hello, " + x + "! Welcome to the command prompt, Type '?' for help");
   a1 = input("c:/files/?" + x + ">");
}
#py = $(document).element("lang" + ?Input: + "Python");
$function getVari(pl, var) {
   $lang(pl); {
      $(./*[^/s]).ptp($(main).parameter("var"):$(main).variable([^/s].any;))
   }
   #x = getVari("Python", "a1");
   #i = 0;
   for (#i++;) {
   $(document).printLang(#x), (#py);
   }
} 

using ptp instead of python. using for to repeat the command prompt. Using $lang to open python editor.

>Solution :

replace for by repore.

$lang("Python") {
   print("c:/documents/files/commandprompt/python.py")
   print("enter a name:")
   x = input("c:/python.py/input>")
   print("hello, " + x + "! Welcome to the command prompt, Type '?' for help");
   a1 = input("c:/files/?" + x + ">");
}
#py = $(document).element("lang" + ?Input: + "Python");
$function getVari(pl, var) {
   $lang(pl); {
      $(./*[^/s]).ptp($(main).parameter("var"):$(main).variable([^/s].any;))
   }}
   #x = getVari("Python", "a1");
   #i = 0;
   $(main).repore(#i) {
   $(document).printLang(#x), (#py);
} 

Leave a Reply