Navigation


Changes between Version 1 and Version 2 of dbg_interactive.fdx


Ignore:
Timestamp:
Mar 4, 2011, 5:48:50 PM (12 years ago)
Author:
Sebastien Decugis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • dbg_interactive.fdx

    v1 v2  
    11[[PageOutline(2-4)]]
    2 == Embedded Python interpreter ==
     2= Embedded Python interpreter =
    33
    44This {{{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.
     
    66A 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.
    77
    8 === Configuration ===
     8== Configuration ==
    99
    1010{{{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).
    1111
    1212
    13 === Usage ===
     13== Usage ==
    1414
    1515The 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:
     
    8383This is a simplified version without error checking, but it should give a good idea of the simplicity of use of the python interface.
    8484
    85 === Output ===
     85== Output ==
    8686
    8787This application does not produce any particular output -- well, all depends on what is done in python.
    8888
    89 === Troubleshooting ===
     89== Troubleshooting ==
    9090
    9191