No project description provided
Project description
Telepythy
Telepythy is a desktop Python shell inspired by DreamPie with some notable additional features. It is designed to streamline a prototyping workflow.
Features
- Divided editor for code
- UI based on Qt 5
- Syntax highlighting (based on Pygments)
- Embeddable service with no third-party dependencies
- Connection to service remotely (as client or server via TCP)
- Seamlessly swap between multiple interpreter profiles
Requirements
- UI requires Python 3 on Linux/Windows/OSX (tested: 3.6/3.7/3.9 on Linux/Windows)
- Embeddable service supports Python 2 and 3 on all platforms (tested: 2.7/3.6/3.7/3.9 on Linux/Windows)
Screenshots
Linux/I3
Windows
Motivation
Jupyter exists and is very powerful. But I have always found the interface and workflow awkward. I don't really want a shareable code notebook. I want a prototyping and debugging tool.
As a long-time user of DreamPie, I have grown comfortable with the workflow that it offers, though I have often wished for additional features. Unfortunately, it looks as if all development stopped sometime before 2016, and the last official release was in 2012. I looked into creating a fork to add the features I was interested in, but the effort to modernize (i.e. Python 3) and refactor an unfamiliar and complex code-base was too daunting for me.
So, I decided to start from scratch, and Telepythy is the result.
Installation
At the moment there is no installer available for Telepythy. The easiest option is to use pip
:
$ pip install telepythy
NOTE: This will pull in PySide2, which weighs in at >100mb. I expect the eventual installer to be <20mb.
Usage
Once Telepythy and its dependencies have been installed, you can start the UI with:
$ telepythy
# or
$ python -m telepythy.gui
NOTE: At this early state, it may be helpful to use the --verbose
(-v
or -vv
) flag to track what Telepythy is doing (especially if reporting a bug).
Configuration
Manually editing the configuration file is currently the only way to persist settings. It is saved according the the results of appdirs.user_config_dir()
(e.g. ~/.config/telepythy.cfg
on Linux).
Interpreters
To use Telepythy with a different local Python interpreter, you must create a profile referencing the path of the interpreter in the config file.
To add a different interpreter:
[profile.<profile_name>]
command = <path-to-interpreter>
Remote Service
To use Telepythy with a remote service, you must create a profile to either connect to a remote port, or serve on a port, in the config file.
To add a connect profile:
[profile.<profile_name>]
connect = '<host>:<port>'
To add a serve profile:
[profile.<profile_name>]
serve = '<interface>:<port>'
You can then use the profile by selecting it in the UI, or with the --profile
command-line option:
$ telepythy [-p,--profile] <profile_name>
The remote service can be started using one of the following commands (opposing the profile option used by the UI):
$ telepythy-service --connect '<host>:<port>'
$ telepythy-service --serve '<interface>:<port>'
# or
$ python -m telepythy ...
Embedding
See the <telepythy>/examples
directory from the repository for examples on how to embed the service into existing code.
Documentation
work in progress
Security
To be explicit, there are no security measures in place within Telepythy to secure your source code in transit. The UI controller connects to the embedded service using a regular TCP connection. By default, the UI starts a server listening on localhost and executes a Python process that connects to it. In the future, I may change the default to use UNIX domain sockets on Linux, and named pipes on Windows. However, securing the source code in transit will remain the responsibility of the user.
For connections across machines, I recommend using SSH port forwarding.
Roadmap
Telepythy is very much a work in progress. Here are some features that are planned for future releases (in no particular order):
- Minimal PyPI package for the embeddable service (no dependencies)
- Configuration UI
- Profile configuration UI
- Style/syntax highlighting configuration UI
- Smart copy/paste
- UNIX domain sockets
- Folding for code and output blocks
- Code snippets
- Session import/export
- Embedded documentation
- Platform installers
- Upgrade to PySide6 (QML? snake_case!)
- Localization
- Website/logo
If you have additional feature suggestions, please don't hesistate to create an issue. Note that I work on this project in my free time and I don't expect to work on features that I don't personally find useful. I do, however, welcome pull requests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.