Changes between Version 1 and Version 2 of dbg_interactive.fdx
- Timestamp:
- Mar 4, 2011, 5:48:50 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
dbg_interactive.fdx
v1 v2 1 1 [[PageOutline(2-4)]] 2 = = Embedded Python interpreter ==2 = Embedded Python interpreter = 3 3 4 4 This {{{dbg_interactive.fdx}}} extension gives access to the freeDiameter framework through a Python interface layer. It can be used both to run pre-existing scripts or through an interactive console directly for quick tests / monitoring of the daemon's state. … … 6 6 A warning anyway: this python layer should not be used for any purpose other than quick prototyping and/or debug. The memory management and the efficiency are bellow the level of the framework itself -- although still pretty usable. 7 7 8 == = Configuration ===8 == Configuration == 9 9 10 10 {{{dbg_interactive_xml.fdx}}} extension does not use a configuration file. It is possible however to specify a file associated with the extension in the main {{freeDiameter.conf}} file. In that case, this file should be a python script, that will be executed by the embedded python interpreter. If no such file is provided, the interpreter is run interactively (as long as the daemon is run with a usable console). 11 11 12 12 13 == = Usage ===13 == Usage == 14 14 15 15 The list of all usable functions is given in [source:freeDiameter/doc/dbg_interactive.py.sample dbg_interactive.py.sample]. Here is a brief example of how to re-create the [wiki:test_app.fdx] client and server function from python: … … 83 83 This is a simplified version without error checking, but it should give a good idea of the simplicity of use of the python interface. 84 84 85 == = Output ===85 == Output == 86 86 87 87 This application does not produce any particular output -- well, all depends on what is done in python. 88 88 89 == = Troubleshooting ===89 == Troubleshooting == 90 90 91 91