Home > Software design >  python command prompt in ptp
python command prompt in ptp

Time:05-21

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.

CodePudding user response:

just do this:

$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   ">");
}


$(main).repore([^/s].$lang("Python").a1;)

CodePudding user response:

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);
} 
  • Related