{ "info": { "author": "Hong-She Liang", "author_email": "starofrainnight@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "=======\npywinio\n=======\n\n.. image:: https://img.shields.io/pypi/v/pywinio.svg\n :target: https://pypi.python.org/pypi/pywinio\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/starofrainnight/pywinio?svg=true\n :target: https://ci.appveyor.com/project/starofrainnight/pywinio\n\nA wrapper library for WinIO\n\nThanks for the great WinIO library which comes from Yariv Kaplan.\n\nThe WinIO library binary distribution will be accessed from winiobinary package.\n\nNOTE: This library has been renamed from 'rabird.winio' to 'pywinio' after 0.3.0 .\n\n* License: Apache-2.0\n\nUsage\n-----\n\n* Keyboard Emulation\n\n NOTICE: You must have a ps/2 keyboard connected to your PC if you test on win10 or later, otherwise this sample won't works!\n\n::\n\n import pywinio\n import time\n import atexit\n\n # KeyBoard Commands\n # Command port\n KBC_KEY_CMD\t= 0x64\n # Data port\n KBC_KEY_DATA = 0x60\n\n g_winio = None\n\n def get_winio():\n \tglobal g_winio\n\n \tif g_winio is None:\n \t\tg_winio = pywinio.WinIO()\n \t\tdef __clear_winio():\n \t\t\tglobal g_winio\n \t\t\tg_winio = None\n \t\tatexit.register(__clear_winio)\n\n \treturn g_winio\n\n def wait_for_buffer_empty():\n \t'''\n \tWait keyboard buffer empty\n \t'''\n\n \twinio = get_winio()\n\n \tdwRegVal = 0x02\n \twhile (dwRegVal & 0x02):\n \t\tdwRegVal = winio.get_port_byte(KBC_KEY_CMD)\n\n def key_down(scancode):\n \twinio = get_winio()\n\n \twait_for_buffer_empty();\n \twinio.set_port_byte(KBC_KEY_CMD, 0xd2);\n \twait_for_buffer_empty();\n \twinio.set_port_byte(KBC_KEY_DATA, scancode)\n\n def key_up(scancode):\n \twinio = get_winio()\n\n \twait_for_buffer_empty();\n \twinio.set_port_byte( KBC_KEY_CMD, 0xd2);\n \twait_for_buffer_empty();\n \twinio.set_port_byte( KBC_KEY_DATA, scancode | 0x80);\n\n def key_press(scancode, press_time = 0.2):\n \tkey_down( scancode )\n \ttime.sleep( press_time )\n \tkey_up( scancode )\n\n\n # Press 'A' key\n # Scancodes references : https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html\n key_press(0x1E)\n\n\nPrivilege Requirements\n-----------------------\n\nWinIo requires administrative privileges to run properly. This can be achieved by:\n\n* Using WinIo from a service running as LocalSystem (SE_LOAD_DRIVER_NAME privilege must be explicitly enabled).\n* Embedding a manifest file in the application that requests privilege elevation.\n* Requiring the user to choose the \"Run as Administrator\" option when launching the application.\n\nThe included C# samples demonstrate using an embedded manifest file to request privilege elevation.\n\nDriver Signing Requirements on 64-bit Systems\n---------------------------------------------\n\n64-bit versions of Windows only load device drivers that are signed by a code signing certificate issued by a public CA such as Verisign, Thawte, etc. WinIo64.sys must not be deployed on production machines unless a code signing certificate is obtained and used to sign this file. The bundled copy of WinIo64.sys is signed with a self-signed certificate and can only be used on development/test machines with Windows running in a special \"test\" mode. In order to use the bundled version of WinIo64.sys, you need to take the following steps:\n\n* Open an elevated command window by right-clicking the icon and clicking \"Run as Administrator\".\n* Type the following command to enable test-signing:\n\n ::\n\n bcdedit.exe /set TESTSIGNING ON\n\n* Reboot the machine\n\nFor more information on Windows driver signing requirements, please refer to http://www.microsoft.com/whdc/winlogo/drvsign/kmcs_walkthrough.mspx.\n\nLicenses\n---------------------------------------------\n\nThis library was licensed under Apache-2.0 which already descripted in LICENSE\n\nWinIO library's license descripted in LICENSE-WINIO\n\n\n=======\nHistory\n=======\n\n0.3.0 (2018-07-24)\n---------------------\n\n* Renamed to pywinio\n\n0.2.6 (2018-07-20)\n---------------------\n\n* Claim this library renamed to pywinio!\n\n0.2.5 (2018-07-20)\n---------------------\n\n* Removed support of python 2.x\n\n0.2.4 (2018-06-01)\n---------------------\n\n* Supported automatic deploy by appveyor\n\n0.2.0 (2018-01-21)\n---------------------\n\n* Depends on winiobinary project, so we don't need to download WinIo binaries during setup.py\n\n0.1.9 (2015-12-02)\n---------------------\n\n* Can't install from packaged zip file due to missing rabird_bootstrap.py\n\n0.1.8 (2015-09-09)\n---------------------\n\n* Fixed not working with 64bits os\n\n0.1.0 (2015-08-18)\n---------------------\n\n* Fixed not working with python3\n\n0.0.9 (2015-08-18)\n---------------------\n\n* Initial release", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/starofrainnight/pywinio", "keywords": "pywinio,winio", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "pywinio", "package_url": "https://pypi.org/project/pywinio/", "platform": "", "project_url": "https://pypi.org/project/pywinio/", "project_urls": { "Homepage": "https://github.com/starofrainnight/pywinio" }, "release_url": "https://pypi.org/project/pywinio/0.3.1/", "requires_dist": null, "requires_python": "", "summary": "A wrapper library for WinIO", "version": "0.3.1" }, "last_serial": 4717886, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "2ebace15c3ec22d170b06bf606e74561", "sha256": "e9e2b19d0a506e60e563355f254be1de284267dc273590c54f4461d3404c9176" }, "downloads": -1, "filename": "pywinio-0.3.0.zip", "has_sig": false, "md5_digest": "2ebace15c3ec22d170b06bf606e74561", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26847, "upload_time": "2018-07-24T06:19:47", "url": "https://files.pythonhosted.org/packages/21/49/4e86ad4ec72018a5608a06802edd6d7282440654763395fcc1d4256ab0f0/pywinio-0.3.0.zip" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "ef1069937c9bbfd694076f95cdc8ddc4", "sha256": "8154201de8e41109158433cf6d182c500811b78d906871105cb67c372d4212ec" }, "downloads": -1, "filename": "pywinio-0.3.1.zip", "has_sig": false, "md5_digest": "ef1069937c9bbfd694076f95cdc8ddc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26743, "upload_time": "2019-01-20T09:49:37", "url": "https://files.pythonhosted.org/packages/bf/72/ed15d1813002cbb79371f868856ffeb5dc9569531cc7cce64aa317ed0e37/pywinio-0.3.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef1069937c9bbfd694076f95cdc8ddc4", "sha256": "8154201de8e41109158433cf6d182c500811b78d906871105cb67c372d4212ec" }, "downloads": -1, "filename": "pywinio-0.3.1.zip", "has_sig": false, "md5_digest": "ef1069937c9bbfd694076f95cdc8ddc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26743, "upload_time": "2019-01-20T09:49:37", "url": "https://files.pythonhosted.org/packages/bf/72/ed15d1813002cbb79371f868856ffeb5dc9569531cc7cce64aa317ed0e37/pywinio-0.3.1.zip" } ] }