ANN: (Different) Try Python Beta

Discussion in 'Python' started by Devan L, Dec 29, 2005.

  1. Devan L

    Devan L Guest

    I've spent a while putting together a partially working Try Python
    which handles class and function definitions. It also (used to) work
    with imports, but my hacked version of jelly doesn't work with it
    anymore, so only import this works as far as I know. It won't play nice
    if you store the id of an object because the objects are recreated
    every time, but references still work. It also won't let you maintain
    generators or iterators, but you can still put them inside functions to
    use. Printing also adds unnecessary newlines which I haven't fixed yet.
    And no, it doesn't use AJA(X|T), only some javascript to focus the
    input box.

    So here's the link for it:
    < http://www.datamech.com/devan/trypython/trypython.py >

    And if you want to see Mike Meyers' nicer, original one:
    < http://www.mired.org/home/mwm/try_python/ >

    If you want to see the source, send me an email, although you may have
    to gouge your eyes out after reading it.
     
    Devan L, Dec 29, 2005
    #1
    1. Advertising

  2. Devan L

    Steve Holden Guest

    Devan L wrote:
    > I've spent a while putting together a partially working Try Python
    > which handles class and function definitions. It also (used to) work
    > with imports, but my hacked version of jelly doesn't work with it
    > anymore, so only import this works as far as I know. It won't play nice
    > if you store the id of an object because the objects are recreated
    > every time, but references still work. It also won't let you maintain
    > generators or iterators, but you can still put them inside functions to
    > use. Printing also adds unnecessary newlines which I haven't fixed yet.
    > And no, it doesn't use AJA(X|T), only some javascript to focus the
    > input box.
    >
    > So here's the link for it:
    > < http://www.datamech.com/devan/trypython/trypython.py >
    >
    > And if you want to see Mike Meyers' nicer, original one:
    > < http://www.mired.org/home/mwm/try_python/ >
    >
    > If you want to see the source, send me an email, although you may have
    > to gouge your eyes out after reading it.
    >

    At first I thought 'the cgitb TypeError message from "import os" is
    impressively drastic :)'. Then I realised in a later session that
    "import os" only gave an error message after I'd run "import this".
    Thereafter, unfortunately, almost any input - legal or not - appears to
    result in a cgitb trace.

    regards
    Steve

    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC www.holdenweb.com
    PyCon TX 2006 www.python.org/pycon/
     
    Steve Holden, Dec 29, 2005
    #2
    1. Advertising

  3. Devan L

    Devan L Guest

    Steve Holden wrote:
    > Devan L wrote:

    [what I said]
    > At first I thought 'the cgitb TypeError message from "import os" is
    > impressively drastic :)'. Then I realised in a later session that
    > "import os" only gave an error message after I'd run "import this".
    > Thereafter, unfortunately, almost any input - legal or not - appears to
    > result in a cgitb trace.


    Try reloading the page, otherwise it will use the old session id. It
    likes to break one step input after the offending action. It will also
    screw up the state of the session. Incidentally, import this doesn't
    seem to work, either. But importing is broken in general anyways, so I
    wouldn't recommend using it.
     
    Devan L, Dec 29, 2005
    #3
  4. Devan L

    Mike Meyer Guest

    "Devan L" <> writes:
    > I've spent a while putting together a partially working Try Python
    > which handles class and function definitions. It also (used to) work
    > with imports, but my hacked version of jelly doesn't work with it
    > anymore, so only import this works as far as I know. It won't play nice
    > if you store the id of an object because the objects are recreated
    > every time, but references still work. It also won't let you maintain
    > generators or iterators, but you can still put them inside functions to
    > use. Printing also adds unnecessary newlines which I haven't fixed yet.
    > And no, it doesn't use AJA(X|T), only some javascript to focus the
    > input box.
    > So here's the link for it:
    > < http://www.datamech.com/devan/trypython/trypython.py >


    Very cool. I thought about doing the split box like that, but really
    wanted it to feel like you were at a console. That drove a lot of my
    decisions.

    > And if you want to see Mike Meyers' nicer, original one:
    > < http://www.mired.org/home/mwm/try_python/ >


    I've udpate this. The major part is adding the mechanisms that's
    goinng to be used to deal with presenting the walkthrough (more
    Javascript; sorry), plus some links on getting more information about
    Python, or getting it to play with on your own. I hope to start on the
    tutorial portion of the thing this weekend.

    <mike
    --
    Mike Meyer <> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
     
    Mike Meyer, Dec 29, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bienwell
    Replies:
    4
    Views:
    3,869
    bienwell
    May 27, 2005
  2. Eugene Toporov
    Replies:
    0
    Views:
    756
    Eugene Toporov
    Jul 15, 2004
  3. David Dorward
    Replies:
    0
    Views:
    577
    David Dorward
    Jul 12, 2005
  4. Mike Meyer

    ANNOUNCE; Try python beta

    Mike Meyer, Dec 20, 2005, in forum: Python
    Replies:
    20
    Views:
    663
    Mike Meyer
    Dec 21, 2005
  5. John Salerno
    Replies:
    20
    Views:
    867
    John Salerno
    Aug 11, 2006
Loading...

Share This Page