gephi-plugins icon indicating copy to clipboard operation
gephi-plugins copied to clipboard

Missing functions

Open gdbassett opened this issue 12 years ago • 3 comments

I'm needing to create a binary string so attempted to use bin(x) however I'm getting the error that bin is not defined. I've run into this with a few other functions which should exist and didn't.

gdbassett avatar Oct 18 '12 15:10 gdbassett

Hi, what are you talking about?

sheymann avatar Nov 01 '12 13:11 sheymann

Sorry. Using they python interpreter plugin, I was unable to call the bin (http://docs.python.org/2/library/functions.html#bin) function. It was one example of a few I had where python functions I expected to exist were undefined. I ultimately coded up my own function to do it, however I'm wondering if there are limitations of th egephi python interpreter plugin that I'm not aware of.

gdbassett avatar Nov 01 '12 14:11 gdbassett

@gdbassett, the scripting plugin is based on Jython 2.5. According to http://www.jython.org/docs/library/functions.html the bin(x) function has only been available since Jython 2.6.

I'm not sure how hard it would be to patch our additional operators into Jython 2.6, but it shouldn't be very hard. We could upgrade to Jython 2.6 if we feel it's worth the effort.

I'm glad that you were able to get it to work anyway. Thanks for you feedback! I'll leave this open as a request to upgrade to Jython 2.6.

luizribeiro avatar Nov 04 '12 09:11 luizribeiro