1

follow by discussion Get output of python script from within python script

I create online webpage (.html) run other .py script result, but face model not found error

logically seems the python code is fine, might the setting error or other issue I don't come up myself

  • printbob.py
#!/usr/bin/env python

import sys

def main(args):
    for arg in args:
        print(arg)

if __name__ == '__main__':
    main(sys.argv)
  • test_0109_003.html
<html>
    <head>
      <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
      <script defer src="https://pyscript.net/latest/pyscript.js"></script>
    </head>
  <body>
    <b><p>title test 1.10-test_get_ print  </p></b>
    <br>


  
    <py-script>
      import printbob

      printbob.main('arg1 arg2 arg3 arg4'.split(' '))
      
    </py-script>
  </body>
</html>
  • (pic 01) the result website showing enter image description here

  • (pic 02) I put .py and .html script in WinSCP, online host system enter image description here

so how to solve this problem, I locate that there might be the resaon

my winscp ip port is private that public cannot access to private's file, I'm not sure if this the reason, and if so, how to deal with it?

0 Answers0