Python Forum
Thread Rating:
  • 5 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Requests
#51
any tutorials who scrapper python with seleium for links website?

i see tutorials but i dont know / understart how work.

sorry my bad english
Reply
#52
Snippsat has examples of selenium applications in his tutorials
see web scraping under tutorials, top 2 threads
Reply
#53
multiprocessing queues!
Reply
#54
To learn basics, I would suggest - Learn Python.
Reply
#55
You can start your software learning journey from thecodelearners.com/python-getting-started/.
Reply
#56
Would like to see a tutorial on threading and maybe an example of where they can be used.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#57
Hey! I'm new here, but I might have a tutorial for submission. It's a YouTube video where I use a bloom filter to construct a small search engine. Does this fit in here? or is there somewhere else on the forum this could be posted?


https://youtu.be/MHatF6Hpm1U
Reply
#58
I'd like to see a tutorial on how to apply OOP and classes to managing GUI applications using tkinter.

Classes and objects make sense to me in terms of the standard examples (a Car class, etc.) Where I lose the connection is trying to make a frame in a tkinter window a class, which several tutorials suggest, and then getting user inputs in that frame and and passing that data to another frame in the same window where it will be used to calculate or retrieve information that will then be displayed in yet another frame.

Simple things like how do you specify the location of a frame when it's a class (I'm using grid placement for all my tkinter stuff) and how do you create it? How do you actually call the various methods that you might create that read the contents or user input and then send it on to the next class for use? I'm not planning on having 2 copies of any specific frame class in the same window but I may have copies of the same frame class in multiple top level windows.

Classes were what I was told to use because in many cases the code to produce the contents of a single frame is the same across several windows.

I'm coming from Java on Android and there a single window is an activity and all the UI pieces (buttons, user inputs, outpur fields, etc.) are available to any code within that window. They all can operate independently.
Reply
#59
Classes work best with tkinter, one reason is the ample use of forward references, for example a button press event,
since all methods become available when the class is instantiated, forward referencing is never a problem.

There are many references to classes with tkinter,
This one by tkinter author: http://effbot.org/tkinterbook/tkinter-classes.htm

I haven't thoroughly reviewed this recent addition, but looks good at a glance: http://zetcode.com/tkinter/

It's useful to download a copy of John Shipmans tkinter reference manual here:
http://reu.cct.lsu.edu/documents/Python_...kinter.pdf

Finally, I'll mention that although it's possible to write large GUI applications with tkinter, it's difficult at best.
I have done it, but it's many times easier with wxpython which is much more robust. There's also Qt (Qt5 being latest version).
However, be aware that large scale commercial applications will probable require a fee.
My personal choice is wxpython.
Reply
#60
(Sep-06-2020, 04:17 PM)Larz60+ Wrote: Classes work best with tkinter, one reason is the ample use of forward references, for example a button press event,
since all methods become available when the class is instantiated, forward referencing is never a problem.
Let's take that as an example. If I have a class that has several tkinter widgets in a specific frame. One of them is a combo box that is disabled and empty except for a placeholder. In another frame I have a button with an onclick event bound to it. When that button is clicked the what I want to have happen is that a database query will be run with parameters from the second frame (where the button I clicked is located) and one of those will update the combobox in the first frame with the applicable choices. In another case I have to read the state of a bunch of checkboxes and based on them add SELECT clauses in a query that will diusplay only certain fields. What I can't find are tutorials on how to implement the actions of read the contents of the first frame and update some of the items based on results in the second frame.

It's the lack of specific detailed examples that I wish were available.

(Sep-06-2020, 04:17 PM)Larz60+ Wrote: Finally, I'll mention that although it's possible to write large GUI applications with tkinter, it's difficult at best.
I have done it, but it's many times easier with wxpython which is much more robust. There's also Qt (Qt5 being latest version).
I eliminated Qt due to licensing issues. It won't work in my application.

Most of the stuff I had found on wxpython indicated it was not particularly robust on Macintosh computers. Since the majority of the users are on a Mac that is a big issue. The app is supposed to work on all 3 major platforms, Mac, Linux and Windows but the focus is Mac first, Linux second and if it works on Windows great. If I am mistaken I'd love some references that have good examples. A lot of what was out on the web that I found initially said it wouldn't work with Python 3.7 but I've since found out that is wrong.

I'm not sure what is considered a large GUI application. I have what I think are fairly simple requirements but maybe I'm wrong about that have several top level windows with various input and output widgets on them. In most cases a single window is self contained, I don't usually need to pass data to another window. There are a coouple of cases where that happens. While the nuts and bolts of what is displayed vary the basic functions do not. User selects a set of display items, and a set of limiting criteria. A query into the database is forumulated from those inputs and the result is displayed in a frame on the window. Further selection of individual records and then applying actions that will edit a single or group of them or writing reports are the other major functions.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020