FAQ
pyjamas - the stand-alone python-to-javascript compiler, and separate
GUI Widget Toolkit, has its 0.7 release, today. this has been much
delayed, in order to allow the community plenty of time between the
0.7pre2 release and the final release, to review and test all the
examples.

pyjamas allows developers to create applications that will run either
in any modern web browser (with no plugins required) or as a
stand-alone cross-platform desktop application (like PyQT4 or PyGTK2),
WITHOUT requiring modifications to the original python source. this
concept is singularly unique in the free software python world, but is
conceptually similar to Adobe AIR and Silverlight - without the
massive plugins required.

there has been significant improvements, features and libraries added
in between 0.6 and 0.7: please see the README in the distribution for
details. for fits and giggles, to show what's possible in only 400
lines of python, here is a game of asteroids, written by joe rumsey.
yes, it runs under pyjamas-desktop too.

http://pyjs.org/examples/asteroids/public/Space.html

For more information, see:

http://pyjs.org
http://pyjs.org/FAQ.html
http://pyjs.org/features.html

http://groups.google.com/group/pyjamas-dev

downloads:

http://pypi.python.org/pypi/Pyjamas
http://code.google.com/p/pyjamas
http://sf.net/projects/pyjamas

known major bugs: http://code.google.com/p/pyjamas/issues
#391 (google chrome beta)
#384 (text selection on opera 10.51)

contributions and investigations by community members to fix these and
other issues welcomed and encouraged.

Search Discussions

  • Daniel Fetchinson at Apr 25, 2010 at 6:07 pm

    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs under pyjamas-desktop too.

    http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.

    Cheers,
    Daniel


    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
  • Terry Reedy at Apr 25, 2010 at 7:43 pm

    On 4/25/2010 2:07 PM, Daniel Fetchinson wrote:
    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs under pyjamas-desktop too.

    http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    Ditto with ff 3.6.3 on WinXP (no adblock).
  • Terry Reedy at Apr 25, 2010 at 7:48 pm

    On 4/25/2010 3:43 PM, Terry Reedy wrote:
    On 4/25/2010 2:07 PM, Daniel Fetchinson wrote:
    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs under pyjamas-desktop too.

    http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    Ditto with ff 3.6.3 on WinXP (no adblock).
    and IE8 on winxp. It does read the page because it does get the page title.
  • Alf P. Steinbach at Apr 25, 2010 at 7:59 pm
    * Luke Kenneth Casson Leighton:
    <result>
    An error has been encountered in accessing this page.

    1. Server: pyjs.org
    2. URL path: /examples/asteroids/public/examples/asteroids/public/bootstrap.js
    3. Error notes: NONE
    4. Error type: 404
    5. Request method: GET
    6. Request query string: NONE
    7. Time: 2010-04-25 19:55:16 UTC (1272225316)

    Reporting this problem: The problem you have encountered is with a project web
    site hosted by SourceForge.net. This issue should be reported to the
    SourceForge.net-hosted project (not to SourceForge.net).

    If this is a severe or recurring/persistent problem, please do one of the
    following, and provide the error text (numbered 1 through 7, above):

    1. Contact the project via their designated support resources.
    2. Contact the project administrators of this project via email (see the
    upper right-hand corner of the Project Summary page for their usernames) at
    user-name at users.sourceforge.net

    If you are a maintainer of this web content, please refer to the Site
    Documentation regarding web services for further assistance.

    NOTE: As of 2008-10-23 directory index display has been disabled by default.
    This option may be re-enabled by the project by placing a file with the name
    ".htaccess" with this line:

    Options +Indexes
    </result>


    Cheers & hth.,

    - Alf
  • Patrick Maupin at Apr 25, 2010 at 8:38 pm

    On Apr 25, 8:49?am, Luke Kenneth Casson Leighton wrote:
    pyjamas - the stand-alone python-to-javascript compiler, and separate
    GUI Widget Toolkit, has its 0.7 release, today. ?this has been much
    delayed, in order to allow the community plenty of time between the
    0.7pre2 release and the final release, to review and test all the
    examples.
    I know I'm a Luddite, but what I'd really love to see to go with this
    is an easy way for the application, the browser, and the user to all
    agree that this particular application can read and write arbitrary
    files in a particular local directory.

    A Python program you don't have to install, that executes really fast
    on one of the newer JavaScript JIT engines, with its own purely local
    data in files in a simple text format in a directory specified by the
    user, instead of being all tangled up in a database with data from a
    lot of different applications and buried deep in some multi-gigabyte
    browser cache directory -- now that would be a platform worth
    targeting.
  • Lkcl at Apr 26, 2010 at 1:44 pm

    On Apr 25, 8:38?pm, Patrick Maupin wrote:
    On Apr 25, 8:49?am, Luke Kenneth Casson Leighton wrote:

    pyjamas- the stand-alone python-to-javascript compiler, and separate
    GUI Widget Toolkit, has its 0.7 release, today. ?this has been much
    delayed, in order to allow the community plenty of time between the
    0.7pre2 release and the final release, to review and test all the
    examples.
    I know I'm a Luddite, but what I'd really love to see to go with this
    is an easy way for the application, the browser, and the user to all
    agree that this particular application can read and write arbitrary
    files in a particular local directory.
    you'll have to be a bit clearer about what you mean, because it's
    probably perfectly possible with one of the pyjamas-desktop ports, but
    that would leave the browsers "out in the cold", thus defeating the
    purpose of pyjamas being cross-platform, cross-browser, cross-desktop
    and cross-widget-set.
    A Python program you don't have to install, that executes really fast
    on one of the newer JavaScript JIT engines, with its own purely local
    data in files in a simple text format in a directory specified by the
    user,
    the purpose of browsers is to isolate the application, restrict its
    access to the rest of the desktop and OS, so that random applications
    cannot go digging around on your private data.

    many browsers _used_ to allow access to local files etc. but ...
    yeah.

    so i think you will be able to do what you describe _if_ you provide
    a browser plugin which adds the required functionality.

    google gears would be a good place to start (i've part-ported GWT
    Gears to pyjamas - the SQL storage modules - to demonstrate what's
    needed).

    if however you completely ignore browsers from the equation, by
    virtue of having to piss about writing c code, then yes, you can use
    pyjamas-desktop. at that point, you have _full_ access to the entire
    OS and system, because you're firing up the web browser engine as a
    python application.

    i've done something like this with pyjdwm - http://sf.net/projects/pyjdwm

    l.
  • Patrick Maupin at Apr 26, 2010 at 6:52 pm

    On Apr 26, 8:44?am, lkcl wrote:

    ?the purpose of browsers is to isolate the application, restrict its
    access to the rest of the desktop and OS, so that random applications
    cannot go digging around on your private data.
    Well, I would agree that a "requirement" for the browser is to help
    insure the user's safety, but would argue that the *purpose* is
    somewhat more functional than that :-)
    ?many browsers _used_ to allow access to local files etc. but ...
    yeah.
    I know. But, with most browsers, you can say "yes, I know I'm
    downloading this Java program. I know it can have its way with my hard
    drive. Trust me; I know what I'm doing here." Same thing with Adobe
    or Microsoft stuff: silverlight, AIR, flash, PDFs. Basically, the
    browser delegates ALL security control at that point. I just think it
    would be nice if the browser could delegate a _little_ security
    control to the user ("allow this JavaScript program to read/write
    arbitrary files in this directory"; possibly with a total file size
    limitation) for programs that can run inside the browser.
    ?so i think you will be able to do what you describe _if_ you provide
    a browser plugin which adds the required functionality.
    Agreed. Alternatively, of course, you could have code to let the user
    "download" to a local file from the application's local storage area
    for backup purposes, but that seems suboptimal.
    ?google gears would be a good place to start (i've part-ported GWT
    Gears to pyjamas - the SQL storage modules - to demonstrate what's
    needed).
    I think even gears assumes a database under the browser's control; not
    an arbitrary node in the filesystem. Also, I think gears is no longer
    being developed. Of course, gears could be OK as a starting point,
    but really what you are saying is that everybody wanting to use this
    new file local storage feature would need an add-on. I agree that's
    probable, but in that case it's only really worth doing if a lot of
    projects would use it. I'm not sure if that will come to pass or not
    -- it would need a lot of programmers to think that it was a great
    thing.

    OTOH, if a particular browser supported this functionality natively,
    then it might be a competitive advantage if applications did develop
    to support it.
    ?if however you completely ignore browsers from the equation, by
    virtue of having to piss about writing c code, then yes, you can use
    pyjamas-desktop. ?at that point, you have _full_ access to the entire
    OS and system, because you're firing up the web browser engine as a
    python application.
    That's understood (and a great thing). But if programmers could use
    pyjamas in the browser without an extra download to get to all the
    desktop features (which is how it *appears* to most users when they
    use flash or something like that), that would be a great win.
    Alternatively, a single small download of a broswer add-on package to
    bring pyjamas desktop features into the browser (maybe even just for
    mozilla for now) would be awesome, as well.

    Regards,
    Pat
  • Lkcl at Apr 26, 2010 at 9:12 pm

    On Apr 26, 6:52?pm, Patrick Maupin wrote:
    On Apr 26, 8:44?am, lkcl wrote:

    ?the purpose of browsers is to isolate the application, restrict its
    access to the rest of the desktop and OS, so that random applications
    cannot go digging around on your private data.
    Well, I would agree that a "requirement" for the browser is to help
    insure the user's safety, but would argue that the *purpose* is
    somewhat more functional than that :-)
    we knowwwww :)
    ?many browsers _used_ to allow access to local files etc. but ...
    yeah.
    I know. ?But, with most browsers, you can say "yes, I know I'm
    downloading this Java program.
    ... which requires a java plugin
    I know it can have its way with my hard
    drive. ?Trust me; I know what I'm doing here." ?Same thing with Adobe
    or Microsoft stuff: ?silverlight, plugin
    AIR,
    aka webkit (modified) plus plugins
    flash, plugin
    PDFs.
    often done as a plugin (e.g. mozplugger for firefox)
    ?Basically, the
    browser delegates ALL security control at that point. ?I just think it
    would be nice if the browser could delegate a _little_ security
    control to the user ("allow this JavaScript program to read/write
    arbitrary files in this directory"; possibly with a total file size
    limitation) for programs that can run inside the browser.
    on IE, this is already possible - without needing plugins. "active
    scripting". however, it requires security settings that people simply
    aren't equipped to correctly modify.

    ?so i think you will be able to do what you describe _if_ you provide
    a browser plugin which adds the required functionality.
    Agreed. ?Alternatively, of course, you could have code to let the user
    "download" to a local file from the application's local storage area
    for backup purposes, but that seems suboptimal.
    ?google gears would be a good place to start (i've part-ported GWT
    Gears topyjamas- the SQL storage modules - to demonstrate what's
    needed).
    I think even gears assumes a database under the browser's control; not
    an arbitrary node in the filesystem. ?Also, I think gears is no longer
    being developed. ?Of course, gears could be OK as a starting point,
    but really what you are saying is that everybody wanting to use this
    new file local storage feature would need an add-on. ?I agree that's
    probable, but in that case it's only really worth doing if a lot of
    projects would use it.
    preeeciselyyy. which is why nobody does it.

    and, given that you can use AJAX (e.g. JSONRPC) to communicate with a
    server-side component, installed on 127.0.0.1 and effectively do the
    exact same thing, nobody bothers.

    the JSONRPC stuff is pretty trivial (if annoying by the fact that
    it's asynchronous function calls, client-side) - and there are half a
    dozen server-side implementations. the ones we recommend people use
    with pyjamas are actually damn good: decorators turn an "ordinary"
    function into a JSONRPC service with a single import and a single line
    of code (decorator) per function. that's _it_. the actual
    implementation, aside from "apt-get install simplejson" is about
    _thirty_ lines of code (incredibly) for joining up JSONRPC to django
    or web2py etc. etc.

    it's so small an amount of code that the django developers are
    refusing to include it in the standard distribution, because it
    doesn't look scarily complicated enough, doesn't make programming with
    JSONRPC difficult enough for them, and generally makes life "too
    easy". i love it when programmers get scared by code that appears to
    be "too easy" and "not stressful enough to be acceptable", because
    then they stay away from me, thank goodness.

    but - yeah: JSONRPC's definitely your most sensible pragmatic
    option. server-side you can then do absolutely anything. if you use
    pyjs, you then have the advantage that the application will still work
    as pure python under pyjd _even_ though it uses HTTPRequest, because i
    made damn sure that the XmlHTTPRequest objects which you _expect_ to
    use "javascript-only" _still_ work even under the three ports
    (pywebkitgtk, xulrunner and MSHTML). (that was fun-and-games and
    there's still massive repercussions with the fucking crack-heads from
    the webkit team over the access to XmlHTTPRequest from glib/gobject...
    just don't ask for details... )

    ?if however you completely ignore browsers from the equation, by
    virtue of having to piss about writing c code, then yes, you can use
    pyjamas-desktop. ?at that point, you have _full_ access to the entire
    OS and system, because you're firing up the web browser engine as a
    python application.
    That's understood (and a great thing). ?But if programmers could usepyjamas in the browser without an extra download to get to all the
    desktop features (which is how it *appears* to most users when they
    use flash or something like that),
    no - it's not going to happen: it's _required_ to install the flash
    plugin.
    that would be a great win.
    yes. if you can "tolerate" the plugin download, firefox does
    actually have python-in-its-entirety as a plugin (a whopping 10mb
    one). it includes xpcom apparently so that you can not only do <
    script language="python" /> ... but also you can access the full
    browser DOM features just like you can from javascript. i haven't
    investigated this yet because it's easier to do pyjd.

    then there's also iron-python inside silverlight / moonlight.

    then there's also... darn it, what's it called... someone made it
    easy to do python and ruby ahhh yes appcelerator. they _claim_ you
    only need a 150k download but actually you need the entire
    silverlight / moonlight plugin _first_...

    Alternatively, a single small download of a broswer add-on package to
    bring pyjamas desktop features into the browser (maybe even just for
    mozilla for now) would be awesome, as well.
    on debian/testing: "apt-get install hulahop python-xpcom" - actually
    you just do "apt-get install pyjamas-desktop" because hulahop, python-
    xpcom are dependencies and xulrunner is a sub-dependency.

    on win32: it's an additional 350k install: python "comtypes". that's
    _it_ - that's all - and you're done: everything else is already there
    (MSHTML.DLL is the key but you need the MSXML dll as well, but, duhh,
    those come pre-installed with the OS, duhh)

    otherwise, you'd need that whopping 10mb python-inside-a-plugin, and
    i'd need to port pyjd to it. loovely. i look forward to receiving
    sponsorship to do that (probably about 2 weeks work: it's not rocket
    science, now that there's 4 pyjd ports).

    l.
  • Patrick Maupin at Apr 26, 2010 at 11:25 pm

    On Apr 26, 4:12?pm, lkcl wrote:

    ?and, given that you can use AJAX (e.g. JSONRPC) to communicate with a
    server-side component, installed on 127.0.0.1 and effectively do the
    exact same thing, nobody bothers.
    I suppose, but again, that pushes off the security thing. There are a
    lot of obvious ways to make unintended security holes in a 127.0.0.1
    application, so I'm sure there are also a lot of ways that would be
    unobvious to this security non-expert. And, of course, the real
    dealbreaker is, it still requires a separate install.
    That's understood (and a great thing). ?But if programmers could usepyjamas in the browser without an extra download to get to all the
    desktop features (which is how it *appears* to most users when they
    use flash or something like that),
    ?no - it's not going to happen: it's _required_ to install the flash
    plugin.
    Yeah, but *everybody knows* you have to have the flash plugin. It's a
    given. Even if you write an exciting new flash app, probably only
    0.01% of your userbase will need to install flash; everybody else will
    already have it installed.
    Alternatively, a single small download of a broswer add-on package to
    bring pyjamas desktop features into the browser (maybe even just for
    mozilla for now) would be awesome, as well.
    ?on debian/testing: "apt-get install hulahop python-xpcom" - actually
    you just do "apt-get install pyjamas-desktop" because hulahop, python-
    xpcom are dependencies and xulrunner is a sub-dependency.

    ?on win32: it's an additional 350k install: python "comtypes". ?that's
    _it_ - that's all - and you're done: everything else is already there
    (MSHTML.DLL is the key but you need the MSXML dll as well, but, duhh,
    those come pre-installed with the OS, duhh)

    ?otherwise, you'd need that whopping 10mb python-inside-a-plugin, and
    i'd need to port pyjd to it. loovely. ?i look forward to receiving
    sponsorship to do that (probably about 2 weeks work: it's not rocket
    science, now that there's 4 pyjd ports).
    I really appreciate your thoughts and these suggestions. But if you
    could extend "look, here's this awesome asteroids game, and you don't
    have to install anything!" to "look, here's this <arbitrary business
    app> and it stores all its data on your local machine, and you don't
    have to install anything!" that would be effing awesome.

    Next best would be the python-in-a-plugin. I think if someone steps
    up to the plate and supports your development of that, it would make a
    great delivery mechanism for programs.

    Best regards,
    Pat
  • Lkcl at Apr 27, 2010 at 8:04 pm

    On Apr 26, 11:25?pm, Patrick Maupin wrote:
    On Apr 26, 4:12?pm, lkcl wrote:

    ?and, given that you can use AJAX (e.g. JSONRPC) to communicate with a
    server-side component, installed on 127.0.0.1 and effectively do the
    exact same thing, nobody bothers.
    I suppose, but again, that pushes off the security thing. ?There are a
    lot of obvious ways to make unintended security holes in a 127.0.0.1
    application,
    not to an experienced web developer. by starting the browser at a
    URL which can only used once, you can effectively do the same trick
    that X-Server X-Auth "magic cookies" does.
    so I'm sure there are also a lot of ways that would be
    unobvious to this security non-expert. ?And, of course, the real
    dealbreaker is, it still requires a separate install.
    not necessarily. luis pamirez created pygtkweb (a reimplementation
    of gtk widgets, to be compiled to javascript, to run in a web browser)
    and he created it as a stand-alone app that 1) fired off a web browser
    2) ran a small cgi-bin-esque web service 3) served static (pre-
    compiled) pages 4) served AJAX to the compiled app.

    with pyjd, that "step 1" can be bypassed or more specifically step 1
    and 2 can be combined into the _one_ python app (two threads /
    processes); you effectively combine the "start the window with the
    browser engine in it" step with the "start a mini web server" step.

    so it can be done: it's just not "immediately obvious".

    l.
  • Wolfgang Strobl at Apr 25, 2010 at 9:37 pm

    Daniel Fetchinson <fetchinson at googlemail.com>:

    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs under pyjamas-desktop too.

    http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
    3.6.3 with ABP, Chrome 4.1)


    --
    Wir danken f?r die Beachtung aller Sicherheitsbestimmungen
  • Daniel Fetchinson at Apr 26, 2010 at 11:44 am

    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs under pyjamas-desktop too.

    http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
    3.6.3 with ABP, Chrome 4.1)
    Thanks, this link indeed works! And a pretty cool game too!

    Cheers,
    Daniel

    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
  • Lkcl at Apr 26, 2010 at 1:48 pm

    On Apr 25, 9:37?pm, Wolfgang Strobl wrote:
    Daniel Fetchinson <fetchin... at googlemail.com>:
    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs underpyjamas-desktop too.
    ? ?http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
    3.6.3 with ABP, Chrome 4.1)
    yep. apologies. didn't want to play asteroids, wanted to do a
    release. joe has done an updated version (that only works with pyjs
    not pyjd) which has sound. it uses a hidden iframe containing an
    adobe swf plugin, and javascript to communicate with the hidden
    iframe, sending it "commands" to play certain sounds at certain
    volumes. once i work out how to do the same trick in pyjd, it'll get
    added.

    l.
  • Wolfgang Strobl at Apr 28, 2010 at 7:00 am
    lkcl <luke.leighton at googlemail.com>:
    On Apr 25, 9:37?pm, Wolfgang Strobl wrote:
    Daniel Fetchinson <fetchin... at googlemail.com>:
    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs underpyjamas-desktop too.
    ? ?http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
    3.6.3 with ABP, Chrome 4.1)
    yep. apologies. didn't want to play asteroids, wanted to do a
    release.
    Sure. :-) But you made a very prominent reference to it. Btw., both
    http://pyjs.org/ and http://code.google.com/p/pyjamas/ still name 0.6 as
    the current version. Shouldn't that be changed to 0.7?

    Two weeks ago, I played around with the trunk version, looking for an
    working drag&drop example. I didn't find anything, but noticed some
    unfinished code in a dnd subdirectory. Are you aware of the fact that
    many of the examples just don't work and that there is no way of
    telling, other than by trying each one out in turn? I didn't look at
    every example again, but AFAIK, this didn't change with 0.7. (Tried with
    Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).

    There are quite some impressive working examples, but the user
    experience is somewhat lacking and hampered by stumbling over faulting
    examples, IMHO. May I suggest to restrinct some overview page to the
    working examples, only?

    Given my original motivation for looking into it - may I ask whether
    there is a working example for a dnd operation, somewhere? Perhaps I
    just didn't find it in the abundance of example code :-) Thanks for
    helping and for this great project!


    --
    Wir danken f?r die Beachtung aller Sicherheitsbestimmungen
  • Lkcl at Apr 28, 2010 at 8:36 pm

    On Apr 28, 7:00?am, Wolfgang Strobl wrote:
    lkcl <luke.leigh... at googlemail.com>:




    On Apr 25, 9:37?pm, Wolfgang Strobl wrote:
    Daniel Fetchinson <fetchin... at googlemail.com>:
    for fits and giggles, to show what's possible in only 400
    lines of python, here is a game of asteroids, written by joe rumsey.
    yes, it runs underpyjamas-desktop too.
    ? ?http://pyjs.org/examples/asteroids/public/Space.html
    This URL returns a blank page for me on firefox 3.3.5 (linux) with and
    without adblock plus.
    http://pyjs.org/examples/asteroids/output/Space.htmlworks. (Firefox
    3.6.3 with ABP, Chrome 4.1)
    yep. ?apologies. ?didn't want to play asteroids, wanted to do a
    release. ?
    Sure. ?:-) But you made a very prominent reference to it. Btw., bothhttp://pyjs.org/andhttp://code.google.com/p/pyjamas/still name 0.6 as
    the current version. Shouldn't that be changed to 0.7?
    yes. haven't got round to it yet.
    Two weeks ago, I played around with the trunk version, looking for an
    working drag&drop example. I didn't find anything, but noticed some
    unfinished code in a dnd subdirectory. Are you aware of the fact that
    many of the examples just don't work
    no - because i specifically asked people, in the 0.7 pre-releases, to
    report any bugs found on http://code.google.com/p/pyjamas/issues and i
    said that once a certain amount of time had elapsed without receiving
    significant bugreports, i would do a release.
    and that there is no way of
    telling, other than by trying each one out in turn?
    yepp that's correct. across multiple browsers and across multiple
    desktop platforms. nine in total. which is why i asked for community
    input this time.

    for the 0.6 release i spent about a month of my own time and money
    doing the necessary verification, and i decided i wasn't going to
    place the entire burden of testing onto my own shoulders, this time,
    because pyjamas is a _community_ project and is _not_ funded by
    google, PSF, or any other organisation, foundation or company.

    ?I didn't look at
    every example again, but AFAIK, this didn't change with 0.7. (Tried with
    Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
    then please issue bugreports for as many as you feel comfortable
    with / have time for. i _did_ tell people this time that i was
    relying on community input more than for 0.6. thus, the "quality" of
    the release depends on collective input.
    There are quite some impressive working examples, but the user
    experience is somewhat lacking and hampered by stumbling over faulting
    examples, IMHO. May I suggest to restrinct some overview page to the
    working examples, only?
    no, because they're all intended to work. ohh... wait... are you
    referring to some of the django-based ones? no, you can't be, because
    the http://pyjs.org/examples page won't refer you to them.

    Given my original motivation for looking into it - may I ask whether
    there is a working example for a dnd operation, somewhere?
    the person who started the port of gwt-dnd requested that they be
    "left alone" to complete it, but then didn't. the use of java2py.py
    and manual conversion i can do about 1000 lines per day, and people
    i've guided before usually take about 3x longer than me. i don't have
    money to work on even 1 line let alone 1000, so if you'd like to go
    through the code, converting it and the examples, i'm happy to advise
    (on the pyjamas-dev list so that other people can contribute as well
    if they choose).

    it's quite straightforward, and somewhat mind-numbing and detail-
    orientated: the absolute most important thing is _not_ to "get
    creative", but just "trust" the original gwt-dnd code and simply do
    "rote" conversion. java2py.py does 95% of the work: it's interfaces,
    sub-classes and function/operator overloading where things get a
    little hairy. oh, and references to "self", a concept which doesn't
    exist in java (and java2py.py can't help with except in one special
    and obvious case).

    other than that: there _is_ sufficient in there to simply "roll your
    own" drag-and-drop. you have access to mouse events; you can create
    state... it's not hard. but, if you're counting on a _lot_ of dnd
    work, doing the semi-automated conversion of gwt-dnd would be a goood
    idea.

    l.
  • Wolfgang Strobl at Apr 29, 2010 at 6:37 am
    lkcl <luke.leighton at googlemail.com>:
    On Apr 28, 7:00?am, Wolfgang Strobl wrote:

    Two weeks ago, I played around with the trunk version, looking for an
    working drag&drop example. I didn't find anything, but noticed some
    unfinished code in a dnd subdirectory. Are you aware of the fact that
    many of the examples just don't work
    no - because i specifically asked people, in the 0.7 pre-releases, to
    report any bugs found on http://code.google.com/p/pyjamas/issues and i
    said that once a certain amount of time had elapsed without receiving
    significant bugreports, i would do a release.
    Look at it from the point of view of people walking by, trying to decide
    whether they should invest some of their time into digging into yet
    another framework and library.
    and that there is no way of
    telling, other than by trying each one out in turn?
    yepp that's correct. across multiple browsers and across multiple
    desktop platforms. nine in total. which is why i asked for community
    input this time.
    It's hard to come by with valuable input when the baseline - what is
    expected to work under which circumstances is unknown. Don't expect the
    community having as much knowledge about all the relevant topics as you
    have.
    for the 0.6 release i spent about a month of my own time and money
    doing the necessary verification, and i decided i wasn't going to
    place the entire burden of testing onto my own shoulders, this time,
    because pyjamas is a _community_ project and is _not_ funded by
    google, PSF, or any other organisation, foundation or company.
    So please make it simpler for more people to help. Other people have
    other projects, where they invest some of their own time and money in.
    ?I didn't look at
    every example again, but AFAIK, this didn't change with 0.7. (Tried with
    Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
    then please issue bugreports for as many as you feel comfortable
    with / have time for.
    Ok, will do.
    i _did_ tell people this time that i was
    relying on community input more than for 0.6. thus, the "quality" of
    the release depends on collective input.
    There are quite some impressive working examples, but the user
    experience is somewhat lacking and hampered by stumbling over faulting
    examples, IMHO. May I suggest to restrinct some overview page to the
    working examples, only?
    no, because they're all intended to work. ohh... wait... are you
    referring to some of the django-based ones?
    No. Having written a few small django apps myself, I'm certainly aware
    about such dependencies. But are you aware that's there is no simple way
    to tell whether certain apps have environment dependencies like this?
    Avoiding examples depending on django is obvious. What about the
    infohierarchy sample, for example?

    I'm talking about messages like
    lightout TypeError: lightout.RootPanel().,get is no function
    and such. I'll make a list over the weekend.
    no, you can't be, because
    the http://pyjs.org/examples page won't refer you to them.
    Sure.

    Given my original motivation for looking into it - may I ask whether
    there is a working example for a dnd operation, somewhere?
    the person who started the port of gwt-dnd requested that they be
    "left alone" to complete it, but then didn't. the use of java2py.py
    and manual conversion i can do about 1000 lines per day, and people
    i've guided before usually take about 3x longer than me. i don't have
    money to work on even 1 line let alone 1000, so if you'd like to go
    through the code, converting it and the examples, i'm happy to advise
    (on the pyjamas-dev list so that other people can contribute as well
    if they choose).
    Hey, I'm just asking, after looking around for a while and finding none,
    I'm not demanding anything.

    Thanks for the detailed explaination of how to do a conversion, which
    I've deleted here for brevity. I'll give it a try, but it will require
    some reading.


    --
    Wir danken f?r die Beachtung aller Sicherheitsbestimmungen
  • Lkcl at Apr 29, 2010 at 1:04 pm

    On Apr 29, 6:37?am, Wolfgang Strobl wrote:
    Look at it from the point of view of people walking by, trying to decide
    whether they should invest some of their time into digging into yet
    another framework and library.
    yes. _their_ time - not mine. the pyjamas project has always been
    done on the basis that skilled software developers such as myself and
    others ... how-to-say... "invite" other people to benefit from the
    fact that they want to have tools which make _their_ lives easier.

    as we receive absolutely no money of any kind from any sponsor or
    other free software organisation nor from any corporation, there _is_
    no money to spend on doing the "usual" kind of free software project,
    where the developers are paid / funded to deal with issues effectively
    "for free".

    so instead i encourage and invite people to contribute, and some do,
    and some don't: the end-result is the product of everyone's collective
    input.
    and that there is no way of
    telling, other than by trying each one out in turn?
    yepp ?that's correct. ?across multiple browsers and across multiple
    desktop platforms. ?nine in total. ?which is why i asked for community
    input this time.
    It's hard to come by with valuable input when the baseline - what is
    expected to work under which circumstances is unknown. Don't expect the
    community having as much knowledge about all the relevant topics as you
    have.
    at least _some_ input would be good! the knowledge doesn't have to
    be there: just the bugreports saying "there's a problem and here's
    exactly how you reproduce it" would be a start!
    So please make it simpler for more people to help.
    ... how?? there's a bugtracker, wiki, svn repository, over 30
    examples and a developer list. the code really _is_ very very small
    (the UI widget set, with around 75 widgets, minus the license header
    text is only around 4,000 lines _total_, making it very very simple
    and very very easy for people to get used to). suggestions welcome!
    Other people have
    other projects, where they invest some of their own time and money in.
    yes. been there. didn't receive any return on investment. did some
    projects. received about 25% of required money to pay bills. need
    ?15k pa; receiving approximately ?7-8k.
    ?I didn't look at
    every example again, but AFAIK, this didn't change with 0.7. (Tried with
    Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
    then please issue bugreports for as many as you feel comfortable
    with / have time for. ?
    Ok, will do.
    thanks. i fixed the lightout one, don't worry about that.
    no, because they're all intended to work. ?ohh... wait... are you
    referring to some of the django-based ones? ?
    No. Having written a few small django apps myself, I'm certainly aware
    about such dependencies. But are you aware that's there is no simple way
    to tell whether certain apps have environment dependencies like this?
    Avoiding examples depending on django is obvious. ?What about the
    infohierarchy sample, for example?
    that's reading text files using HTTPRequest (just like the Bookreader
    and Slideshow examples), so there's no dependency like that.

    each of the examples, if it has dependencies such as django, it's
    assumed that you know how to install and configure django, and there's
    instructions in the README to set things up.
    I'm talking about messages like
    lightout TypeError: lightout.RootPanel().,get is no function
    and such.
    hooray! thank you! a bugreport! ok, that was a one line fix:

    @@ -85,6 +85,6 @@ class Game(SimplePanel):
    if __name__ == '__main__':
    pyjd.setup("public/lightout.html")
    game = Game(3)
    - RootPanel().get('game').add(game)
    + RootPanel('game').add(game)

    so, don't worry about that one, it's done. small change to the API
    (to support something that someone else needed) had knock-on effects.
    I'll make a list over the weekend.
    thank you. greatly appreciated.
    Given my original motivation for looking into it - may I ask whether
    there is a working example for a dnd operation, somewhere?
    the person who started the port of gwt-dnd requested that they be
    "left alone" to complete it, but then didn't. ?the use of java2py.py
    and manual conversion i can do about 1000 lines per day, and people
    i've guided before usually take about 3x longer than me. ?i don't have
    money to work on even 1 line let alone 1000, so if you'd like to go
    through the code, converting it and the examples, i'm happy to advise
    (on thepyjamas-dev list so that other people can contribute as well
    if they choose).
    Hey, I'm just asking, after looking around for a while and finding none,
    I'm not demanding anything.
    no problem, i understood that you weren't - i was just making it
    clear that i know what's involved.
    Thanks for the detailed explaination of how to do a conversion, which
    I've deleted here for brevity. I'll give it a try, but it will require
    some reading.
    be happy to help - on the pyjamas-dev list. conversion has been
    discussed numerous times, there. i refer people to java2py each time,
    so you could search the archives on that.

    thank you wolfgang.

    l.
  • Wolfgang Strobl at May 2, 2010 at 7:16 am

    lkcl <luke.leighton at googlemail.com>:

    at least _some_ input would be good! the knowledge doesn't have to
    be there: just the bugreports saying "there's a problem and here's
    exactly how you reproduce it" would be a start!
    So please make it simpler for more people to help.
    ... how?? there's a bugtracker, wiki, svn repository, over 30
    examples and a developer list. the code really _is_ very very small
    (the UI widget set, with around 75 widgets, minus the license header
    text is only around 4,000 lines _total_, making it very very simple
    and very very easy for people to get used to). suggestions welcome!
    Well, the bunch of programming languages and APIs I collected over the
    years is large enough already. These days I prefer to stay with python
    and c, spiced with an occasional domain specific language. That's why I
    was attracted by pyjamas, to begin with!. If I'd like to program using
    Eclipse and Java or fool around with JavaScript, I'd do just that. But I
    don't. IMHO, that ist a general problem of translation tools - they
    attract the wrong people, from the point of view a developer who looks
    for people sharing some of the workload. :-)

    So, Luke, I can only answer your question from the point of view of
    somebody who is mostly a potentional consumer of your work, and most
    problably not another developer. If you want to delegate some work you'd
    like not to do yourself (for example because you prefer designing and
    coding to testing and reorganizing and polishing the docs), than you
    have at least to _define_ those pieces and to monitor progress.
    Other people have
    other projects, where they invest some of their own time and money in.
    yes. been there. didn't receive any return on investment. did some
    projects. received about 25% of required money to pay bills. need
    ?15k pa; receiving approximately ?7-8k.
    ?I didn't look at
    every example again, but AFAIK, this didn't change with 0.7. (Tried with
    Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
    then please issue bugreports for as many as you feel comfortable
    with / have time for. ?
    Well, ok. I put my notes in a Google chart, see
    http://spreadsheets.google.com/pub?key
    u5LhqNQyrfCdGpDbTVjZFJwSERzVUFXVlg5bWl2enc

    I had to write a short patch against compile.py (see issue 397) in order
    to make it compile the showcase examples on Windows.

    In addition, I've tried to create Selenium tests for automating the time
    consuming job of checking all those examples, using Selenium IDE in
    Firefox. I was my first experience using this against Ajax apps. The
    results are somewhat mixed. Playing a round of "lightout" was a breeze,
    but so far I hadn't much luck in driving the showcase example(s). I
    didn't try very hard, though, because I ran out of time, as I do now.

    --
    Wir danken f?r die Beachtung aller Sicherheitsbestimmungen
  • Lkcl at May 7, 2010 at 2:06 pm

    On May 2, 7:16?am, Wolfgang Strobl wrote:
    lkcl <luke.leigh... at googlemail.com>:
    at least _some_ input would be good! ?the knowledge doesn't have to
    be there: just the bugreports saying "there's a problem and here's
    exactly how you reproduce it" would be a start!
    So please make it simpler for more people to help.
    ... how?? there's a bugtracker, wiki, svn repository, over 30
    examples and a developer list. ?the code really _is_ very very small
    (the UI widget set, with around 75 widgets, minus the license header
    text is only around 4,000 lines _total_, making it very very simple
    and very very easy for people to get used to). ?suggestions welcome!
    Well, the bunch of programming languages and APIs I collected over the
    years is large enough already. These days I prefer to stay with python
    and c, spiced with an occasional domain specific language. That's why I
    was attracted bypyjamas, to begin with!. ?If I'd like to program using
    Eclipse and Java or fool around with JavaScript, I'd do just that. But I
    don't. ?IMHO, that ist a general problem of translation tools - they
    attract the wrong people, from the point of view a developer who looks
    for people sharing some of the workload. :-)

    So, Luke, I can only answer your question from the point of view of
    somebody who is mostly a potentional consumer of your work, and most
    problably not another developer. If you want to delegate some work you'd
    like not to do yourself (for example because you prefer designing and
    coding to testing and reorganizing and polishing the docs), than you
    have at least to _define_ those pieces and to monitor progress.
    the project's run on a much much simpler basis than that: anyone who
    wants to contribute absolutely anything, ask, and you get svn access -
    simple as that. you get told what the rules are (code that's
    committed to trunk must work, must have a commit message, must be
    "single-purpose", must follow PEP8 mostly and so on - the usual
    obvious stuff).

    that's pretty much it.

    the project really _is_ run on the basis of it being "a useful tool
    for the developers, and if other people benefit from it that's great".

    kees wanted a better interpreter, i granted him svn rights, and in
    about four to five months he absolutely smacked the compiler into
    incredible and amazing shape, including implementing "yield" - fully
    and properly across _all_ browsers so that it passes even the python
    regression tests.

    me, personally, i would be happy with the state the compiler was in,
    back in 0.5, because that limited functionality served _my_ purposes.
    but, for kees, it definitely didn't: he wanted to be able to compile
    http://puremvc.org python code "as-is" and that meant that the
    compiler _had_ to be improved.

    so it's much _much_ simpler than "delegation of tasks". someone
    wants to do something? _great_ - knock yourself out.

    that having been said: we do have a TODO list. unsurprisingly, it's
    in the top level directory, called "TODO" :)

    then please issue bugreports for as many as you feel comfortable
    with / have time for. ?
    Well, ok. I put my notes in a Google chart, see http://spreadsheets.google.com/pub?key
    u5LhqNQyrfCdGpDbTVjZFJwSERzV...

    ouaaaah, absolutely absolutely fantastic, thank you. ok. yep. the
    Controls one, someone provided a patch contributing the 2-axis slider
    and base class, but it was a bit of a mess, and i belieeve it only
    compile(s/d) with --strict. i've made some changes, _thank_ you for
    pointing these errors out, i've recorded them in issues.
    I had to write a short patch against compile.py (see issue 397) in order
    to make it compile the showcase examples on Windows.
    okaay, good stuff.
    In addition, I've tried to create Selenium tests for automating the time
    consuming job of checking all those examples, using Selenium IDE in
    Firefox. I was my first experience using this against Ajax apps. The
    results are somewhat mixed. Playing a round of "lightout" was a breeze,
    but so far I hadn't much luck in driving the showcase example(s). I
    didn't try very hard, though, because I ran out of time, as I do now. ?
    hell, your input has been incredibly valuable, i'm very grateful for
    the time you've put in.

    btw yes i started doing a UITest because yes, it's silly to have to
    do so much manual work. by writing a UITest app the goal is to be
    able to run the tests automated even across pyjd platforms. it'd be
    possible but raather tricky to run selenium under xulrunner/pyjd.

    l.
  • Jean-Michel Pichavant at Apr 26, 2010 at 12:45 pm

    Luke Kenneth Casson Leighton wrote:
    [snip]
    Am I the only one getting this error ?

    easy_install --prefix /home/jeanmichel -m pyjamas
    Searching for pyjamas
    Reading http://pypi.python.org/simple/pyjamas/
    Reading http://pyjs.org
    Best match: pyjamas 0.7
    Downloading
    http://pypi.python.org/packages/source/P/Pyjamas/pyjamas-0.7.tgz#md5�41b60bb3c88051799537852cceefd0
    Processing pyjamas-0.7.tgz
    error: Couldn't find a setup script in
    /tmp/easy_install-y3peDk/pyjamas-0.7.tgz
    [1] 12487 exit 1 easy_install --prefix /home/jeanmichel -m pyjamas
  • Lkcl at Apr 26, 2010 at 1:38 pm

    On Apr 26, 12:45?pm, Jean-Michel Pichavant wrote:
    Luke Kenneth Casson Leighton wrote:
    [snip]
    Am I the only one getting this error ?
    yes, because you're the only one using easy_install. you'll need to
    read and follow the instructions in README and INSTALL.txt

    the installation procedure requires, without fail, that you run
    "python bootstrap.py" which can NOT be added to a standard "setup.py"
    script without causing massive problems.

    it is imperative that the python source which is part of the pyjamas
    core libraries be kept ABSOLUTELY separate from standard http://python.org
    core libraries. implementations of os.py, sys.py, md5.py and many
    more CANNOT be allowed to be part of the "standard" http://python.org
    paths.

    these libraries cannot be treated as "code"

    these libraries cannot be treated as "data".

    the dumb-system called "easy_install" cannot cope with the necessary
    distinction; it does not _have_ a means to treat libraries as
    "critical" but neither "code which gets installed in the standard
    place in the standard way" nor "data". thus we cannot use it.

    thus, you need to read the instructions, and follow them.

    l.
    easy_install --prefix /home/jeanmichel -mpyjamas
    Searching forpyjamas
    Readinghttp://pypi.python.org/simple/pyjamas/
    Readinghttp://pyjs.org
    Best match:pyjamas0.7
    Downloadinghttp://pypi.python.org/packages/source/P/Pyjamas/pyjamas-0.7.tgz#md5=...
    Processingpyjamas-0.7.tgz
    error: Couldn't find a setup script in
    /tmp/easy_install-y3peDk/pyjamas-0.7.tgz
    [1] ? ?12487 exit 1 ? ? easy_install --prefix /home/jeanmichel -mpyjamas

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 25, '10 at 1:49p
activeMay 7, '10 at 2:06p
posts22
users8
websitepython.org

People

Translate

site design / logo © 2022 Grokbase