aakarsh / pyp Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/pyp
Automatically exported from code.google.com/p/pyp
Interesting project which I'm eager to try out. Looking at the docs I see
several examples of long-form command-line options which have words separated
by underscores, such as --macro_save.
This is a bit jarring because all (or almost all) of the tools I have used
separate such words with dashes instead. Since dashes are common on the unix
command-line they are committed to muscle memory, not to mention underscore
requires the shift key (at least on US keyboards).
It can only help the tool to follow this higher efficiency convention. For
example the ls --help command:
-a, --all
-A, --almost-all
--block-size=SIZE
-B, --ignore-backups
...
Original issue reported on code.google.com by [email protected]
on 17 Mar 2012 at 9:36
I have submitted pyp to Fedora
(https://bugzilla.redhat.com/show_bug.cgi?id=805332) but there is no copyright
notice or license in the source code. This prevents it from being accepted by
Fedora (and probably most other distros). The website says it is the New BSD
License, but this would need to be in the source code too to meet the
requirements of Fedora.
Can a copyright notice and license be put in the source code?
Original issue reported on code.google.com by [email protected]
on 23 Mar 2012 at 2:58
Using a logic filter,
$ for i in 1 2 3 4 5; do echo "$i $i"; done | pyp "(int(w[0])+int(w[1]))>5"
3 3
4 4
5 5
works as expected: it shows only lines whose columns sum to greater than 5.
Likewise with "(int(w[0])+int(w[1])>5)". However, removing the outer
parentheses produces an unexpected result:
$ for i in 1 2 3 4 5; do echo "$i $i"; done | pyp "int(w[0])+int(w[1])>4"
1
2
3
4
55 5
This is equivalent to the output with "int(w[0])+(int(w[1])>4)": I think it is
treating int(w[1])>4 as a logic filter and concatenating its result with the
value of int(w[0]). In any case, if this is the intended behavior, it should
probably be documented because it differs from Python's operator precedence
rules.
Original issue reported on code.google.com by [email protected]
on 26 Mar 2012 at 11:19
I ported this to cywgin python and included a 'bs' for backslash token.
Keep up the great work!
See attached.
What version of the product are you using? On what operating system?
python 2.6 on windows xp, cygwin
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 11 Mar 2012 at 7:54
Attachments:
It would be useful to have a split/join variable
<code>t</code>/<code>tab</code> serving as the equivalent of
<code>p.split('\t')</code> or <code>'\t'.join(p)</code>.
Original issue reported on code.google.com by [email protected]
on 26 Feb 2012 at 7:16
What steps will reproduce the problem?
1. Install on OSX with Python 2.5.2
What is the expected output? What do you see instead?
running pyp produces error: importError: no module named json
What version of the product are you using? On what operating system?
OSX, python 2.5.2
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 29 Aug 2011 at 5:05
How do you install pyp?
I did:
$ pip install pyp
But it looks like pyp is not on PyPI. Maybe you guys should upload pyp to PyPI.
Original issue reported on code.google.com by [email protected]
on 8 Oct 2011 at 12:51
What steps will reproduce the problem?
1. shell out a command to the terminal that uses a systems aliased command
2.
3.
What is the expected output? What do you see instead?
"command not found"
What version of the product are you using? On what operating system?
linux, curent
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 22 Feb 2012 at 2:12
I often need to make line-by-line modifications to large files (1,000,000 lines
or more), but pyp is not currently suited to this as it reads in the complete
input before producing output. Would it be possible to add a mode for pyp that
produces line-by-line output without loading the entire file at once? Obviously
this would prohibit some operations, such as those involving 'pp', but much
useful functionality would remain.
Original issue reported on code.google.com by [email protected]
on 4 Mar 2012 at 2:42
pyp --manual --turn_off_color
is colored while it shouldn't
Problem is that reassignment of class Colors to NoColors is done after class
Docs is defined.
One quite non intrusive solution is to modify Docs.manual as such so that
manual text is evaluated only when called:
$ diff -u /usr/bin/pyp pyp
--- /usr/bin/pyp 2012-04-04 22:02:16.000000000 +0200
+++ pyp 2012-04-19 00:23:44.183598728 +0200
@@ -1390,7 +1390,7 @@
'''
if options.manual:
- print Docs.manual
+ print Docs().manual()
sys.exit()
if options.unmodified_config:
@@ -1476,7 +1476,8 @@
class Docs():
- manual = '''
+ def manual(self):
+ return '''
===================================================================================
PYED PIPER MANUAL
Original issue reported on code.google.com by [email protected]
on 18 Apr 2012 at 10:27
pyp should not assume that whitespace is irrelevant. It could do so with a
--strip option perhaps, but it should not be the default as it leads to
surprises.
What is the expected output? What do you see instead?
$ echo -e '1\n\n2\n3' | ./pyp
1
2
3
I expect the same as `cat` would do:
$ echo -e '1\n\n2\n3' | cat
1
2
3
Original issue reported on code.google.com by [email protected]
on 25 Mar 2012 at 7:00
That will make it easier to install.
Original issue reported on code.google.com by [email protected]
on 11 Mar 2012 at 1:23
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.