Is it possible to write javascript that will execute a python script with a pre-set file location in a user's local hard disk ... and then collect the output for processing ?
Something like http://www.jailbrea开发者_运维技巧kme.com//#
No it is not possible. You cannot cause arbitrary programs to be executed on a user's computer without the user installing it, otherwise this would be a grievous security vulnerability.
If you're talking about Javascript run through a browser - no. The browsers will contain javascript execution in a sandbox and won't let it touch non-web related content. Which is GOOD.
No, for good reasons JavaScript does not have access to much of anything on the remote user's computer.
Imagine how insecure the Internet would be if every website you visited could run any random code. (This is why IE's security vulns are so bad.)
To do something like this, you would have to get the user to install a browser plug-in that could have access to the file system. As others have said, normal browser code does not have access to the file system in any way because of serious security issues.
精彩评论