Skip to content

Instantly share code, notes, and snippets.

@joelburget
Created July 27, 2011 23:13
Show Gist options
  • Save joelburget/1110568 to your computer and use it in GitHub Desktop.
Save joelburget/1110568 to your computer and use it in GitHub Desktop.
Not removing?
filename = os.path.join(os.path.dirname(__file__), \
'../js_css_packages/packages_hash.py')
if os.path.isfile(filename):
print "\n\n\n%s\n\n\n" % filename
os.remove(filename)
# file not removed but prints 'deploy/../js_css_packages/packages_hash.py'
@joelburget
Copy link
Author

filename = os.path.join(sys.path[0],
'../js_css_packages/packages_hash.py')
if os.path.isfile(filename):
print "\n\n\n%s\n\n\n" % filename
os.remove(filename)

same problem, prints '/Users/joelburget/exercises-api/deploy/../js_css_packages/packages_hash.py'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment