Re: Web-based client code execution
Paul Watson wrote: .. -- David This looks interesting, but looks even more fragile than CrackAJAX. http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework All of this comes down to Javascript which will still not allow me to read local, client files. Right? I think reading files is easy; just get the client browser to submit a form with the file as an upload. Hard part is getting the path(s) right. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Robin Becker wrote: Paul Watson wrote: .. -- David This looks interesting, but looks even more fragile than CrackAJAX. http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework All of this comes down to Javascript which will still not allow me to read local, client files. Right? I think reading files is easy; just get the client browser to submit a form with the file as an upload. Hard part is getting the path(s) right. I need to walk the directory tree to find which files are of interest. It sounds like a client application (not browser) will be required. -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Paul Watson wrote: John J. Lee wrote: [snip..] I appreciate your long list of references. For this task, I think the first answer may have to be the one with which to go. A standard application that talks through port 80 and perhaps can use proxies. My desire to have the code distributed through a web page is just to ensure that the user is running the correct version and has not hacked it in any way. I suppose I can checksum the local client application and compare it with what is on the server. Then, make a way to update... ARGH! If you can run it as a client application (i.e. not through the browser but still across the internet) - then this all seems quite easy to achieve. It also allows you to access the local filesystem without dropping out of Python or using ActiveX objects. If you know the version of Python the machines are using (or create a loader program using py2exe) then you only need dsitribute the 'pyc' bytecode files. (Making it *much* harder to hack for the average user). I don't know if anyone has released an 'auto-update' framework for applications, but it would be a nice project. I guess each time it's needed the requirements will be slightly different though - but there are a lot of general principles. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Paul Watson wrote: My desire to have the code distributed through a web page is just to ensure that the user is running the correct version and has not hacked it in any way. I suppose I can checksum the local client application and compare it with what is on the server. Then, make a way to update... ARGH! I have used Java Web Start to distribute Jython applications from a web page. There are a few glitches getting it set up but then it works well. Solves 'ensure that the user is running the correct version' nicely. Not sure if it protects against hacking. My Jython and Web Start recipe is here: http://personalpages.tds.net/~kent37/Python/JythonWebStart.html Kent -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Stephen Kellett wrote: In message [EMAIL PROTECTED], Steve [EMAIL PROTECTED] writes AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform. ActiveState do a version of Python that can run in a script tag like JavaScript and VBScript. This requires Windows Scripting Host. They also do a similar thing for Perl, not sure about TCL. See http://groups.google.com/group/comp.lang.python/msg/2d34acee66b40830 Kent -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Paul Watson wrote: I have read some about AJAX. Is there an APAX coming for Python? Not until browsers have embedded Python interpreters. There's been talk about doing this in Mozilla, but I don't think the talk has turned into usable code, yet. -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the grass grows high Are the graves of dreams allowed to die. -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
David Wahler wrote: Steve wrote: AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform Don't jump to conclusions... http://dwahler.ky/python/ If you really, really want Python in a browser, it's certainly possible. :) -- David well in firefox 1.07 I seem to be getting Error: unmarshal is not defined Source File: http://dwahler.ky/python/ Line: 133 -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Paul Watson [EMAIL PROTECTED] writes: What are the options? The user to hits a web page, downloads code (Python I hope), execute it, and be able to return the results. It needs to be able to go through standard HTTP so that it could be run from behind a corporate firewall without any other ports being opened. Am I stuck doing an ActiveX control? [...] If you just need to talk on port 80, just go ahead and do that (module socket, module httplib, module urllib2, urllib.getproxies, etc), and write a normal desktop application. If it must run in a browser, here is some food for thought: Compile Python to JavaScript -- very cool http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework http://www.aminus.org/blogs/index.php/phunt/2005/10/09/psst_crackajax_is_in_svn Plain old AJAX with Python on server side https://sourceforge.net/projects/json-py/ http://www.google.co.uk/search?q=ajax+pythonbtnG=Search (um, ignore the 1st result) Write Java applets in Python http://www.jython.org/ Flash 'local storage' http://www.macromedia.com/support/documentation/en/flashplayer/help/help02.html Sort-of AJAX-for-Flash stuff http://www.cs.unc.edu/~parente/tech/tr04.shtml http://www.simonf.com/flap/ Flash itself (boo;-) http://www.macromedia.com/ XUL and PyXPCOM (Firefox only) http://www.xulplanet.com/ http://trac.nunatak.com.au/projects/nufox Firefox future capabilities in this direction (probably most of this is relevant) http://www.mozilla.org/roadmap/gecko-1.9-roadmap.html http://weblogs.mozillazine.org/roadmap/archives/2005_09.html John -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Kent Johnson wrote: Stephen Kellett wrote: In message [EMAIL PROTECTED], Steve [EMAIL PROTECTED] writes AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform. ActiveState do a version of Python that can run in a script tag like JavaScript and VBScript. This requires Windows Scripting Host. They also do a similar thing for Perl, not sure about TCL. See http://groups.google.com/group/comp.lang.python/msg/2d34acee66b40830 Kent Please correct my misunderstanding if I am wrong, but I thought that this runs server-side only and requires Microsoft IIS as the httpd server. Is that correct? -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
David Wahler wrote: Steve wrote: AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform Don't jump to conclusions... http://dwahler.ky/python/ If you really, really want Python in a browser, it's certainly possible. :) -- David This looks interesting, but looks even more fragile than CrackAJAX. http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework All of this comes down to Javascript which will still not allow me to read local, client files. Right? -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Paul Watson wrote: Kent Johnson wrote: Stephen Kellett wrote: ActiveState do a version of Python that can run in a script tag like JavaScript and VBScript. This requires Windows Scripting Host. They also do a similar thing for Perl, not sure about TCL. See http://groups.google.com/group/comp.lang.python/msg/2d34acee66b40830 Please correct my misunderstanding if I am wrong, but I thought that this runs server-side only and requires Microsoft IIS as the httpd server. Is that correct? I haven't tried it but the referenced article seems to be about including Python in a web page to be run in-browser by IE. Kent -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
John J. Lee wrote: Paul Watson [EMAIL PROTECTED] writes: What are the options? The user to hits a web page, downloads code (Python I hope), execute it, and be able to return the results. It needs to be able to go through standard HTTP so that it could be run from behind a corporate firewall without any other ports being opened. Am I stuck doing an ActiveX control? [...] If you just need to talk on port 80, just go ahead and do that (module socket, module httplib, module urllib2, urllib.getproxies, etc), and write a normal desktop application. If it must run in a browser, here is some food for thought: Compile Python to JavaScript -- very cool http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework http://www.aminus.org/blogs/index.php/phunt/2005/10/09/psst_crackajax_is_in_svn Plain old AJAX with Python on server side https://sourceforge.net/projects/json-py/ http://www.google.co.uk/search?q=ajax+pythonbtnG=Search (um, ignore the 1st result) Write Java applets in Python http://www.jython.org/ Flash 'local storage' http://www.macromedia.com/support/documentation/en/flashplayer/help/help02.html Sort-of AJAX-for-Flash stuff http://www.cs.unc.edu/~parente/tech/tr04.shtml http://www.simonf.com/flap/ Flash itself (boo;-) http://www.macromedia.com/ XUL and PyXPCOM (Firefox only) http://www.xulplanet.com/ http://trac.nunatak.com.au/projects/nufox Firefox future capabilities in this direction (probably most of this is relevant) http://www.mozilla.org/roadmap/gecko-1.9-roadmap.html http://weblogs.mozillazine.org/roadmap/archives/2005_09.html John I appreciate your long list of references. For this task, I think the first answer may have to be the one with which to go. A standard application that talks through port 80 and perhaps can use proxies. My desire to have the code distributed through a web page is just to ensure that the user is running the correct version and has not hacked it in any way. I suppose I can checksum the local client application and compare it with what is on the server. Then, make a way to update... ARGH! Even when future browsers embed Python interpreters, the security considerations may be such that no one will want to accept code which can do much locally anyway. Probably the right thing for the public Internet, Makes it harder to develop internal system management tools. -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Steve wrote: AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform Don't jump to conclusions... http://dwahler.ky/python/ If you really, really want Python in a browser, it's certainly possible. :) -- David -- http://mail.python.org/mailman/listinfo/python-list
Web-based client code execution
What are the options? The user to hits a web page, downloads code (Python I hope), execute it, and be able to return the results. It needs to be able to go through standard HTTP so that it could be run from behind a corporate firewall without any other ports being opened. Am I stuck doing an ActiveX control? Yes, I know that downloading code and executing on the client machine is a security risk. This will be for the employee's computers to connect. This will not be a publicly available web page. I have read some about AJAX. Is there an APAX coming for Python? -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform. -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
Steve wrote: AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform. Well, I guess the Grail browser could run Python, but I do not think I can go there. I need READ access to the users local disk storage. Can I do this in Javascript, or should I bite the bullet and turn to ActiveX? -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
You universally won't be able to do that with javascript, only with and extension on firefox. ActiveX will limit you to windows only with ie. Which isn't bad you still get a 80% market share. -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
In message [EMAIL PROTECTED], Steve [EMAIL PROTECTED] writes AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform. ActiveState do a version of Python that can run in a script tag like JavaScript and VBScript. This requires Windows Scripting Host. They also do a similar thing for Perl, not sure about TCL. The syntax is along the lines of SCRIPT language=PythonScript Python goes here /SCRIPT I remember reading this about PerlScript and I'm pretty sure I'm correct in remembering there is a PythonScript. Anyway you are limited to ActiveState and Windows Scripting Host. For pragmatic reasons I think you would be better concentrating on JavaScript for the Client and your language of choice Python/Ruby/Lua/whatever for the server part of AJAX. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting -- http://mail.python.org/mailman/listinfo/python-list
Re: Web-based client code execution
On 11/18/05, Paul Watson [EMAIL PROTECTED] wrote: Steve wrote: AJAX works because browsers can execute javascript. I don't know of a browser that can execute python. Basically your stuck with java or javascript because everything else really isn't cross platform. Well, I guess the Grail browser could run Python, but I do not think I can go there. I need READ access to the users local disk storage. Can I do this in Javascript, or should I bite the bullet and turn to ActiveX? This can only be done with scripts by disabling or bypassing browser security restrictions. It can't even be done by zone in IE, only globally, and I don't know if you can do it at all in Mozilla based browsers. A signed activex control or Java Applet (that registers for the appropriate sandbox permissions) will work. Overall, it's probably simplest not to do any of these and simply write a standard application that you have users download and run. This is the safest and most straightforward solution, and honestly what you save in configuration managment when people call you wondering why it doesn't work is probably worth the extra effort it takes them to actually run your application. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list