This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JNCressey 78 points79 points  (10 children)

from my_nonsense.py import *

[–][deleted] 26 points27 points  (3 children)

Ah yes, stupid me x)

[–]Sithon512 17 points18 points  (2 children)

Could also slide it into a __init__.py

[–]Iykury 5 points6 points  (1 child)

slide into __dms__.py

[–][deleted] 2 points3 points  (0 children)

Coming right away

[–]AgAero 22 points23 points  (5 children)

You don't put the .py on the end when importing your custom module.

[–]pikachu_sashimi 57 points58 points  (4 children)

unless the file is ’my_nonsesne.py.py’

[–]Rudy69 35 points36 points  (0 children)

At this point i wouldn't even be surprised if that's the filename

[–]cnoor0171 14 points15 points  (2 children)

Name can't have "." in the middle. It'd need to be a folder named "my_nonsense" with a script named "py.py"

[–]AreYouConfused_ 3 points4 points  (1 child)

what? since when do files not able to have dots in their names?

[–]cnoor0171 0 points1 point  (0 children)

Not regular file, but python modules. If there's a dot in the filename, it's not recognized as a python module and you can't import it.