Welcome, Riccardo. A masterful script. You are talking to a group that
generally doesn't use Python, probably, ... at least, not me, but...
Q: When you say "downloaded" do you mean "uploaded" (as "to the server")?
What kind of file are we talking about?
First thing I would say is to use JmolData.jar, not Jmol.jar, on a server.
Many servers do not have graphics adapters available, and Jmol requires
that. So that can crash on a server. JmolData does not. Everything will be
faster with JmolData.jar.
Q: Is the context that there is no Jmol applet, either HTML5 or Java, on
the browser page? Is that why you want to use the server-side processing?
Because otherwise you could just have Jmol on the page itself create the
IDTF file and then post it to your server. That really should work. It's a
simple command: ("jmol" here is the name I used in Jmol.getApplet())
Jmol.script(jmol, "write test.idtf")
That should do it. If you want it to go to the server, that's maybe a bit
more difficult. I would have to look. I do see that the HTML5 version of
Jmol is not putting out IDTF files. Not sure why that is. But the Java
version works. I probably never tested it.
If you are running Jmol.jar or JmolData.jar, there are no file directory
issues. Other than that you need to provide all your own protections, of
course. Don't just send any old script to JmolData.jar. Although it can't
delete files, it can overwrite them. Note that there are -r and -R flags
for that:
-R,--restricted restrict local file access
-r,--restrictSpt restrict local file access (allow reading of
SPT files)
(-w action is exempted from these restrictions)
[just a note - we have a rather low threshold for message size - always do
like I'm doing here and delete the quoted part of the response that
duplicates the message sent.]
Bob
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users