Coder Social home page Coder Social logo

pyp's People

Contributors

thepyedpiper avatar

Watchers

 avatar

pyp's Issues

long options should separate words with dashes, not underscores

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

copyright and license not in source code

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

unexpected parsing of addition/comparison expression

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 to cygwin python

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:

Trying to install on Python 2.5.2

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?

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

Aliased Commands Don't work in conjunction with | sh

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

Support for line-by-line operations on large files

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

--manual doesn't respect --turn_off_color

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

lines are stripped and ignored if empty

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

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.