Skip to main content

Running a python script from inside a plugin



  • Tom Edwards

    Hi Ahsan,

    Apologies for the delay in getting back to you. What you are attempting definitely seems possible, system calls from outside the IDE should work. A very common problem is that the path to the python script gets changed when you package your code into a .jar file.

    Plugins generally get stored in each user's home directory which is in a different location depending on the Operating System:

    Windows: C:\Users\<username>\AppData\Local\Geneious\plugins

    MacOS: (user.home)/Library/Application Support/Geneious/plugins

    Linux: (user.home)/.geneious_plugins

    I'm not quite sure what the file structure of your plugin looks like but you should be able to find it in that folder and investigate. You can rename a .jar file into a .zip file and extract it if you want to investigate the file structure more closely.

    Any further questions, let me know,

  • Ahsan Shawl

    Hello Tom, 

    Would you happen to know what the equivalent of the "GeneiousFiles" folder would be for the deployed version of Geneious. Many of my commands in the plugin rely on that folder but it seems that I can only find that folder in the development version of Geneious when it is launched from the IDE. Let me know if you have any suggestions on finding where the default folder for files generated from the sequence documents. 

  • Neil Bradley

    Hello Ahsan,

    Which operating system are you using? Geneious can use pretty much any system call your application is allowed to make, but MacOS requires extra configuration to use the system Python from within Geneious.

    What is the exact error you are getting - e.g., is it along the lines of `python: command unknown`, or is failing to find the data files?

    How are you invoking the external call? Are you manually making the call via a Process or ProcessBuilder, or using Geneious Prime's `Execution` API?

    If you are packaging for deployment, is this intended to be given to users who may have their own various system setups? Do you have specific OS targets in mind?

    Neil Bradley
    Geneious Prime Developer


Please sign in to leave a comment.