{ "info": { "author": "Kodie Grantham", "author_email": "kodie.grantham@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "***********\nansiescapes\n***********\n\n`ANSI escape codes `_ for manipulating the terminal - A Python port of `sindresorhus `_'s `ansi-escapes `_ Node.js module.\n\nInstallation\n============\n.. code-block:: bash\n\n $ pip install ansiescapes\n\nUsage\n=====\n.. code-block:: python\n\n import ansiescapes\n import sys\n\n # Moves the cursor two rows up and to the left\n sys.stdout.write(ansiescapes.cursorUp(2) + ansiescapes.cursorLeft)\n #=> '\\u001B[2A\\u001B[1000D'\n\nAPI\n===\n\ncursorTo(x, [y])\n----------------\nSet the absolute position of the cursor. `x0` `y0` is the top left of the screen.\n\ncursorMove(x, [y])\n------------------\nSet the position of the cursor relative to its current position.\n\ncursorUp(count)\n---------------\nMove cursor up a specific amount of rows. Default is `1`.\n\ncursorDown(count)\n-----------------\nMove cursor down a specific amount of rows. Default is `1`.\n\ncursorForward(count)\n--------------------\nMove cursor forward a specific amount of rows. Default is `1`.\n\ncursorBackward(count)\n---------------------\nMove cursor backward a specific amount of rows. Default is `1`.\n\ncursorLeft\n----------\nMove cursor to the left side.\n\ncursorSavePosition\n------------------\nSave cursor position.\n\ncursorRestorePosition\n---------------------\nRestore saved cursor position.\n\ncursorGetPosition\n-----------------\nGet cursor position.\n\ncursorNextLine\n--------------\nMove cursor to the next line.\n\ncursorPrevLine\n--------------\nMove cursor to the previous line.\n\ncursorHide\n----------\nHide cursor.\n\ncursorShow\n----------\nShow cursor.\n\neraseLines(count)\n-----------------\nErase from the current cursor position up the specified amount of rows.\n\neraseEndLine\n------------\nErase from the current cursor position to the end of the current line.\n\neraseStartLine\n--------------\nErase from the current cursor position to the start of the current line.\n\neraseLine\n---------\nErase the entire current line.\n\neraseDown\n---------\nErase the screen from the current line down to the bottom of the screen.\n\neraseUp\n-------\nErase the screen from the current line up to the top of the screen.\n\neraseScreen\n-----------\nErase the screen and move the cursor the top left position.\n\nscrollUp\n--------\nScroll display up one line.\n\nscrollDown\n----------\nScroll display down one line.\n\nclearScreen\n-----------\nClear the terminal screen.\n\nbeep\n----\nOutput a beeping sound.\n\nimage(input, [options])\n-----------------------\nDisplay an image.\n\n*Currently only supported on iTerm2 >=3*\n\nSee `termimg `_ for a higher-level module.\n\ninput\n~~~~~\n\nType: `Buffer`\n\nBuffer of an image. Usually read in with `open`.\n\nExample:\n\n.. code-block:: python\n\n import ansiescapes\n import sys\n from codecs import open\n\n with open('image.png', 'rb') as imageFile:\n f = imageFile.read()\n b = bytearray(f)\n\n sys.stdout.write(ansiescapes.image(b))\n\noptions\n~~~~~~~\n\nwidth\n_____\nheight\n______\n\nType: `string` `number`\n\nThe width and height are given as a number followed by a unit, or the word \"auto\".\n\n- `N`: N character cells.\n- `Npx`: N pixels.\n- `N%`: N percent of the session's width or height.\n- `auto`: The image's inherent size will be used to determine an appropriate dimension.\n\npreserveAspectRatio\n___________________\n\nType: `boolean`\n\nDefault: `true`\n\nsetCwd([path])\n--------------\n\nType: `string`\n\nDefault: `os.getcwd()`\n\n`Inform iTerm2 `_ of the current directory to help semantic history and enable `Cmd-clicking relative paths `_.\n\nLicense\n=======\nMIT. See the `LICENSE file `_ for more info.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kodie/ansiescapes", "keywords": "ansi terminal console cli string tty escape escapes formatting shell xterm log logging command-line text vt100 sequence control code codes cursor iterm iterm2", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ansiescapes", "package_url": "https://pypi.org/project/ansiescapes/", "platform": "", "project_url": "https://pypi.org/project/ansiescapes/", "project_urls": { "Homepage": "https://github.com/kodie/ansiescapes" }, "release_url": "https://pypi.org/project/ansiescapes/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "ANSI escape codes for manipulating the terminal - A Python port of sindresorhus's ansi-escapes Node.js module", "version": "1.0.0" }, "last_serial": 3213721, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "f97b4c92a210906898d86bd6453897b8", "sha256": "e56396074e1ad79faec63368995cfa78cb548b73de203619588685ea441ff37d" }, "downloads": -1, "filename": "ansiescapes-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f97b4c92a210906898d86bd6453897b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3814, "upload_time": "2017-09-29T20:25:01", "url": "https://files.pythonhosted.org/packages/13/90/1e9713413d5cc9de61b8717fe2073ecaee4b37499bb2e7afbc8e6f4a4511/ansiescapes-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f97b4c92a210906898d86bd6453897b8", "sha256": "e56396074e1ad79faec63368995cfa78cb548b73de203619588685ea441ff37d" }, "downloads": -1, "filename": "ansiescapes-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f97b4c92a210906898d86bd6453897b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3814, "upload_time": "2017-09-29T20:25:01", "url": "https://files.pythonhosted.org/packages/13/90/1e9713413d5cc9de61b8717fe2073ecaee4b37499bb2e7afbc8e6f4a4511/ansiescapes-1.0.0.tar.gz" } ] }