Giter VIP home page Giter VIP logo

pym's Introduction

pym (deprecated)

pym extends python -m

pym was going to help with "Editing code. Not text, no Java neither.", so there's a lot of that baggage still around.

install

$ python -m pip install pym

Use

$ python -m pym

And then, e.g.

$ pym pip install requests

Side-effects

pym may abuse your python installation, try in a virtual environment first pym may really mess with your shell. Not recommended for ~/.bashrc, yet

Old stuff

The code stuff was on GitHub, but the good stuff is on ReadTheDocs.

So, like the man said, "bye for now, and thanks for all the fish"

Documentation

pym remained almost entirely vapourware at it's end, but has working code to parse python and bash to noramlised ASTs, then transform, render and edit NSTs, with some late night inspirations added for "good measure".

The coder wants to edit structural entitites (e.g. modules, methods, mocks), not incidentals (e.g. text, files).

The coder doesn't want to write anything at all, they should only need to choose their favourite cliches, algorithms, functions, packages, ...

Travis

Build Status

pym's People

Contributors

jalanb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kostyll

pym's Issues

pyRegurgitator update

Sorry to leave a message here but I didnt find another way to contact you.

You have a nice write-up of AST tools...
I just updated my pyRegurgitator[1] and thought you might be interested.
It nows include a python to XML converter that can be lose-less converted back to python.
I guess it is a better approach to manipulate some kind of XML than AST.

[1] https://github.com/schettino72/pyRegurgitator

alias pym = "python -m"

Given

As a bash user I want to run a python package

When

pym and kat are installed into python

Then

This bash command
python -m kat -h
should be equivalent to
pym kat -h

UI agnostic

pym is UI agnostic, capable of presentation between pipes, on a console, GUI, web page, or directly from Python. Development shall concentrate on Python first, console second, with others trailing. Full use should be made of available visual cues, such as colour, position, movement, ...

pym should be editable by itself

This is a high priority - I do not have a lot of time for coding personal projects such as pym, the sooner it is “good enough” to be usable daily for editing other programs, but quickly fixable, then the more development it will actually get.

Such has been my experience with my dot files - tighter the REPL, the more code gets written

look for the flow of ideas in the iterations of the REPL

An editor should be the first step of a REPL: reading ideas from the coder and passing them on to an evaluator, and incidentally to a disk. It is rarely an end in itself, and should not get in the way of the larger cycle. Hence an editor should be quick, and more efficient of the coder’s time than other factors. pym should look for the flow of ideas in the iterations of the REPL, noting steps such as when tests start to pass, and so development moves on.

Provide template strings for structures

Given

As a pythonista I need to provide fstring templates in method's docstrings, #16

When

There are too many methods, because the grammars are so profuse in their identifications

Then

We should generate templates from the grammars

Write something

Given

As a pythonista I need to write HTML #15

When

I need to write a structured language

So I need template for each language

Then

I should add fstrings (as docstrings?) to each method in a visitor

Write some HTML

Given

As a Python dev I need to write some HTML

When

HTML is too horrible for editting in vim

Then

I should use Python to wite HTML instead

each structure in the tree uses its own specialised sub-editor

pym is inherently a modal editor, and one is not directly editing plain text. Some parts of the program will look more like plain text than others, e.g. names. But each structure in the tree uses its own specialised sub-editor, e.g. there is a different editor for an else branch than for a function definition than for a function. pym should transition between such editors unnoticeably to the user, not needing any “start loop here” instructions, although they could be explicitly given. Command/insert mode might toggle on the CAPS LOCK key.

Capture a snapshot from a flow of ideas the coder has

Structured text is ever a snapshot from a flow of ideas the coder has about the program being created. On a good day the ideas flow toward some runnable tree which works, but on a bad day they chase around random forests, crashing blindly into insects. It is important to store correct program text, more important to grasp ideas behind that text, and most important to grok the flow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.