calling different python scripts from a main script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vgkhle
    New Member
    • Sep 2010
    • 3

    calling different python scripts from a main script

    hi all
    How can diff python scripts be called from a main script which is again a .py? os.system("pyth on external_script .py") works fine, but what if I want to handle the un handled exceptions of the external scripts in the main script??

    thanx in advance
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Why not import the other python files?

    Comment

    • dwblas
      Recognized Expert Contributor
      • May 2008
      • 626

      #3
      Try subprocess or pexpect.

      Comment

      Working...