Accessing Local File
I'm not sure if this is remotely possible, but I have a situation where I want my java applet to execute a local file (python program) on my specific machine. The reason behind this being that I have a specific piece of hardware that I don't expect the user to have and want to try and give them the privilege of accessing its gathered data via the applet. Is this possible?
I'm not sure where all the parts for this are located.
There is a server with your html and applet.
On your computer there is a python program
And on the client's computer there is a browser that will load the html with the applet from the server and then access your computer to execute the program???
What server or software do you run on your computer that would allow a connection to be made to it?
Why not have the server on your computer? The client could connect to it load the applet and the applet could submit a request to that server and ask it to execute your program.
Or if not, could you explain what you want to do
What you mention about sending a request to execute the python program is what I want to do. The only thing I'm unsure of is that this python program relies on a USB connection with my particular computer, so would the client sending a request to the server try to access my USB connection or the client's?
I still don't understand the configuration for your project.
Where are all the parts for this project located?
I mentioned 3 different locations.
Where would the code for each part of the project execute?
Can you step thru what you want to happen starting with the client opening a browser and entering a URL.
I have an HTML file, a Java Applet, and a data text file all located on the server (network drive) and I have a python program located on my local hard drive. I would like the client to be able to , either on a button click or after an automatic timer, be able to update the data in the text file by running the python program which writes to this file. The Applet would then reread from the file and update its own contents (best way i could figure out to interface between python and java applet). The python program itself needs to access my own USB connection and not the client's because of a specific piece of hardware that I have connected to my computer.
Sorry for the confusion
I have an HTML file, a Java Applet, and a data text file all located on the server (network drive) and I have a python program located on my local hard drive.
Is the server an HTTP server with a URL that the client uses?
I would like the client to be able to be able to update the data in the text file(where is this file located)
by running the python program (on your computer) which writes to this file (on your computer).
How does the client's computer connect to your computer to execute the python program on your computer???
The Applet would then reread from the file (where is the file) and update its own contents.
How does the applet get to the file on your computer?
The python program itself needs to access my own USB connection. No problem the USB and python program are on the same computer
The server is an HTTP server with a URL. The text file is located on the server with the applet and not on the computer (the java applet accesses it as a URL on the server and not as a local text file). The part about the python program is my original question and may not be possible
That's probably right. Your computer would need to run a server of some kind that would allow the real server to connect to. The server on your computer would run the python program and return the results to the calling real server.
may not be possible
That real server would write the results in a local file and could return that file to the applet when the applet requested it.