Am 05.06.2010 um 03:59 schrieb Stephen Wille Padnos: > ... >> let me put the question differently - which halcmd functions would be deemed >> useful to have in the Python hal.so module as well? >> > Well, what if someone wanted to rewrite halcmd in python? How about all > of those :)
I've so far completed the 'retrieve list of pin/param etc' and 'get status of pin/param etc' functions, which are straightforward. After working at module loading/unloading, I conclude Jeff was right - this will amount to a massive code duplication with halcmd code (which is some 4800 LOC). In terms of maintainance this would really make sense only if halcmd in its current form were retired and replaced by a Python version, and making sure this again works with halsh.c . This isnt likely to happen and probably not worthwhile afterall (http://www.mail-archive.com/[email protected]/msg02513.html). So my current plan is to add the signals/pin/param etc manipulation functions, and leave the RT/usr module loading/unloading to halcmd in its current form, to be called via Python functions and os.system() et al. Is this still making sense? -Michael > > load and unload components (halcmd doesn't really do this, it just uses > exec or emc_module_helper, depending) > create / destroy signals > attach / detach pins to/from signals > get status information > walk pin/param/component/thread lists (maybe with options for returning > the whole list as a python list, or iterating through) > > It would be great to have a python halcmd, where you could use "eval" > (or similar) to do all the things that python can do, with HAL - > evaluate expressions to set values, conditionals and loops, etc. >> I'd appreciate some feedback if this is complete b.s./so-so/great before I >> start though ;-) >> > It looks great to me. > > - Steve > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
