Dear Ryo,os.system("pyferret -script ferret.jnl") happened to work.I'm sure there are ways to directly call Ferret's functionalities from within python without going through a ferret script (ferret.jnl).Yeah, certainly there are. I was curious whether it's doable or not, because the terminal can be accessed through python and hence any code that runs on the terminal, could be executed from python itself.There seemed to be an issue as I had installed pyferret using conda environment.It's good to know that it's possible.regards,Ranjan
Dear Ranjan,On Mon, Oct 17, 2022 at 4:44 PM Ranjan Kumar Sahu <ranzan998@xxxxxxxxx> wrote:dear ferrters,So, I am using python. There is a ferret.jnl script that needs to be run inside a python script.you may ask, why? The answer is, file handing(i.e, data variables and attributes ) is quite good in ferret, while python has its own upsides.If there is any such way to do that, I would be glad to hear about it.I'm sure there are a lot of more knowledgeable people about python than me, but . . .First of all, I'll assume you can run your ferret script, ferret.jnl, on the terminal (command line) aspyferret -script ferret.jnlThen, from within your python program, you do the same:os.system("pyferret -script ferret.jnl")orimport subprocesssubprocess.run(["pyferret", "-script", "ferret.jnl"])SeeI'm sure there are ways to directly call Ferret's functionalities from within python without going through a ferret script (ferret.jnl).Best regards,Ryo