Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.362.321 Times

krpython 0.2.1

Company: Kenneth Reitz
Date Added: September 24, 2013  |  Visits: 490

krpython

Report Broken Link
Printer Friendly Version


Product Homepage
Download (32 downloads)



krpython - A fancy curses interface to the Python interactive interpreter<br />=======<br /><br />Dependencies<br />============<br />Pygments<br />pyparsing<br />(apt-get install python-pyparsing python-pygments)<br /><br />Introduction<br />============<br />A few people asked for stuff like syntax highlighting<br />and autocomplete for the Python interactive interpreter.<br />IPython seems to offer this (plus you can get readline<br />behaviour in the vanilla interpreter) but I tried<br />IPython a couple of times. Perhaps I didn't really get<br />it, but I get the feeling that the ideas behind IPython<br />are pretty different to krpython. I didn't want to create<br />a whole development environment; I simply wanted to<br />provide a couple of neat features that already exist<br />and turn them into something a little more interactive.<br /><br />The idea is to provide the user with all the features<br />in-line, much like modern IDEs, but in a simple,<br />lightweight package that can be run in a terminal<br />window, so curses seemed like the best choice.<br />Sorry if you use Windows.<br /><br />krpython doesn't attempt to create anything new or<br />groundbreaking, it simply brings together a few neat<br />ideas and focuses on practicality and usefulness.<br />For this reason, the "Rewind" function should be<br />taken with a pinch of salt, but personally I have<br />found it to be very useful. I use krpython now<br />whenever I would normally use the vanilla interpreter,<br />e.g. for testing out solutions to people's problems<br />on IRC, quickly testing a method of doing something<br />without creating a temporary file, etc..<br /><br />Features<br />========<br /><br />* In-line syntax highlighting.<br />*This uses Pygments for lexing the code as you type,<br />*and colours appropriately. Pygments does a great job<br />*of doing all of the tricky stuff and really leaving<br />*me with very little to do except format the tokens<br />*in all my favourite colours.<br /><br />* Readline-like autocomplete with suggestions displayed<br />as you type.<br />*Thanks to Python's readline interface to libreadline<br />*and a ready-made class for using a Python interpreter's<br />*scope as the dataset, the only work here was displaying<br />*the readline matches as you type in a separate curses<br />*window below/above the cursor.<br /><br />* Expected parameter list.<br />*As in a lot of modern IDEs, krpython will attempt to<br />*display a list of parameters for any function you<br />*call. The inspect module is tried first, which works<br />*with any Python function, and then pydoc if that fails,<br />*which seems to be pretty adequate, but obviously<br />*in some cases it's simply not possible. I used pyparsing<br />*to cure my nested parentheses woes; again, it was<br />*nice and easy.<br /><br />* Rewind.<br />*I didn't call this "Undo" because I thought that would<br />*be misleading, but "Rewind" is probably as bad. The<br />*idea is that the code entered is kept in memory and<br />*when the Rewind function is called, the last line is<br />*popped and the entire code is re-evaluated. As you can<br />*imagine, this has a lot of potential problems, but for<br />*defining classes and functions, I've found it to be<br />*nothing but useful.<br /><br />* Pastebin code/write to file.<br />*I don't really use the save thing much, but the pastebin<br />*thing's great. Hit a key and what you see on the screen<br />*will be sent to a pastebin and a URL is returned for you<br />*to do what you like with. I've hardcoded rafb.net/paste<br />*in for now, that needs to be fixed so it's configurable.<br />*Next release, I promise. Support for gist.github.com<br />*was just added. Just add use_gist to your ~/.bpythorc<br />*file, and you'll be pasting strait to Gists instead.<br /><br />* Flush curses screen to stdout.<br />*A featurette, perhaps, but I thought it was worth noting.<br />*I can't personally recall a curses app that does this,<br />*perhaps it's often not useful, but when you quit krpython,<br />*the screen data will be flushed to stdout, so it basically<br />*looks the same as if you had quit the vanilla interpreter.<br /><br />Configuration<br />=============<br />See the sample-rc file for a list of available options.<br />You should save your rc file as ~/.krpythonrc or specify<br />at the command line:<br /><br />krpython /path/to/krpythonrc<br /><br />Known Bugs<br />==========<br /><br />* Triple quoted strings over multiple lines work, but they're<br />not highlighted properly.<br /><br />#md5=23808c525161f8805bb1717ac5278d59

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Colours Couple Curses Didn Function Great I039ve Interactive It039s Krpython Pygments Python Readline Simply Thought Vanilla
Users rating: 0/10

License: Freeware Size: 20.48 KB
USER REVIEWS
More Reviews or Write Review


KRPYTHON RELATED
Programming  -  bpython-gist 0.9.7.1
A few people asked for stuff like syntax highlighting and autocomplete for the Python interactive interpreter. IPython seems to offer this (plus you can get readline behaviour in the vanilla interpreter) but I tried IPython a couple of times....
81.92 KB  
Multimedia & Graphics  -  MThumbnail 1.0
MThumbnail is a totally FREE application that automatically generates thumbnails from all JPEGs in actual directory and generates also colorized thumbnails great for interactive galleries using a simple Javascript. For more information see...
355 KB  
Games  -  Python Universe Builder 1.0
Python Universe Builder (PUB) is an Interactive Fiction module for Python. It provides a programming environment similar to that of Inform or TADS but runs under any Python interpreter.
606.77 KB  
Games  -  SimPG 1.0
A basic, very simple interactive game written in python. Written in Python 2, requires Python 2.
6.13 KB  
Libraries  -  Curses 1.15
Curses is a terminal screen handling and optimization. SYNOPSIS use Curses; initscr; ... endwin; Curses::supports_function($function); Curses::supports_contsant($constant); Curses is the interface between Perl and your systems...
81.92 KB  
Network & Internet  -  myAJAX 6.1.0
myAJAX is an AJAX Javascript OOP implementation. Object myAJAX PARAMETERS url = pages URL urlParameters = pages parameters method = HEAD, GET or POST with a defaul value of GET refreshInterval = sets the execution of AJAX request...
30.72 KB  
Programming  -  entrypoint 0.1.5
A decorator to interact with argparse based on function signature. This is a decorator library that helps one to write small scripts in Python. There are three main features that it provides: * Automatically...
10.24 KB  
Utilities  -  opterator 0.1
Easy option parsing introspected from function signature opterator is a decorator for a script's main entry point that uses a function function signature and docstring to pseudo-automatically create an option parser. When invoked, the...
10.24 KB  
Book Collection Managers  -  Swift To-Do List Lite 3.064
Swift To-Do List Lite is a free and hierarchical to-do list software with reminder and to-do lists organized by tree structure with icons. Application is suitable both for personal and business use. All tasks can have customized priority...
16.92 MB  
Utilities  -  Dead Pixel Tester 2.00
DPT was written to help me check my own screens by cycling through the three primary colours used (red,green,blue) and all on (white) and all off (black). Simply select a colour then closely inspect your monitor in each of the primary colours...
180 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB