Re: Executing python scripts from a python program.

Alex Tweedly <[email protected]> Mon, 03 Dec 2007 23:42:34 +0000
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
Hedlund, Peter wrote:
>
> Greetings,
>
>   I am in need of some assistance on this one.
>
> I want the user to be able to edit a python script file and allow that 
> script to be run from within my main python program.
>
> Now before everyone jumps on the execfile bandwagon I need to clarify 
> some things.
>
>  
>
> The main python program has several other python scripts in the project. 
>
> I am using pythoncard for my user ide.
>
> The user script will need to call functions already defined in the 
> main.py and pass information back to main.py.
>
>  
>
> Main program opens a serial port to a device
>
> User script will send commands to the device  by way of functions in main
>
>  
>
> Any ideas on this would be appreciated.
>
>  
>
Probably being naive, but ....
    Can't you simply do an eval() of the user script ?

-- 

Alex Tweedly      mailto:[email protected]      www.tweedly.net

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users