Skip to content

Commit

Permalink
add ref
Browse files Browse the repository at this point in the history
  • Loading branch information
pengyuwei committed Jan 9, 2013
1 parent ed5b21e commit 04cbadd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions where.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Copyright 2012 Toyshop Studio
# All Rights Reserved.
# Author: YuWei Peng <pengyuwei@gmail.com>
# Author: Peng YuWei <pengyuwei@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
Expand All @@ -20,20 +20,20 @@
import sys
import time
import os


def show_path(m):
try:
print __import__(m).__file__
except:
print "not found."

def main():
if len(sys.argv) == 2:
moudle = sys.argv[1]
show_path(moudle)
else:
print "where <python-moudle name>"

if __name__ == '__main__':
main()

0 comments on commit 04cbadd

Please sign in to comment.