Is there a better way to print __file__ without the extension?
import os
print os.path.splitext(__file__)[0]
You can use string.split, but what's the point? The standard library is giving you the exact tool you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With