tclwrapper


Nametclwrapper JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/csail-csg/tclwrapper
SummaryPython wrapper for programs that expose a tcl interface
upload_time2019-07-16 17:26:16
maintainer
docs_urlNone
authorCSAIL CSG
requires_python
license
keywords tcl wrapper tclsh wish
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            TCLWrapper
==========

Python wrapper to interact with TCL command line interfaces. In most cases,
tkinter (with the send command) is enough but sometimes it is convenient to
interact directly with the tcl cli provided by applications.


Installing Non-Development Version
----------------------------------

If you want to just install the `tclwrapper` package, you should be able to using the following command:


    $ pip3 install tclwrapper


Usage
-----

As an example, here is some code that interfaces with GTKWave's TCL interface:

.. code:: python

    from tclwrapper import TCLWrapper
    with TCLWrapper('gtkwave', '-W') as tcl:
        tcl.eval('gtkwave::loadFile %s' % filename)
        tcl.eval('set num_facs [gtkwave::getNumFacs]')
        signals = tcl.eval('''
            set all_facs [list]
            for {set i 0} {$i < $num_facs} {incr i} {
                lappend all_facs [gtkwave::getFacName $i]
            }
            return $all_facs''', to_list = True)


Installing for Development
--------------------------

To install this package for development, you should use a virtual environment, and install the package in editable mode using pip.

To create a virtual environment for this project, run the command below.

    $ python3 -m venv path/to/new-venv-folder

To start using your new virtual environment, run the command below.
This needs to be run each time you open a new terminal.

    $ source path/to/new-venv-folder/bin/activate

At this point you are now using your new virtual environment.
Python packages you install in this environment will not be available outside your virtual environment.
If you want to stop using the virtual environment, just run `deactivate`.

To install the `tclwrapper` package in editable mode, inside the `tclwrapper` top git repository folder, run the command below.

    $ pip3 install -e .



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/csail-csg/tclwrapper",
    "name": "tclwrapper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "TCL Wrapper tclsh wish",
    "author": "CSAIL CSG",
    "author_email": "acwright@mit.edu",
    "download_url": "https://files.pythonhosted.org/packages/c9/12/415ce7843101faccc72e05117e40a1534245774f40d2322a399e77d595cc/tclwrapper-0.0.1.tar.gz",
    "platform": "",
    "description": "TCLWrapper\n==========\n\nPython wrapper to interact with TCL command line interfaces. In most cases,\ntkinter (with the send command) is enough but sometimes it is convenient to\ninteract directly with the tcl cli provided by applications.\n\n\nInstalling Non-Development Version\n----------------------------------\n\nIf you want to just install the `tclwrapper` package, you should be able to using the following command:\n\n\n    $ pip3 install tclwrapper\n\n\nUsage\n-----\n\nAs an example, here is some code that interfaces with GTKWave's TCL interface:\n\n.. code:: python\n\n    from tclwrapper import TCLWrapper\n    with TCLWrapper('gtkwave', '-W') as tcl:\n        tcl.eval('gtkwave::loadFile %s' % filename)\n        tcl.eval('set num_facs [gtkwave::getNumFacs]')\n        signals = tcl.eval('''\n            set all_facs [list]\n            for {set i 0} {$i < $num_facs} {incr i} {\n                lappend all_facs [gtkwave::getFacName $i]\n            }\n            return $all_facs''', to_list = True)\n\n\nInstalling for Development\n--------------------------\n\nTo install this package for development, you should use a virtual environment, and install the package in editable mode using pip.\n\nTo create a virtual environment for this project, run the command below.\n\n    $ python3 -m venv path/to/new-venv-folder\n\nTo start using your new virtual environment, run the command below.\nThis needs to be run each time you open a new terminal.\n\n    $ source path/to/new-venv-folder/bin/activate\n\nAt this point you are now using your new virtual environment.\nPython packages you install in this environment will not be available outside your virtual environment.\nIf you want to stop using the virtual environment, just run `deactivate`.\n\nTo install the `tclwrapper` package in editable mode, inside the `tclwrapper` top git repository folder, run the command below.\n\n    $ pip3 install -e .\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python wrapper for programs that expose a tcl interface",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/csail-csg/tclwrapper"
    },
    "split_keywords": [
        "tcl",
        "wrapper",
        "tclsh",
        "wish"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c1cf26f27b7dc478cbd834c6ff1bcfa357cf5bbf68fe518bc3611ab8a0fe177",
                "md5": "0b75cba635e920217f85e218631b6079",
                "sha256": "a71150d7854f89dc1557c89c3e2d5950e6fdd69b261c2c1ff2550cdbc8eedd9a"
            },
            "downloads": -1,
            "filename": "tclwrapper-0.0.1-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "0b75cba635e920217f85e218631b6079",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": null,
            "size": 6208,
            "upload_time": "2019-07-16T17:26:14",
            "upload_time_iso_8601": "2019-07-16T17:26:14.304585Z",
            "url": "https://files.pythonhosted.org/packages/8c/1c/f26f27b7dc478cbd834c6ff1bcfa357cf5bbf68fe518bc3611ab8a0fe177/tclwrapper-0.0.1-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c912415ce7843101faccc72e05117e40a1534245774f40d2322a399e77d595cc",
                "md5": "ffbfd7c202491aaa66483ecec6f564fc",
                "sha256": "79e960e4336b0ffb59147b474fc7eef8f5c94db91897f3195830e35a9e48e603"
            },
            "downloads": -1,
            "filename": "tclwrapper-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ffbfd7c202491aaa66483ecec6f564fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5020,
            "upload_time": "2019-07-16T17:26:16",
            "upload_time_iso_8601": "2019-07-16T17:26:16.508538Z",
            "url": "https://files.pythonhosted.org/packages/c9/12/415ce7843101faccc72e05117e40a1534245774f40d2322a399e77d595cc/tclwrapper-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-07-16 17:26:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "csail-csg",
    "github_project": "tclwrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tclwrapper"
}
        
Elapsed time: 1.37731s