Making a Python usage button

Hi folks,

Confession, I have never done any scripting EVER although I'm reasonably familiar with Opus (been using it since the Amiga days). I've just found a little gadget to build that will send rom files to a device, the guy who designed it wrote a python script to send to the device so rather than type this out I wanted to make a button for it..

Here's the command line for the script. send-rom --hirom

I just want to highlight the rom and press the button, easy enough for most things but I have no clue how Python works. I can run Python 3.3 on my Win 7 PC but then its a command line and I'm lost. I did get a UI version that allowed me to browse to the script but that is something else.

Any help would be appreciated, give me a windows based program that can do stuff and I can make a button in a few secs in most cases but Python just confuses theis old brain..


That command line doesn't specify the file to send to the device. Is part of it missing?

Hi Leo, thanks for looking at this.

Oops, the original was meant to look like this send-rom --hirom <file> <------- edit the forum software is deleting the word file inside greater and less than brackets at the end of the py line(I presume it thinks its a command on here

The file part can be any rom file from any dir using the old {filepath} command...

I've fixed the command. All clear now.

(See Formatting tips specific to the Opus forum for how to use things like angle brackets.)

Try this:

"C:\Full\Path\To\" send-rom --hirom {filepath$}

Hi Leo,

So python scripts will run without running it through Python?

I just assumed it had to be running :slight_smile:

I also just noticed that if I made the Python exe the default opening program it would work that way.

Yep, just sending it to the Python exe and tacking on the command line and then the rom filepath should work. Can't test it as the controller board it sends to has not arrived as yet..

But if I get stuck I'll get back to you..

Oh and nice discount on the advanced FTP and USB export, not seen what either does but at the price I had nothing to lose after the discount code :slight_smile:

1 Like

That depends how Python is installed. I'm not an expert on that.

Thanks again Leo, you are an expert on many other things so its all appreciated..


1 Like