Author Topic: Python bindings for SlickEdit  (Read 6037 times)

Ian Ameline

  • Community Member
  • Posts: 63
  • Hero Points: 7
Python bindings for SlickEdit
« on: July 11, 2006, 05:16:12 pm »
First I'd like to start by thanking Clark Maurer for making editors I can bear to use. (I've been using editors he's written for about 25 years now -- starting with the old IBM PE.) At this point, I'd rather shave my head with a cheese grater while chewing on tinfoil than change editors :-)

So on to my point;

I'm wondering if there is anyone else out there in the slickedit community that would like python bindings.

Python absolutely rocks and has some good qualities for this purpose;

1: It's really easy to make python bindings for an application
2: Python makes string and list manipulation very easy
3: Python is easily extendible in C, when you absolutely need native compiled performance (rare, as it runs quite fast)
4: Python code is readable and maintainable.
5: Python is a very easy language to learn (arguably easier than Slickedits current macro language)

Comments anyone?

Regards,
Ian Ameline,
Sr. Architect, Alias Systems. Now Autodesk.

mike_pentney

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: Python bindings for SlickEdit
« Reply #1 on: July 12, 2006, 10:49:08 am »
Personally, I'm a great fan of Python and would love to be able to use it to create macros in SlickEdit...this would definitely get me using the program again, despite its inability to grok the multiple projects & namespaces in one of the apps I work on.

Mike Pentney.

Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Re: Python bindings for SlickEdit
« Reply #2 on: July 12, 2006, 09:14:36 pm »
the main reason for me to use python instead of slick-c is that in our company people are using different IDEs or editors so we have to use an IDE independant language... another thing is that i am still a little bit paranoid of what happed to my previous editor (codewright) and do not want to create my tools in a proprietary language.

in my opinion binding python to slickedit would either create new proprietary python commands (if the full slickedit api shall be provided) or there is a simple subset of python useable in slickedit... so for me running python from slickedit as external tool is exactly what i want.


best regards,
gary


jszakmeister

  • Community Member
  • Posts: 12
  • Hero Points: 3
Re: Python bindings for SlickEdit
« Reply #3 on: August 29, 2006, 08:45:54 am »
FWIW, I've actually talked to the SlickEdit guys about this.  They actually didn't balk at the idea, but did say there is a huge barrier to cross: getting the current Slick-C stuff converted to Python.  Personally, I think it's a great idea.  I've yet to figure out half of the commands available to me in Slick-C (I know, there are some listed in the help, but that's just a fraction of what actually is available).  Not that switching to Python would fix that issue necessarily (it still requires them to document the API), but at least I could accomplish string processing, interaction with some command line tools, etc., without having to learning Slick-C and discovering the hidden API to do everything. :-)

-John

nathanfrid

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Python bindings for SlickEdit
« Reply #4 on: September 03, 2006, 04:17:25 pm »
Hi All,

I'm just starting to learn the Slick-C language and API and I have to say that I'd love to see a Python interface instead.  I now have to learn the syntax and idiosyncracies of yet ANOTHER language.  Also, Python already has a tremendous amount of functionality in its "standard" libraries - and bindings exist for a lot of third party libraries as well.

                             Nathan


garion911

  • Senior Community Member
  • Posts: 184
  • Hero Points: 13
Re: Python bindings for SlickEdit
« Reply #5 on: September 03, 2006, 04:58:19 pm »
I'm a huge python fan.. In fact, I moved 2500 miles for a job programming mostly python.

I dont think that replacing Slick-C is a good idea.. Too much is written and working to break it.. But having Python bindings as a second option would be really cool..

To the SlickEdit Devs wanting to experiment with this:
I've interfaced libraries from C to Python in the past, and its not really that difficult... For quick prototyping, a package called ctypes (http://starship.python.net/crew/theller/ctypes/) is good for experimenting, as it allows any app to bind to a lib.. I wouldn't use it for production use though... And I think its x86 only (at least it was)..

Another option is Pyrex (http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/) .. This is a subset of Python, and generates actaully C code to make python modules.. I have used this in production code at 2 jobs, and works quite well... Since it generates C code, it should be fairly cross platform..  (I've use it on Windows and Linux (x86 and x86_64)..) The really nice thing about this one is that if the Pyrex language wont let you do something completely, you can always tweak the C code... Pyrex has allowed me to generate bindings in days, as opposed to weeks..

Of course, you can always just write straight C code :)

Kohei

  • Senior Community Member
  • Posts: 192
  • Hero Points: 25
Re: Python bindings for SlickEdit
« Reply #6 on: September 06, 2006, 08:21:47 pm »
We are certainly interested in providing Python binding to SlickEdit, although that's not to say that this feature is forthcoming anytime soon.  Right now, we are discussing how best to implement it in a way that makes sense to all SlickEdit users.  Certainly not every user would be extending SlickEdit using Python; long-time SlickEdit users would probably still continue to use Slick-C for that purpose, yet Python binding may be more attractive to new users of SlickEdit, especially those who already know and use Python (but not much Slick-C).

Anyway, we can't make any promises yet, but we're not against this idea, either.