Tuesday, March 25, 2008

SPE packaged for Mac OS X

Krzysztof Olczyk did a wonderful job by packaging SPE for Mac OS X. You can download it here:
http://olczyk.krzysztof.googlepages.com/SPE.dmg

He commented:
You can install now SPE in your Macintosh in a way you do with native applcation.
Simply mount the DMG and drag the SPE to Applications folder.

Another advantage is, that now SPE will have its own icon in dock, like any application in Mac.

Have fun.

I will release soon SPE 0.8.4.e with some important bug fixes and I hope Krzysztof Olczyk will update the package for the Mac.

Please test the package and let Krystof know how it works.

Thanks Krystof!
Stani

24 comments:

  1. I tried installing the package and the install went fine. When trying to run SPE I got an error that /Library/Frameworks/Python.framework/ Versions/2.5/Resources/Python.app/ Contents/MacOS/Python could not be found.
    (spaces in path added to make the blogger show the entire line)

    I changed the #! at the top of /Applications/SPE/Contents/MacOS/SPE to

    /Applications/SPE/Contents/MacOS/Python

    and all worked fine.

    I am not sure if this change was needed because of a package I am missing or what.

    Conlaoch

    ReplyDelete
  2. Please contact Krzysztof Olczyk directly about it. You can find his email under the section "Contact Me" on this page:
    http://olczyk.krzysztof.googlepages.com/

    ReplyDelete
  3. I've just installed this version. It really looks good, but I have an annoying problem: If I write e.g. math. a call tip appears (well, that's not the problem) and after if disappears my keyboard is dead inside the editor window.

    Is this a known bug?

    ReplyDelete
  4. Hi,

    These are great news. I just installed and worked fine. I do not have any of the two mentioned problems.

    Many thanks to Stani and Krzysztof!

    BTW: I'm using Mac OS X 10.5.2 (Leopard) and installed MacPython, i.e., I'm not using the pre-installed python.

    Ernesto Costa

    ReplyDelete
  5. I successfully dragged the program to the application folder BUT when I tried to launch it, the icon kept bouncing in the dock and then disappeared. I tried different times the same operation but got the same result.

    I have the last version of MacPython and Leopard (10.5.3)

    Thx

    ReplyDelete
  6. Id did:

    vi /Applications/SPE.app/Contents/MacOS/SPE

    and then added "/System" to the beginning of the path the python binary.

    Seems to work (sorry if that is already what the first post said - I could not interpret it)

    ReplyDelete
  7. I am having the same problem as the user above where SPE gives me the App icon briefly then goes away. No error as far as I can tell. I am running Leopard 10.5.3 as well.

    ReplyDelete
  8. Hi, Stani. As with others I had to change the #! to make the package run. I believe that Krzysztof's use of a specific path (#!/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
    ) is not ideal, as it relies on a specific configuration; it might be safer to have
    #!/usr/bin/env python
    instead.

    I am sending this comment to Krzysztof as well.

    If I understand what is supposed to happen I believe there is another glitch in SPE. When I try to "Run Without Argument" the run fails apparently because there is a space in the file path. The file is
    /Users/iayork/Scripts/XPlasMap/XPlasMap v.1.0/XPlasMap.py
    and the error message says
    /Users/iayork/Downloads/SPE.app/Contents/MacOS/Python: '/Users/iayork/Scripts/XPlasMap/XPlasMap' is a directory, cannot continue

    So it seems to be truncating the path at the space.

    I've been following SPE with interest since shortly after you first introduced it and hope these glitches can get sorted out, because I'd like to start using it as my main IDE.

    ReplyDelete
  9. I have a brand new MacBool Pro purchased 2 weeks ago and I had the same issues as listed above. I tried every suggestion above and iayork suggestion was the one that actually worked...Thanks iayork

    ReplyDelete
  10. I changed my shebang to:

    #!/usr/bin/env python

    Thanks Stani!

    ReplyDelete
  11. Hey -- If anyone else has the problem where you've installed the app, but it won't run, try to alter the shebang, as described above (ctrl-click SPE in the applications folder, open Contents, MacOS, then open SPE with textedit or some other editor, change the first line to #!/usr/bin/env python )

    Once you've done that, if it still doesn't load,try opening that same file with terminal (Applications -> utilities-> terminal) and it may give you a message that wxPython is not installed (it did for me) proceed to www.wxpython.org and grab whichever flavor best suits you, then try re-launching SPE. Worked for me, hopefully it can help someone else too.

    Thanks for the help, all.

    ReplyDelete
  12. This is a great app for OS X. Thanks!! I LOVE this editor and my Mac and now can use both w/o running a VM to have the editor in Linux. Thanks much!!!!

    ReplyDelete
  13. Couple quick questions:

    1. How can I run code in SPE IDE for OS X and enter input from the output window? The editor shows my code executing and prompting for input but I cannot type in the field.

    2. Who maintains the OS X port and is there documentation on how the build is done?

    3. Is there a "auto-ident" tool for SPE?

    Thanks again for this GREAT tool!

    ReplyDelete
  14. Buba with spe and wx.In Ubuntu only, in windows work well.Wrong wx version? I do not have time to check out, but if i try 'run/stop' it seems that wx(2.8) have change since 2.6 and gest hung up.I think that is a easy way to fix, gest switch the call to correct wx element, and I think that SPE should be in the same boat with ubuntu's wx version.

    ReplyDelete
  15. Just installed the dmg. Upon opening SPE, it immediately crashes. I see the following error in my Console log: com.apple.launchd[177] ([0x0-0x249249].SPE[22169]) posix_spawnp("/Applications/SPE.app/Contents/MacOS/SPE", ...): No such file or directory

    ReplyDelete
  16. It appears that the MAC version does not work in Snow Leopard. I tried to launch but it fails immediately.

    Any chance you will produce a version for Snow Leopard ?

    thanks,

    JM -- usa

    ReplyDelete
  17. @Jack

    The Mac version is done by Krzysztof Olczyk as written in the post. You better contact him to know if he could be convinced to release one.

    ReplyDelete
  18. I doubt that Snow Leopard has anything to do with it.... All the difficulties installing seem to have to do with where you keep Python.

    Python installations do not seem to be as standard on the Mac and it may have moved between OS versions. (For instance if Snow Leopard runs 2.6 by default, the path will be different. But it would also be different for folks who have upgraded...)

    Do 'which python' in a terminal, to find out where you have it, and change the #! at the start of he file as instructed above.

    ReplyDelete
  19. One thing that is not so great on a Mac, which I guess will also be annoying on Linux: you open non-python files with 'os.startfile', which only exists in Windows. (I don't know why this method is not implemented in Linux or MacOS, it doesn't seem hard, but it is missing).

    So if you have a mixed-use project (Python, SQL, HTML, JavaScript...) the user needs to remember to use the Finder to open some files and SPE to open others.

    Converting this to use the subprocess module calls would make it platform independent (though perhaps more verbose).

    ReplyDelete
  20. If anyone is trying to run SPE in OSX 10.6 and getting an error similar to:

    Spe Error: Please install the right version of wxPython: 2.6.1.0.
    /usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)

    You can fix the error by telling OSX to prefer 32-bit python by entering the following command into the shell:

    defaults write com.apple.versioner.python Prefer-32-Bit -bool yes

    This should allow you to use SPE again with the latest version of wxPython!

    ReplyDelete
  21. how to make a mac app for SPE

    get Platypus from http://www.sveinbjorn.org/platypus

    create a folder called SPE
    create a bash script called spe.sh in the SPE folder


    #!/bin/sh
    cd _spe
    python SPE.py &

    download the _spe folder and move it to the SPE folder

    Open platypus
    Change the icon to the Generic Application Icon
    App Name: SPE
    Script Type: Shell
    Script Path: /spe.sh
    Output: none
    Advanced options
    Author: (c)2003-2008 www.stani.be
    Version:
    Click the "+" icon and and add the _spe folder
    uncheck Remains running after initial execution
    check Runs in background

    Select Profiles: Save Profile
    Click the Create Button

    You should now have a SPE application!

    ReplyDelete
  22. #!/usr/bin/env python

    instead of

    #!/Library/Frameworks/Python.framework/ Versions/2.5/Resources/Python.app/ Contents/MacOS/Python

    on first line of /Applications/SPE.app/Contents/MacOS/SPE

    worked beautifully.

    ReplyDelete
  23. Superb application, works great.
    Just want to note though that I still had the "bouncing and not launching' issue and had to change the #!... to #!/urs/bin/env python as mentionned above even today (4 years later...:P)

    ReplyDelete

Filter by topic: spe, python, ubuntu