Skip to content

Commit

Permalink
whereis 3.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ConceptJunkie committed Dec 8, 2014
1 parent 04316b4 commit e0ad686
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions whereis.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import platform
import reprlib # prevents barfing on weird characters in filenames
import subprocess
import shlex
import sys
import threading
import time
Expand All @@ -26,8 +27,8 @@
#//******************************************************************************

PROGRAM_NAME = 'whereis'
VERSION = '3.9.9'
COPYRIGHT_MESSAGE = 'copyright (c) 2013 (1997), Rick Gutleber ([email protected])'
VERSION = '3.9.10'
COPYRIGHT_MESSAGE = 'copyright (c) 2014 (1997), Rick Gutleber ([email protected])'

currentDir = ''
currentDirCount = 0
Expand Down Expand Up @@ -212,6 +213,8 @@ def printRevisionHistory( ):
3.9.7: simple exception handling for Unicode filenames
3.9.8: whereis detects Unicode filenames rather than throwing an exception
3.9.9: added /g to turn off filename truncation
3.9.10: changed from os.system( ) to subprocess.Popen( ) which doesn't
block
Known bugs:
- As of 3.9.2, stdout from an executed command (/c) doesn't show up
Expand Down Expand Up @@ -294,21 +297,21 @@ def outputDirTotalStats( absoluteFileName, fileSize, lineCount, attributeFlags )
#// !! - single exclamation point
#// !/ - OS-specific pathname separator
#// !0 - '/dev/null' (or OS equivalent)
#// !D - date (YYYYMMDD) when app was started
#// !O - '>>'
#// !P - absolute path
#// !T - time of day (24-hour - HHMMSS) when app was started
#// !b - base filename (no extension)
#// !c - current working directory
#// !d - date (YYMMDD) when app was started
#// !D - date (YYYYMMDD) when app was started
#// !f - fully qualified filespec
#// !i - '<'
#// !n - OS-specific line separator
#// !o - '>'
#// !O - '>>'
#// !P - absolute path
#// !p - relative path
#// !q - double quote character (")
#// !r - relative filespec
#// !t - time of day (24-hour - HHMM) when app was started
#// !T - time of day (24-hour - HHMMSS) when app was started
#// !x - filename extension
#// !| - '|', pipe character
#//
Expand Down Expand Up @@ -781,7 +784,7 @@ def main( ):
print( blankLine, end='\r', file=sys.stderr )
print( translatedCommand )
else:
os.system( translatedCommand )
subprocess.Popen( shlex.split( translatedCommand ), shell=True )

lineCount = 0

Expand Down

0 comments on commit e0ad686

Please sign in to comment.