0
Hello! I’m reading the book Head First Python and a question arose regarding the creation of module and distribution of it using Windows. Following the author’s guidelines, I created a.py file with a specific def function and saved it to a Desktop folder named Module. Next, I created a setup.py file following the author’s guidelines and saved it in the same Module folder. Thus, there are 2 files inside the Module folder (.py file, with the def and setup.py function). Anyway, the author says that you need to build a distribution by following the steps: Open a terminal window 'inside' the Module folder (How so?? Open terminal inside the folder??), then type the command: python3 setup.py sdist, but I believe he used Linux and said that for Windows it would be "just" replace python3 by: c: Python3| python.exe, which DIDN’T WORK!! That is, there were two holes in this book: the first to say that I open the terminal inside the Module folder and the second with this crazy sequence of commands. Anyway, after I created a new program in IDLE using import Module, I saved in a folder ERROR in the execution saying I did not find the def function I had specified in the Module. I decided to create the.py module in the same folder as the program I had written to call the module with the def function, and IT DIDN’T WORK. Can anyone tell me what’s going on?. Thank you.
follow the codes, both are in the same folder:
py.list import Nester
CAST = ['joão','maria','Jose']
prints(CAST)
Nester.py
def prints(list):
for i in lista:
if isinstance(i,list):
imprime(i)
else:
print(i)