Is it possible to run python command from within eclipse(Pydev)?
I want to create a procedure which will create database. Currently I create database by writing the command in command prompt, But I want the same from my code within eclipse.
Something like:
def createDatabase()
开发者_StackOverflowcreatedb -U myUser -T template0
Try popen2 module. It allows you to spawn processes. Then you can call your function from PyDev console
You can also execute a program from Run>External Tools>External Tools Configurations. Once you set it up, you can re-run it from the toolbar.
精彩评论