Web-based client code execution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Kern

    #16
    Re: Web-based client code execution

    Paul Watson wrote:
    [color=blue]
    > I have read some about AJAX. Is there an APAX coming for Python?[/color]

    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
    robert.kern@gma il.com

    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter

    Comment

    • Robert Kern

      #17
      Re: Web-based client code execution

      Paul Watson wrote:
      [color=blue]
      > I have read some about AJAX. Is there an APAX coming for Python?[/color]

      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
      robert.kern@gma il.com

      "In the fields of hell where the grass grows high
      Are the graves of dreams allowed to die."
      -- Richard Harter

      Comment

      • Robin Becker

        #18
        Re: Web-based client code execution

        David Wahler wrote:[color=blue]
        > Steve wrote:
        >[color=green]
        >>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[/color]
        >
        >
        > Don't jump to conclusions...
        > http://dwahler.ky/python/
        >
        > If you really, really want Python in a browser, it's certainly
        > possible. :)
        >
        > -- David
        >[/color]
        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

        Comment

        • Robin Becker

          #19
          Re: Web-based client code execution

          David Wahler wrote:[color=blue]
          > Steve wrote:
          >[color=green]
          >>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[/color]
          >
          >
          > Don't jump to conclusions...
          > http://dwahler.ky/python/
          >
          > If you really, really want Python in a browser, it's certainly
          > possible. :)
          >
          > -- David
          >[/color]
          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

          Comment

          • John J. Lee

            #20
            Re: Web-based client code execution

            Paul Watson <pwatson@redlin epy.com> writes:
            [color=blue]
            > 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?[/color]
            [...]

            If you just need to talk on port 80, just go ahead and do that (module
            socket, module httplib, module urllib2, urllib.getproxi es, 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






            Plain old AJAX with Python on server side

            Download json-py for free. json.py is an implementation of a JSON (http://json.org) reader and writer in Python. jsontests.py are unit tests demonstrating the correctness of the implementation.


            http://www.google.co.uk/search?q=aja...on&btnG=Search (um, ignore the 1st result)


            Write Java applets in Python

            The Python runtime on the JVM



            Flash 'local storage'



            Sort-of AJAX-for-Flash stuff




            Flash itself (boo;-)




            XUL and PyXPCOM (Firefox only)






            Firefox future capabilities in this direction (probably most of this
            is relevant)






            John

            Comment

            • John J. Lee

              #21
              Re: Web-based client code execution

              Paul Watson <pwatson@redlin epy.com> writes:
              [color=blue]
              > 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?[/color]
              [...]

              If you just need to talk on port 80, just go ahead and do that (module
              socket, module httplib, module urllib2, urllib.getproxi es, 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






              Plain old AJAX with Python on server side

              Download json-py for free. json.py is an implementation of a JSON (http://json.org) reader and writer in Python. jsontests.py are unit tests demonstrating the correctness of the implementation.


              http://www.google.co.uk/search?q=aja...on&btnG=Search (um, ignore the 1st result)


              Write Java applets in Python

              The Python runtime on the JVM



              Flash 'local storage'



              Sort-of AJAX-for-Flash stuff




              Flash itself (boo;-)




              XUL and PyXPCOM (Firefox only)






              Firefox future capabilities in this direction (probably most of this
              is relevant)






              John

              Comment

              • Paul Watson

                #22
                Re: Web-based client code execution

                Kent Johnson wrote:[color=blue]
                > Stephen Kellett wrote:
                >[color=green]
                >> In message <1132342910.799 932.58720@g44g2 000cwa.googlegr oups.com>,
                >> Steve <steve.morin@gm ail.com> writes
                >>[color=darkred]
                >>> 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.[/color]
                >>
                >>
                >>
                >> 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.[/color]
                >
                >
                > See
                > http://groups.google.com/group/comp....34acee66b40830
                >
                > Kent[/color]

                Please correct my misunderstandin g if I am wrong, but I thought that
                this runs server-side only and requires Microsoft IIS as the httpd
                server. Is that correct?

                Comment

                • Paul Watson

                  #23
                  Re: Web-based client code execution

                  Kent Johnson wrote:[color=blue]
                  > Stephen Kellett wrote:
                  >[color=green]
                  >> In message <1132342910.799 932.58720@g44g2 000cwa.googlegr oups.com>,
                  >> Steve <steve.morin@gm ail.com> writes
                  >>[color=darkred]
                  >>> 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.[/color]
                  >>
                  >>
                  >>
                  >> 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.[/color]
                  >
                  >
                  > See
                  > http://groups.google.com/group/comp....34acee66b40830
                  >
                  > Kent[/color]

                  Please correct my misunderstandin g if I am wrong, but I thought that
                  this runs server-side only and requires Microsoft IIS as the httpd
                  server. Is that correct?

                  Comment

                  • Paul Watson

                    #24
                    Re: Web-based client code execution

                    David Wahler wrote:[color=blue]
                    > Steve wrote:
                    >[color=green]
                    >>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[/color]
                    >
                    >
                    > Don't jump to conclusions...
                    > http://dwahler.ky/python/
                    >
                    > If you really, really want Python in a browser, it's certainly
                    > possible. :)
                    >
                    > -- David[/color]

                    This looks interesting, but looks even more fragile than CrackAJAX.



                    All of this comes down to Javascript which will still not allow me to
                    read local, client files. Right?

                    Comment

                    • Paul Watson

                      #25
                      Re: Web-based client code execution

                      David Wahler wrote:[color=blue]
                      > Steve wrote:
                      >[color=green]
                      >>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[/color]
                      >
                      >
                      > Don't jump to conclusions...
                      > http://dwahler.ky/python/
                      >
                      > If you really, really want Python in a browser, it's certainly
                      > possible. :)
                      >
                      > -- David[/color]

                      This looks interesting, but looks even more fragile than CrackAJAX.



                      All of this comes down to Javascript which will still not allow me to
                      read local, client files. Right?

                      Comment

                      • Kent Johnson

                        #26
                        Re: Web-based client code execution

                        Paul Watson wrote:[color=blue]
                        > Kent Johnson wrote:[color=green]
                        >> Stephen Kellett wrote:[color=darkred]
                        >>> 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.[/color]
                        >>
                        >> See
                        >> http://groups.google.com/group/comp....34acee66b40830[/color]
                        >
                        > Please correct my misunderstandin g if I am wrong, but I thought that
                        > this runs server-side only and requires Microsoft IIS as the httpd
                        > server. Is that correct?[/color]

                        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

                        Comment

                        • Kent Johnson

                          #27
                          Re: Web-based client code execution

                          Paul Watson wrote:[color=blue]
                          > Kent Johnson wrote:[color=green]
                          >> Stephen Kellett wrote:[color=darkred]
                          >>> 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.[/color]
                          >>
                          >> See
                          >> http://groups.google.com/group/comp....34acee66b40830[/color]
                          >
                          > Please correct my misunderstandin g if I am wrong, but I thought that
                          > this runs server-side only and requires Microsoft IIS as the httpd
                          > server. Is that correct?[/color]

                          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

                          Comment

                          • Paul Watson

                            #28
                            Re: Web-based client code execution

                            John J. Lee wrote:[color=blue]
                            > Paul Watson <pwatson@redlin epy.com> writes:
                            >
                            >[color=green]
                            >>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?[/color]
                            >
                            > [...]
                            >
                            > If you just need to talk on port 80, just go ahead and do that (module
                            > socket, module httplib, module urllib2, urllib.getproxi es, 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.ph...ajax_framework
                            >
                            > http://www.aminus.org/blogs/index.ph...ajax_is_in_svn
                            >
                            >
                            > Plain old AJAX with Python on server side
                            >
                            > https://sourceforge.net/projects/json-py/
                            >
                            > http://www.google.co.uk/search?q=aja...on&btnG=Search (um, ignore the 1st result)
                            >
                            >
                            > Write Java applets in Python
                            >
                            > http://www.jython.org/
                            >
                            >
                            > Flash 'local storage'
                            >
                            > http://www.macromedia.com/support/do...lp/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/roadm...s/2005_09.html
                            >
                            >
                            > John[/color]

                            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.

                            Comment

                            • Paul Watson

                              #29
                              Re: Web-based client code execution

                              John J. Lee wrote:[color=blue]
                              > Paul Watson <pwatson@redlin epy.com> writes:
                              >
                              >[color=green]
                              >>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?[/color]
                              >
                              > [...]
                              >
                              > If you just need to talk on port 80, just go ahead and do that (module
                              > socket, module httplib, module urllib2, urllib.getproxi es, 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.ph...ajax_framework
                              >
                              > http://www.aminus.org/blogs/index.ph...ajax_is_in_svn
                              >
                              >
                              > Plain old AJAX with Python on server side
                              >
                              > https://sourceforge.net/projects/json-py/
                              >
                              > http://www.google.co.uk/search?q=aja...on&btnG=Search (um, ignore the 1st result)
                              >
                              >
                              > Write Java applets in Python
                              >
                              > http://www.jython.org/
                              >
                              >
                              > Flash 'local storage'
                              >
                              > http://www.macromedia.com/support/do...lp/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/roadm...s/2005_09.html
                              >
                              >
                              > John[/color]

                              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.

                              Comment

                              • Robin Becker

                                #30
                                Re: Web-based client code execution

                                Paul Watson wrote:
                                .......[color=blue][color=green]
                                >> -- David[/color]
                                >
                                >
                                > This looks interesting, but looks even more fragile than CrackAJAX.
                                >
                                > http://www.aminus.org/blogs/index.ph...ajax_framework
                                >
                                >
                                > All of this comes down to Javascript which will still not allow me to
                                > read local, client files. Right?[/color]

                                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

                                Comment

                                Working...