pss v0.33 released

October 21st, 2011 at 3:35 pm

Last week I announced the first public release of pss – a tool for searching inside source code.

pss generated quite a lot of interest, and for the past week I spent a considerable portion of my hobby hacking time solving bugs and adding requested features. So today I’ve made pss version 0.33 available (also on PyPI).

Here is the list of changes for this release (the issue numbers refer to the issue tracker of pss):

  • Issue #7: allow simple invocation of pss without installing, by directly passing the source directory to a Python interpreter.
  • Fixed a problem with the max-count option that was broken in some cases.
  • Fixed some encoding issues, and better handling of non-ASCII files when running on Python 3 (also reported in Issues #10 and #12).
  • Issue #2: pss will now ignore broken symlinks (won’t list them or try to read them).
  • Issue #5: When the output of pss is redirected, by default colors won’t be applied (unless forced with –color).
  • Issue #6: Support -l and -L options (only show files with/without matches)
  • Issue #8: When Ctrl+C is hit, print a succinct error message instead of the full stack trace.

I have an intention to keep pss well maintained and running smoothly, so if you bump into any problems or just want to suggest a cool new feature, feel free to open an issue.

Related posts:

  1. pss v0.34 released
  2. pycparser v1.06 released
  3. Announcing pss: a tool for searching inside source code
  4. pyelftools – Python library for parsing ELF and DWARF
  5. Creating Python extension modules in C

7 Responses to “pss v0.33 released”

  1. justinNo Gravatar Says:

    Very cool. My thanks to you Eli for making me aware of ack (and by extension pss). What would be a really cool is a pattern refactoring feature. Maybe you can one up ack and make pss contain a super sed module too?

  2. elibenNo Gravatar Says:


    Could you be more specific? I’m not sure what you mean by “a pattern refactoring feature”.

  3. justinNo Gravatar Says:

    My apologies for not being clear (a lazy & mortal sin imo;). I was referring to a refactoring feature that would, like sed, substitute all occurrences of a target pattern for another given string. For example, the following could replace all Connection.* with ServiceConnection.* in a project:

    pss –refactor –in-place “/Connection(.*)/ServiceConnection\1/” –type=noperl

  4. elibenNo Gravatar Says:


    Interesting idea, I didn’t consider it. Would it be different from using pss to find the interesting files and then pipe the file list to sed for the replacement? Or just shorter?

    Anyway, feel free to add it as a feature request on the pss bitbucket site.

  5. justinNo Gravatar Says:

    Hey Eli,

    I added a feature request to the project site. Just using pss to pipe files to sed is fine, but it does mean we have to switch to POSIX regexes when respecifying our pattern for sed.

    I’ve been wondering though whether this feature goes against the Unix way of using one tool to do one job. Arguably it does; but the feature would just be so useful. Would be interested in hearing what anyone thinks.

  6. bryaneNo Gravatar Says:

    I will have to try pss – I use ack or (being somewhat older in the force :) cscope. I think pss fits more with cscope than ack, but I’ll have to explore it a bit more.

  7. elibenNo Gravatar Says:


    I also use cscope occasionally – I think the two tools are quite orthogonal.

Leave a Reply

To post code with preserved formatting, enclose it in `backticks` (even multiple lines)