use of interp tcl command with hcitcl

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf use of interp tcl command with hcitcl

  • Creator
    Topic
  • #48360
    John Mercogliano
    Participant

      Has anyone attempted to use the interp command with hci extensions?

      Example if I execute [gdbm_open test.gdbm w] (assuming test.gdbm already exists) in the default interpretor it words but if I execute:

      interp create foo

      foo eval

        I get the error:

        Error: invalid command name “gdbm_open”

        Also, when I execute [info global] in foo I get:

        tcl_version tcl_interactive auto_oldpath errorCode auto_path errorInfo auto_index env tcl_pkgPath tcl_patchLevel tcl_libPath tcl_platform tcl_library

        Notice there are no hci globals present.

        It does not appear that interp inherits the global environment from the parent.  I’m hoping someone has tried successfully to use this command in hcitcl and can tell me what needs to be replicated to have all commands work.

        Or, can someone form cloverleaf identify what we might need to run in a child interpreter that is run when hcitcl is started.

        Thanks,

      John Mercogliano
      Sentara Healthcare
      Hampton Roads, VA

    Viewing 0 reply threads
    • Author
      Replies
      • #58413
        Scott Folley
        Participant

          You need to set the auto_path in the new interpreter because it is not inheriting the path from hcitcl.  The way that I did it was to echo out the auto_path variable while in hcitcl and using that to set the auto_path in the interpreter.

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.