{"id":21816625,"url":"https://github.com/5monkeys/bpython","last_synced_at":"2025-04-14T01:15:54.072Z","repository":{"id":4357053,"uuid":"5493287","full_name":"5monkeys/bpython","owner":"5monkeys","description":"Yet another mirror of bitbucket.org/bobf/bpython","archived":false,"fork":false,"pushed_at":"2012-08-24T17:47:35.000Z","size":5536,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T01:15:26.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bpython-interpreter.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5monkeys.png","metadata":{"files":{"readme":"README","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-21T10:01:47.000Z","updated_at":"2022-11-26T20:36:59.000Z","dependencies_parsed_at":"2022-08-28T01:10:39.000Z","dependency_job_id":null,"html_url":"https://github.com/5monkeys/bpython","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fbpython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fbpython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fbpython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fbpython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5monkeys","download_url":"https://codeload.github.com/5monkeys/bpython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804824,"owners_count":21164135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T15:35:37.222Z","updated_at":"2025-04-14T01:15:54.032Z","avatar_url":"https://github.com/5monkeys.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"bpython - A fancy curses interface to the Python interactive interpreter\n=======\n\nDependencies\n============\nPygments\n(apt-get install python-pygments)\n\nIntroduction\n============\nA few people asked for stuff like syntax highlighting\nand autocomplete for the Python interactive interpreter.\nIPython seems to offer this (plus you can get readline\nbehaviour in the vanilla interpreter) but I tried\nIPython a couple of times. Perhaps I didn't really get\nit, but I get the feeling that the ideas behind IPython\nare pretty different to bpython. I didn't want to create\na whole development environment; I simply wanted to\nprovide a couple of neat features that already exist\nand turn them into something a little more interactive.\n\nThe idea is to provide the user with all the features\nin-line, much like modern IDEs, but in a simple,\nlightweight package that can be run in a terminal\nwindow, so curses seemed like the best choice.\nSorry if you use Windows.\n\nbpython doesn't attempt to create anything new or\ngroundbreaking, it simply brings together a few neat\nideas and focuses on practicality and usefulness.\nFor this reason, the \"Rewind\" function should be\ntaken with a pinch of salt, but personally I have\nfound it to be very useful. I use bpython now\nwhenever I would normally use the vanilla interpreter,\ne.g. for testing out solutions to people's problems\non IRC, quickly testing a method of doing something\nwithout creating a temporary file, etc..\n\nI hope you find it useful and please feel free to\nsubmit any bugs/patches (yeah right)/suggestions\nto:\nrobertanthonyfarrell@gmail.com\nor place them at the bitbucket issue page for this\nproject at:\nhttp://bitbucket.org/bobf/bpython/issues/\n\nFor any other ways of communicating with bpython\nusers and devs you can find us at the communication\npage on the projects homepage:\nhttp://bpython-interpreter.org/community\n\nHope to see you there!\n\nFeatures\n========\n\n* In-line syntax highlighting.\n\tThis uses Pygments for lexing the code as you type,\n\tand colours appropriately. Pygments does a great job\n\tof doing all of the tricky stuff and really leaving\n\tme with very little to do except format the tokens\n\tin all my favourite colours.\n\n* Readline-like autocomplete with suggestions displayed\nas you type.\n\tThanks to Python's readline interface to libreadline\n\tand a ready-made class for using a Python interpreter's\n\tscope as the dataset, the only work here was displaying\n\tthe readline matches as you type in a separate curses\n\twindow below/above the cursor.\n\n* Expected parameter list.\n\tAs in a lot of modern IDEs, bpython will attempt to\n\tdisplay a list of parameters for any function you\n\tcall. The inspect module is tried first, which works\n\twith any Python function, and then pydoc if that fails,\n\twhich seems to be pretty adequate, but obviously\n\tin some cases it's simply not possible. I used pyparsing\n\tto cure my nested parentheses woes; again, it was\n\tnice and easy.\n\n* Rewind.\n\tI didn't call this \"Undo\" because I thought that would\n\tbe misleading, but \"Rewind\" is probably as bad. The\n\tidea is that the code entered is kept in memory and\n\twhen the Rewind function is called, the last line is\n\tpopped and the entire code is re-evaluated. As you can\n\timagine, this has a lot of potential problems, but for\n\tdefining classes and functions, I've found it to be\n\tnothing but useful.\n\n* Pastebin code/write to file.\n\tI don't really use the save thing much, but the pastebin\n\tthing's great. Hit a key and what you see on the screen\n\twill be sent to a pastebin and a URL is returned for you\n\tto do what you like with. I've hardcoded paste.pocoo.org\n\tin for now, that needs to be fixed so it's configurable.\n\tNext release, I promise.\n\n* Flush curses screen to stdout.\n\tA featurette, perhaps, but I thought it was worth noting.\n\tI can't personally recall a curses app that does this,\n\tperhaps it's often not useful, but when you quit bpython,\n\tthe screen data will be flushed to stdout, so it basically\n\tlooks the same as if you had quit the vanilla interpreter.\n\nConfiguration\n=============\nSee the sample-config file for a list of available options.\nYou should save your config file as ~/.config/bpython/config\n(i.e $XDG_CONFIG_HOME/bpython/config) or specify at the\ncommand line:\n\nbpython --config /path/to/bpython/config\n\nKnown Bugs\n==========\nFor known bugs please see bpython's issue tracker at\nbitbucket:\n\nhttp://bitbucket.org/bobf/bpython/issues/\n\nCLI Windows Support\n===================\n\nDependencies\n------------\nCurses\n    Use the appropriate version compiled by Christoph Gohlke\n    http://www.lfd.uci.edu/~gohlke/pythonlibs/\n\npyreadline\n    Use the version in the cheeseshop\n    http://pypi.python.org/pypi/pyreadline/\n\nRecommended\n-----------\nObtain the less program from GnuUtils. This makes the pager work as intended.\nIt can be obtained from cygwin or GnuWin32 or msys\n\nCurrent version is tested with\n------------------------------\nCurses 2.2\npyreadline 1.7\n\nCurses Notes\n------------\nThe curses used has a bug where the colours are displayed incorrectly:\n    red  is swapped with blue\n    cyan is swapped with yellow\n\nTo correct this I have provided my windows.theme file.\n\nThis curses implementation has 16 colors (dark and light versions of the colours)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5monkeys%2Fbpython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5monkeys%2Fbpython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5monkeys%2Fbpython/lists"}