What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-28 16:30:27
python get script name
# Option 1: Works for Python 3.4 + from pathlib import Path Path(__file__).name # ScriptName.py Path(__file__).stem # ScriptName # Option 2: use `os` library import os os.path.basename(__file__) # ScriptName.py os.path.splitext(os.path.basename(... Add solution -
Other 2022-01-22 09:45:11
IndentationError: unindent does not match any outer indentation level
# Error: IndentationError: unindent does not match any outer indentation level # Explanation: # This error usually comes up when you are using a mix of spaces and # tabs for indentation in Python (which is often caused by copy-pasting # code from somewhe... Add solution -
Python 2021-11-20 15:08:16
python inconsistent use of tabs and spaces in indentation
# Error: inconsistent use of tabs and spaces in indentation # Solution: # This error usually comes up when you are using a mix of spaces and # tabs for indentation in Python (which is often caused by copy-pasting # code from somewhere else). To fix, conv... Add solution -
Other 2021-11-16 05:37:27
error: command 'gcc' failed with exit status 1
For python 2.7 sudo yum -y install gcc gcc-c++ kernel-devel sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel pip install "your python packet" For python 3.4 sudo apt-get install python3-dev pip install "your pyth... Add solution
Best helpers
Ranking is empty