SE|PY : Python : Editing ActionScript on OS X

I made the switch from Windows to OS X about 3 months ago. I have absolutely loved it and have not had any problems except for one thing. I have not been able to find a good editor to write ActionScript code.

I had been using JEdit, but it is a little to slow and a little too Java for my liking. The other night, I came across the SE|PY editor project.

This is an ActionScript editor written in Python that has an impressive array of features specific to ActionScript. You can download the binaries for Windows, but as of yet there is no support for OS X.

A couple of developers have worked to get it running on OS X, and have had some success. It appears that a lot of the issues simply have to do with path issues (due to differences between Windows and OS X).

So, I downloaded the source, took a crash corse in Python, and began hacking away (all today). To my surprise, I actually got it to run and load an ActionScript file.

It is still not usable, but it has definitely raised my spirits. So, if you know Python, use a Mac, and want to help get the editor running, head over to the project’s site and sign up.

Btw, here is the change I made to to get it to run (added this else to the first if / else statement):

else:ico = wxIcon(os.path.normpath('%s/icons/%s.ico' % (path, 'file')),wxBITMAP_TYPE_ICO,16,16)

You can find more info on SE|PY here.

28 Responses to SE|PY : Python : Editing ActionScript on OS X

  1. Keith Peters says:

    “I have not been able to find a good editor to write ActionScript code.”I had to laugh at this line. Shouldn’t you be promoting how cool the built in script editor in 2004 pro is? 🙂

  2. Sean Voisen says:

    Whoa – way sweet. I always wondered: once this is done, what about using PyObjC as a toolset to help the port? I know nothing about Python, but figured there might be something usable there.

  3. mike chambers says:

    Sean,I also know virtually nothing about Python (well, at least until today). From what I understand, most of the issues with the port have to do with simple OS dependent path issue.Regardless, I am really impressed with what the SE|PY team has been able to pull off thus far. It is a very impressive editor.mike

  4. mike chambers says:

    >Shouldn’t you be promoting how cool the built in script editor in 2004 pro is?It is cool, but if I dont use it, I don’t think I should be saying i do.The editor within Flash MX 2004 is very nice. It has color coding, advanced code hinting, etc…however, I just prefer using an external editor as it allows me to keep my Flash workspace much less cluttered.mike

  5. Wow Mike, thanks for posting this. I didn’t even know this was a possibility!

  6. Hi Mike and thanks for this post :)I’m in fact converting all the path calls for adding compatibility for OSX and will see more compatibility in the next release, anyway use this code for the line you modified:ico = wxIcon(os.path.normpath(os.path.join(path, “icons”,”file.ico”)), wxBITMAP_TYPE_ICO,16,16)

  7. Hey Mike,Nice work. Early December i worked with Alessandro a bit to have the file seperator issue sorted out, and even got SE|PY booting up and quite workable, however due to time constraints i wasn’t able to keep up with the updates kept pumping out ( keep up the good work Alessandro ). Now i see your post i am all excited again, doing a CVS checkout now and try and see if i can get SE|PY up and running again. Keep me updated on your progress 🙂

  8. Right, i think the following would be better. in after line 25 add the following:elif sys.platform == ‘darwin’:ico = wxIcon(os.path.normpath(os.path.join(path, “icons”,”file.ico”)), wxBITMAP_TYPE_ICO,16,16)got it booting again 🙂 thnx!

  9. Jan says:

    And if MM would replace Actionscript with Python (or add), it will be a near perfect world ;-)Yes, I’m Python developer, the ‘P’ that makes LAMP professional, powerful, perfect, blabla. I can go on and on, but you get the picture. Don’t flame me, jsut sharing my enthousiasm 😉

  10. mike chambers says:

    Owen,Thanks for the correction. I was actually thinking about this last night. Oh well, it was my first day of using python, so I have a little excuse.I am going to take a a crash course in Python this weekend, so maybe ai can help out.mike

  11. rafa3l says:

    I’m in the OS X team, I add the line and I launch the with PythonLauncher and in the Terminal show me this error:File “/Users/rafa3l/Desktop/DOWNLOADS/SEPY/”, line 2, in ?import pyRXPImportError: No module named pyRXPWhy?

  12. hoseyhosey says:

    Ok, this along the lines, but off topic……I would like to use python for a wrapper around SWF. I know I can use the active X, but for platform compatibility can I use the mozilla DLL??thanks

  13. mike chambers says:

    >ImportError: No module named pyRXPYou need to download and compile the pyRXP library. You can get it from:

  14. Every python developer is welcome aboard, expecially OSX users who can help me for the compatibility 🙂

  15. This is relatively OT, but Mike – any good links on beginning Python? Seeing as how it’s something I’d like to get into…what has your experience been like?Guess you’ll have more info on that through the weekend…And completely OnTopic – that editor is excellent! Really well done (I’m on Windows, so no OSX problems for me!).

  16. mike chambers says:

    Jason,I have been reading this tutorial which is well written and concise:

  17. @JasonThere are a few books out there that should get you up to speed on Python Programming…2 books on O’Reilly:- Learning Python, which is a beginners book. Good to start with- Programming Python, a great book inc.l the best C referenceif you are already experienced in Python and programming (languages) in general, go for- Python Bible, which is a great book including chapters on debugging, profiling and optimization, security and encryption and writing extension modules.

  18. rafa3l says:

    Sorry mike, but I don’t know how compile it, I’m searching in the documentation but I can see nothing about files *.slb (the files in the Mac package to download in the site)

  19. Gaspy says:

    OK, I don’t want to start a flame, but the editor included with Flash sucks. There, I said it. Anyone who has written more than 1000 lines with Actionscript will say the same thing.Actionscript is becoming mature, we really need a good IDE. Don’t tell me the built-in editor is great – have you worked with Eclipse?I wish the next version of Flash will come with SEPY included – it’s a wonderful editor!

  20. This is the best news I’ve heard all day (although it is only 10.30). Welcome to Macland.I hope that you are able to convince Macromedia to get behind one of these editors and give us a strong cross-platform as editing environment for the next version or Flash.Here are some nice OS X toys I’ve found recently. luck with python -MT

  21. Isaac Rivera says:

    WOW! Is this any further along?Have been looking like crazy for a real-world OS X Actionscript 2 editor…

  22. Isaac Rivera says:

    Alright, the current version runs in OSX (version 8a)b but it won’t save among many other crash-causing bugs.:-(However it looks hot!Can’t wait. Gonna be the best OSX AS2 editor out there.Isaac

  23. Todd Dominey says:

    I’m DYING for a good OS X editor. Please. Somebody.

  24. Todd Dominey says:

    I’m DYING for a good OS X editor. Please. Somebody.

  25. Isaac Rivera says:

    Version on OSX Panther:Traceback (most recent call last):File “/Applications/SEPY/main.pyw”, line 21, in ?main()File “/Applications/SEPY/”, line 4054, in mainsock.connect((‘localhost’,1974))File “”, line 1, in connectsocket.error: (61, ‘Connection refused’)~ $ sudo sepyPassword:sudo: sepy: command not found

  26. Heath Michaels says:

    I’ve tried installing SE|PY for OSX many times, and I’ve followed all the online documentation, but once I launch the installer it fails to install. I’ve tried installing all the different components it looks like I need (such as wxPython, pyRXP, et cetera), and the installer windows all say there were errors installing this software.Also, I’m on Tiger, so maybe that has something to do with it? Dunno. I keep reading online that I need to build these using terminal, but all their command lines given simply do not work.I’m an ActionScripter but know very little about anything outside of multimedia work, so any bit of help would be great. Thanks!

  27. Alex Birch says:

    Isaac Rivera, I had the same problem. You have to be in an Admin account to install the program/

  28. Arthur Fuse says:

    As soon as its installed – (Crash and Burn) :(ImportError: Failure linking new module: /Applications/SEPY ActionScript Library not loaded: /opt/local/lib/libpng.3.dylibReferenced from: /Applications/SEPY ActionScript image not found