# in /a/b/c/d/e/file.py
import os
os.path.dirname(os.path.abspath(__file__)) # /a/b/c/d/e
More Related Contents:
- Finding the number of times characters from text1 occur in text2
- How to convert an XML file to nice pandas dataframe?
- Breaking out of nested loops [duplicate]
- How to adjust padding with cutoff or overlapping labels
- Not letting the character move out of the window [duplicate]
- Reading/parsing Excel (xls) files with Python [closed]
- Truth value of a string in python
- Return in generator together with yield in Python 3.3
- Save classifier to disk in scikit-learn
- pandas groupby without turning grouped by column into index
- Python “raise from” usage
- How to check task status in Celery?
- CSVWriter not saving data to file the moment I write it
- How to make a local variable (inside a function) global [duplicate]
- Float values as dictionary key
- How to pip install a package with min and max version range?
- How to use numpy.genfromtxt when first column is string and the remaining columns are numbers?
- PyOpenGL how do I import an obj file?
- Is there shorthand for returning a default value if None in Python? [duplicate]
- Image overlay in 3d plot using python
- How to prevent automatic escaping of special characters in Python [duplicate]
- How to access to ‘rect’ type element through Selenium-Python
- Why doesn’t django’s model.save() call full_clean()?
- Drop rows with all zeros in pandas data frame
- py2exe fails to generate an executable
- Anti-Join Pandas
- Drop rows on multiple conditions in pandas dataframe
- Remove ends of string entries in pandas DataFrame column
- why is a sum of strings converted to floats
- How to split long regular expression rules to multiple lines in Python