0

I'm using MS Access on a Windows 7 PC as the front end of a MySQL database back end that is stored on a SUSE Linux Enterprise server. Python is installed on the Linux server. The python script I want to call is also located on the Linux server.

Is there a way to call a method (with arguments) in my Python script using VBA in Microsoft Access on the Windows 7 PC?

If there is a way, please provide sample code.

The Python method is called runAll(processID, filename), and the Python document is called GenerateXML.Py.

1
  • @Keltari I honestly haven't tried anything yet (because I do not know anything that would work). I have no experience running python scripts outside of the python command line itself or using the VBA Shell command. I wrote a python program that needs arguments provided by the Access database, but needs to run on the Linux server.
    – pheidlauf
    Aug 18, 2014 at 19:39

1 Answer 1

1

I guess one of the easiest ways to do this would be installing a SSH client on Windows and then using a SSH connection to trigger the script on the Linux side.

The command to call on the Windows side could be as easy as something like this:

ssh.exe user@hostname /path/to/the/script

Note that your ssh client will need some way to directly authenticate without user interaction, e.g. through a private/public pair of keys.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .