Author Topic: Run/Execute a Python Script  (Read 89 times)

fistfullofbeer

  • Junior Community Member
  • Posts: 5
  • Hero Points: 0
Run/Execute a Python Script
« on: November 29, 2019, 06:03:19 am »
I am a user with an active subscription of SlickEdit Standard. I am interested in something very straightforward like just executing the script from inside SlickEdit standard and seeing the output in the output window. Something similar to what I can get out of Sublime Text.

I know that SlickEdit Pro has built in functionality for debugging python scripts but I was wondering if something simple like what I need above can be done in SlickEdit Standard. If someone can point me to documentation or a different post that has such information that would be great.

Also, apologies if this post is in the wrong section.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4964
  • Hero Points: 409
Re: Run/Execute a Python Script
« Reply #1 on: November 29, 2019, 08:17:30 pm »
This is the right forum.

The Standard edition doesn't support build features like execute while capturing the output from the build menu. However, here's a way to execute an external program:

Type this on the SlickEdit command line:

dos -w python myprogram.py

The -w option waits for a keypress and assumes your are running an application that requires a TTY.

In the Standard edition you can customize the toolbar and add a button which executes "dos -w python %f". However, it won't be very smart because it won't disable when a different file source type is active. The Pro version has single file projects which are better suited for this.