+ 2

Questions about packaging and modules etc.

Hi. I've done python course without understanding last season : packaging. And have some questions about that. I have to say that searching the web didn't solve my problem and made me more confused. 1- how to import modules made by myself? I have two files named "real.py" and "executor.py" in "real" I defined function "print(x)" that prints string of x. And executor includes "import real" and an input line and "real.print(input)" . When I run executor it says "no module named real". 2- what does "__init__.py" do? 3- what does "__main__.py" do? 4- give me a site or something to yeah me how to make package for pypi.(real python was my best reference but I couldn't understand that too.) 5 - (I know it's duplicate) what is best python GUI maker to build modern GUIs? 6 - how to extract some piece of codes from pages? Sorry for bad English(any help to improve my English will be appreciated ;) ) And thanks! EDIT: I'm using pycharm

12th Sep 2019, 4:10 PM
Dark_Assassin
Dark_Assassin - avatar
11 Respostas
+ 1
1-I think you need to put your modules in a folder then, import them from it 5-If you want to make UI there are many gui modules(e.g: tkinter (already installed), turtle, pygame, PyQt5, kivy ...) 6-Do you mean run code from a website?
12th Sep 2019, 5:15 PM
Sousou
Sousou - avatar
+ 1
They are in folder c:\users\myuser\pycharm projects\untitled\new -------- Which framework is the best? -------- No. I want to extract a piece of code from webpage. Example : if there is a music playing in this page, surly there is an music link in page's source code. I want to extract this music!
12th Sep 2019, 5:24 PM
Dark_Assassin
Dark_Assassin - avatar
+ 1
What do you mean from "code file"? ------- Yes. I wanna get link of music
12th Sep 2019, 6:43 PM
Dark_Assassin
Dark_Assassin - avatar
+ 1
Isn't there any answer?
13th Sep 2019, 6:08 AM
Dark_Assassin
Dark_Assassin - avatar
+ 1
I read all of them before. Maybe I have to read them again. And about packaging, even when I searched python didn't found it. Thanks for your answer
13th Sep 2019, 8:01 AM
Dark_Assassin
Dark_Assassin - avatar
0
tkinter(&turtle) are easy and already installed, pygame is good(im learning it), PyQt5 is a popular module but I didnt try it
12th Sep 2019, 5:28 PM
Sousou
Sousou - avatar
0
Is your code file in C:\users\myuser\pycharm projects\untitled\ ?
12th Sep 2019, 5:29 PM
Sousou
Sousou - avatar
0
I mean the main file (the file you run)
13th Sep 2019, 7:04 AM
Sousou
Sousou - avatar
13th Sep 2019, 7:25 AM
Sousou
Sousou - avatar
13th Sep 2019, 7:31 AM
Sousou
Sousou - avatar
- 1
Do you mean with extract music; get the link of music?
12th Sep 2019, 5:43 PM
Sousou
Sousou - avatar