{ "info": { "author": "Russell Keith-Magee", "author_email": "russell@keith-magee.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development", "Topic :: Utilities" ], "description": "tkReadOnly\n==========\n\nA set of Tkinter widgets for displaying readonly text and code.\n\nGetting Started\n---------------\n\ntkReadOnly can be installed from PyPI::\n\n pip install tkreadonly\n\nReadOnlyText\n------------\n\nAn extension of the ``ttk.Text`` widget that disables all user editing.\n\nThe builtin ttk.Text widget doesn't have a \"readonly\" mode. You can\ndisable the widget, but this also disables selection and other mouse\nevents, and it changes the color scheme of the text.\n\nThis widget captures and discards all insertion and deletion events on the\nText widget. This allows the widget to look and behave like a normal\n``ttk.Text`` widget in all other regards.\n\nArguments\n~~~~~~~~~\n\n``ReadOnlyText`` takes the same arguments as the base ``ttk.Text`` widget.\n\nUsage\n~~~~~\n\nUsage of ``ReadOnlyText`` is the same as usage for the base ``ttk.Text``\nwidget.\n\nExample::\n\n from Tkinter import *\n\n from tkreadonly import ReadOnlyText\n\n # Create the main Tk window\n root = Tk()\n\n # Create a main frame\n main_frame = Frame(root)\n main_frame.grid(column=0, row=0, sticky=(N, S, E, W))\n\n # Put a ReadOnlyText widget in the main frame\n read_only = ReadOnlyText(main_frame)\n read_only.grid(column=0, row=0, sticky=(N, S, E, W))\n\n # Add text to the end of the widget.\n read_only.insert(END, 'Hello world')\n\n # Run the main loop\n root.mainloop()\n\nReadOnlyCode\n------------\n\nA composite widget that lets you display line number-annotated code,\nwith a vertical scrollbar. The syntax highlighting will be automatically\nguessed from the filename and/or file contents.\n\nArguments\n~~~~~~~~~\n\n``style``\n\n The Pygments style sheet to use. Default is ``monokai``.\n\n\nAttributes\n~~~~~~~~~~\n\n``filename``\n\n The filename currently being displayed. If you set this attribute,\n the path you provide will be loaded into the code window.\n\n``line``\n\n The current line of the file. The current line will be highlighted.\n If you set this attribute, any existing current line will be cleared\n and the new line highlighted.\n\nMethods\n~~~~~~~\n\n``refresh()``\n\n Force a reload of the current file.\n\n``line_bind(sequence, func)``\n\n Bind the ``func`` event handler to the given event sequence on a line\n number. If an binding for the given sequence already exists, it will be\n overwritten.\n\n Supports ````-````, and ````-````\n sequences, with the ``Shift``, ``Alt``, and ``Control`` modifiers.\n\n When an event occurs, the handler will be invoked with a single argument -\n the event that occurred. This event object will have a ``line`` attribute\n that describes the line that generated the event.\n\n``name_bind(sequence, func)``\n\n Bind ``func`` event handler to the given event sequence on a token in\n the code. If an binding for the given sequence already exists, it will\n be overwritten.\n\n Supports ````-````, and ````-````\n sequences, with the ``Shift``, ``Alt``, and ``Control`` modifiers.\n\n When an event occurs, the handler will be invoked with a single argument -\n the event that occurred. This event object will have a ``name`` attribute\n that describes the token that generated the event.\n\nUsage\n~~~~~\n\nExample::\n\n from Tkinter import *\n import tkMessageBox\n\n from tkreadonly import ReadOnlyCode\n\n # Create the main Tk window\n root = Tk()\n\n # Create the main frame\n main_frame = Frame(root)\n main_frame.grid(column=0, row=0, sticky=(N, S, E, W))\n\n # Create a ReadOnlyCode widget in the main frame\n read_only = ReadOnlyCode(main_frame)\n read_only.grid(column=0, row=0, sticky=(N, S, E, W))\n\n # Show a particular file\n read_only.filename = '/path/to/file.py'\n\n # Highlight a particular line in the file\n read_only.line = 5\n\n # Set up a handler for a double click on a line number\n def line_handler(event):\n tkMessageBox.showinfo(message='Click on line %s' % event.line)\n\n read_only.line_bind('', line_handler)\n\n # Set up a handler for a single click on a code variable\n def name_handler(event):\n tkMessageBox.showinfo(message='Click on token %s' % event.name)\n\n read_only.name_bind('', name_handler)\n\n # Run the main event loop\n root.mainloop()\n\n\nKnown problems under Ubuntu\n---------------------------\n\nUbuntu's packaging of Python omits the ``idlelib`` library from it's base\npackge. If you're using Python 2.7 on Ubuntu 13.04, you can install\n``idlelib`` by running::\n\n $ sudo apt-get install idle-python2.7\n\nFor other versions of Python and Ubuntu, you'll need to adjust this as\nappropriate.\n\nProblems under Windows\n----------------------\n\nIf you're running Cricket in a virtualenv, you'll need to set an\nenvironment variable so that Cricket can find the TCL graphics library::\n\n $ set TCL_LIBRARY=c:\\Python27\\tcl\\tcl8.5\n\nYou'll need to adjust the exact path to reflect your local Python install.\nYou may find it helpful to put this line in the ``activate.bat`` script\nfor your virtual environment so that it is automatically set whenever the\nvirtualenv is activated.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.org/pybee/tkreadonly", "keywords": "", "license": "New BSD", "maintainer": "", "maintainer_email": "", "name": "tkreadonly", "package_url": "https://pypi.org/project/tkreadonly/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tkreadonly/", "project_urls": { "Homepage": "http://github.org/pybee/tkreadonly" }, "release_url": "https://pypi.org/project/tkreadonly/0.6.1/", "requires_dist": [ "Pygments (>=1.5)" ], "requires_python": "", "summary": "A set of Tkinter widgets to display readonly text and code.", "version": "0.6.1" }, "last_serial": 2601153, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "c75e2cad3a9aeb923e645b039cde05ca", "sha256": "271ef8cbb054e3d5800501ebb8f26cae6e8cccc7faef27ccbb4536c1ac4e8909" }, "downloads": -1, "filename": "tkreadonly-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c75e2cad3a9aeb923e645b039cde05ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7228, "upload_time": "2013-08-18T09:50:51", "url": "https://files.pythonhosted.org/packages/af/97/3ddd25d5889790e117ccca0df06aa9c79017c0c2e00aa471f3d14b348780/tkreadonly-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "e6882def83e6eecac1402c1c46c97a1e", "sha256": "63300e4df981cc5529f1607db3ef697a21e84e6a2f4ec114a0b2853c97e63d98" }, "downloads": -1, "filename": "tkreadonly-0.5.1.tar.gz", "has_sig": false, "md5_digest": "e6882def83e6eecac1402c1c46c97a1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7244, "upload_time": "2013-08-20T08:14:54", "url": "https://files.pythonhosted.org/packages/5a/d8/2e5f110a2ed5a4103af43f7ede7556f7362667a92f9b97a8e56023d8cdc6/tkreadonly-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "11ef455983417ffa3dbff9596e7717e2", "sha256": "338cdc9aac161875caaad81b47b96530c8a98df3e695daf80c6893bea68ecfc4" }, "downloads": -1, "filename": "tkreadonly-0.5.2.tar.gz", "has_sig": false, "md5_digest": "11ef455983417ffa3dbff9596e7717e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7908, "upload_time": "2013-09-16T05:01:34", "url": "https://files.pythonhosted.org/packages/2d/40/a63b7f7df12d507f4badbaccba8b092adcd4d755c8ea82bf75affd8ef868/tkreadonly-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "39ee33c428255604c3df6c776f059bcd", "sha256": "f16d2b308449077dd94b3cbf22dc507f304622c9bf93aad4ba147abdad0d3d87" }, "downloads": -1, "filename": "tkreadonly-0.5.3.tar.gz", "has_sig": false, "md5_digest": "39ee33c428255604c3df6c776f059bcd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7909, "upload_time": "2013-09-17T00:31:41", "url": "https://files.pythonhosted.org/packages/6b/5e/90400a5f9fa225f042b925f9e5cab656dd9bf6e5d57022140bb4aba56bf3/tkreadonly-0.5.3.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "82c31e903390ac193fc82856078c830b", "sha256": "2aac2ae589ac1334c7b7ad55f0af10f8af588e72a70fa477440ee5398036a3b0" }, "downloads": -1, "filename": "tkreadonly-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82c31e903390ac193fc82856078c830b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9329, "upload_time": "2015-03-27T07:51:02", "url": "https://files.pythonhosted.org/packages/1f/64/aa69cd5c447f2315ed10768f068afc646438c13afdf543504099131fbbf0/tkreadonly-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb74326471acdbbbc8641d37b6344d5b", "sha256": "4a98c0c884042f834051246e71c9ddeca3789cda548a9b83ce1bc4106d128857" }, "downloads": -1, "filename": "tkreadonly-0.6.0.tar.gz", "has_sig": false, "md5_digest": "bb74326471acdbbbc8641d37b6344d5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7959, "upload_time": "2015-03-27T07:51:06", "url": "https://files.pythonhosted.org/packages/66/9c/8d622290a9a23262d50b045acd39b3a289fe6297c183788cfcb226e4615d/tkreadonly-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "2e95c323ce188db03e4f734376c3aff1", "sha256": "dd28b187d7807fb838ba9d6cc0b3b44abcbb6d0d647ce8d479356d0f1f169ab9" }, "downloads": -1, "filename": "tkreadonly-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e95c323ce188db03e4f734376c3aff1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9413, "upload_time": "2017-01-27T04:09:14", "url": "https://files.pythonhosted.org/packages/3d/7b/df0ed3e71a500ecbca1d3e3fe24c5ad894359df4d5aace0ca876fc33f58f/tkreadonly-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f06afa1275e8c7d88955094aeef33f3", "sha256": "c952a4e4c8ebea2d44573b5ec3319222d0464fdb203a6495874a4d2fa22ab669" }, "downloads": -1, "filename": "tkreadonly-0.6.1.tar.gz", "has_sig": false, "md5_digest": "6f06afa1275e8c7d88955094aeef33f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8030, "upload_time": "2017-01-27T04:09:16", "url": "https://files.pythonhosted.org/packages/9a/5c/bb4b124414ee0f53e6c7d6a0e618725a78886625c91601ac8eb48812cf0c/tkreadonly-0.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e95c323ce188db03e4f734376c3aff1", "sha256": "dd28b187d7807fb838ba9d6cc0b3b44abcbb6d0d647ce8d479356d0f1f169ab9" }, "downloads": -1, "filename": "tkreadonly-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e95c323ce188db03e4f734376c3aff1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9413, "upload_time": "2017-01-27T04:09:14", "url": "https://files.pythonhosted.org/packages/3d/7b/df0ed3e71a500ecbca1d3e3fe24c5ad894359df4d5aace0ca876fc33f58f/tkreadonly-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f06afa1275e8c7d88955094aeef33f3", "sha256": "c952a4e4c8ebea2d44573b5ec3319222d0464fdb203a6495874a4d2fa22ab669" }, "downloads": -1, "filename": "tkreadonly-0.6.1.tar.gz", "has_sig": false, "md5_digest": "6f06afa1275e8c7d88955094aeef33f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8030, "upload_time": "2017-01-27T04:09:16", "url": "https://files.pythonhosted.org/packages/9a/5c/bb4b124414ee0f53e6c7d6a0e618725a78886625c91601ac8eb48812cf0c/tkreadonly-0.6.1.tar.gz" } ] }