Python, a minor bug, and some issues (:
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    I'm posting here a PM from Truck, I think my reply could interest others developers, so... :

    Quote:


    First: YAY PYTHON YAY

    Second: My French is horrid. I'm sorry. I could use Finnish but my Finnish is also horrid, and I doubt you speak Finnish (: So I'll have to ask that you put up with my English.

    Third: There's a minor little bug in the interpreter - it doesn't quit (:
    Ram Disk:ipython-0.10> python
    Code:

    Python 2.5.4 (r254:42, Nov 11 2009, 23:31:50)
    [GCC 2.95.3 20050425 (release/emm-zapek-cisc)] on morphos
    Type "help", "copyright", "credits" or "license" for more information.
    >>> quit
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "LIBS:python2.5/site.py", line 248, in __repr__
    return 'Use %s() or %s to exit' % (self.name, eof)
    NameError: free variable 'eof' referenced before assignment in enclosing scope
    >>> exit
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "LIBS:python2.5/site.py", line 248, in __repr__
    return 'Use %s() or %s to exit' % (self.name, eof)
    NameError: free variable 'eof' referenced before assignment in enclosing scope
    >>>


    You can exit the interpreter via, well, in my case, by clicking the MUICON: 'close' gadget. That sends a signal that it understands as 'quit.' I don't know why my control-c, d, e, and f don't work.

    Now, on to my current attempt to get this to work - um, actually: what's the support for python eggs? Can we use easy-install?

    If we can use eggs, I probably can just use the ipython egg, and I'll have ipython. (Which is my favorite interpreter. I love ipython, it just rocks for working with python, and I really, really want to have it on morphos (: )

    If not, my attempts so far have been held up a bit by the fact that there isn't a fcntl import. That makes sense, in a way, because this isn't unix, and chances are it'll need to be something like the BSD bits where it's something in the os module. (this is file locking stuff, from what I'm reading.)

    On the other hand, maybe I've got something entirely wrong in my setup (:

    And should we discuss bugfixes/implementation of python stuff under morphos here, via email, or ... well I can't find it on your wiki, from the frontpage. I dunno why, 'search' produces nothing.



    1) About the 'quit' issue: I've not seen that on r42 release. I'll check this evening.

    2) About the MorphOS port in general: it's a native port, fully adapted to AmigaDOS/AmigaEXEC systems. So forget some *nix stuffs seens everywhere. Scripts have to be ported also to support AmigaOS/MorphOS system.
    For example, to quit the interpretor: close the Shell Window or press [COMMAND-Q] on keyboard.

    3) Python eggs: I've not yet made any tests about that, I've not any time to do it in futur. If you're -really- motivated to help me to increase Python support, let me know by PM.

    4) About ipython: this interpretor is really *nix/win designed, need a native port to support it with my python port. So, same remark as in 3).

    5) About bugfixes/implementations... At the end of Python page on my wiki, I give a link on my bugtracker and also on my email ;-)

    [ Edited by Yomgui on 2009/11/16 13:42 ]
    And now... next project!
  • »16.11.09 - 12:40
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Yomgui
    Posts: 348 from 2004/8/31
    From: Québec - Canada
    @Truck: the 'quit' issue has been entered in bugtracker, bug #23

    Solved now. Be available in next bugfixes release.
    See the bug ticket for the fix (attached file).

    [ Edited by Yomgui on 2009/11/16 19:45 ]
    And now... next project!
  • »16.11.09 - 17:39
    Profile Visit Website
  • Just looking around
    Truck
    Posts: 6 from 2007/8/23
    For the record, I'm going to do my best to help out, but not knowing much about MorphOS internals is going to be ... well, problematic when porting things like ipython which wants to use file locking - using a standard module we just don't have because we don't do locking that way (: so it's probably going to be 'write a wrapper for the fcntl standard thingie' - which may solve some other things like, well, MAYBE easy-install.

    I dunno, I know more Python than I do MorphOS internals as said (:
  • »16.11.09 - 21:24
    Profile