[IronPython] Passing Arguments in hosted enviroment

Bernd Rössl broessl at gmc.li
Thu Sep 7 11:40:18 CEST 2006

Hello list,

Great to see 1.0 prod. Is out :)

Anyway, currently i'm embedding ironpython to a web application. This gives us the ability to write extension and modules in python.
One requirement is the possibility to pass arguments from the user context to the python enviroment. Till now i've done this by
adding or setting object to the globals. Unfortunetly this approach isn't multi user suitable since the python enviroment is static
and the same instance for all users respectivly for all sessions. So it could happen that a passed value of session2 overrides the
passed value of session1.

My thoughts:

1. Each session has it's own python enviroment: this results in higher memory usage and needs time each time a session loads it's
python enviroment
2. The arguments are not passed directly to the enviroment but to a session dependent object: each script has to take care what args
of what session will be taken
3. ? Is there a possibility to pass args to a "ExecuteFile" context? I mean my hosting application call's the method "executeFile"
each time a script will be executed and the passed args should be reachable ONLY in this execution. 

What is the best solution to handle this challenge?

Thanks for your hint's!

Regards, bernd 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060907/60944643/attachment.html>

More information about the Ironpython-users mailing list