Question

I have a php project I'm working on using PhpStorm. I have a python script which manipulates my css file in a certain way before uploading it to the server (it's irrelevant to the question, but if you're curious, mostly related to language support).

I'd love to be able to run it directly from phpstorm, but I'm unsure how to do it (I'm guessing it's possible but I couldn't find any reference to something of the sort, and I'm kinda new to this IDE). I know I can rewrite the script with php but I'd rather not (I'm still a pythonist at heart).

Anyone had to tackle something of the sort? Thanks in advance!

p.s. I'm running Ubuntu if that matters.

Was it helpful?

Solution

Use File Watcher plugin for that (should be bundled since v7 by default) -- this way such script will be run on each of desired modified files on save automatically.

Alternatively you can use External Tools functionality and invoke it manually when desired.

OTHER TIPS

According to the help page you can run scripts in the "Before launch". IMHO you can configure an external tool to be your python script (change +x to make it executable...).

Alternatively, I think you could install the python plugin (I've never tried it).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top