Forum

Author Topic: determine if script run from console or 'run script' dialog  (Read 1202 times)

w28

  • Newbie
  • *
  • Posts: 11
    • View Profile
Is there a way to programmatically determine (from within a script) if a script is being run from the 'run script' dialog box or from the python console (using the 'run' command)?


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: determine if script run from console or 'run script' dialog
« Reply #1 on: July 01, 2018, 07:13:48 PM »
Hello w28,

Do you mean to make script understand if it's being run from GUI or from the OS command-line in headless mode?
Best regards,
Alexey Pasumansky,
Agisoft LLC