python-3.x

Reading text from the TextEdit widget field from pyqt5 Python

In a Python 3.7.4 program using PyQt5, there is a problem with reading text from the text field of the TextEdit widget. Pleas ... (_translate("MainWindow", "PushButton")) def copy_text(self): text = self.textEdit.text() print(text)

The code of the game "Guess the number" for the bot in TG Python pytelegrambotapi does not work

I can not write the code for the game guess the number for the bot, I write the code in a separate file(not the main one), so ... o/rGqLb2c In the console, this is: https://ibb.co/pJLp2SF Help me to finalize the game that would work, thank you in advance!

Python, smooth out the corners of a graph constructed using matplotlib

Help me bring the graph to a more interpolated form, if I can say so, that is, I have 5 points on the graph that are connecte ... find intermediate values, but how will it find it if my function doesn't take float values, thus outputs the error My code

TypeError: 'module' object is not callable when calling zipfile

I'm doing a task from the book A byte of python, and there, after this code, without examples, it says " Write this code usin ... ommand) == 0: print('Резервная копия успешно создана в ', target) else: print('Создание резервной копии не удалось')

Configuring Sublime Text 3 for Python 3

I decided to switch to Sublime and faced the following problem. Installed packages: Python3 Sublime PuthonIDE All Autocompli ... gram files\dotnet;c:\program files\nvidia corporation\nvidia nvdlisr;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common]

Given a positive integer "target". A sequence of positive integers is also given. It is necessary to write "1" to the output file if

Problem condition: given a positive integer "target". A sequence of positive integers is also given. It is necessary to write ... problem in another way, or to optimize my solution as much as possible (I would like to see the code)? Thank you in advance.

Even Fibonacci numbers. The Euler Project

What is my mistake? I am trying to create a list of all the even Fibonacci numbers, but there are also odd numbers in my list ... mbers ''' for num in numbers: if (num % 2) != 0: numbers.remove(num) print(numbers) filter()

Remove noise from photos for further text recognition

You need to recognize the text using Python. My choice was the library pytesseract, but it just does a terrible job if there ... ow to filter such photos, which libraries are worth paying attention to, or what materials I should look for on the Internet.

Get nested dictionary values from EXMO's JSON in Python

Right away: I can scribble programs, but mostly G-code... I decided to improve the trade bot a little here... When receiving ... ew_a it turns out to be just a string, instead of the expected dictionary (tuple...) , click where to dig or how to fix it...

Python 3. Help solve the problem

Hello everyone. I came across it in the tutorial " How Python works. Matt Harisson " on the exercise: Create a name variable ... it's easier for me to learn from examples. Fellow experts, please show me how to implement this task in working code. Thanks.

How does sort values work for multiple columns in Pandas?

There is a DataFrame that can be sorted using df.sort_values(by = 'Name'), where Name is the name of the column by which we s ... ne', 'two']) How do we get this? one two three 2 1 2 3 1 1 3 4 3 1 4 2 0 2 1 5

"pyinstaller" is not an internal or external command, executable program, or batch file

Upd2:Here is what it writes after entering in PATH upd: Changed the path to pyinstaller, tried to use it. Still the same pr ... h file. In the folder with the scripts, pyinstaller is installed I don't understand what the problem is, I need your help

Combine python (gui) and C++

I have a program that works with files, everything is ready except for the interface, I could easily finish it in C++, but th ... is running out. Is it possible to make an interface in Python, and functions in C++? Well, somehow from Python to call them?

How to parse images from a website gifer.com?

I need to parse a picture or rather a gif and download it, and if this is not possible, then parse its url or path to it, the ... s/loading") soup = bs(r.content, 'lxml') img = soup.find('picture', class_='preview-media preview-media_loaded') print(img)

Is there a difference between quit and exit?

The type function shows that quit and exit are the same object: print(type(quit), type(exit)) # <class '_sitebuiltins.Qui ... to exit", and when called, raise SystemExit with the specified exit code. But there must be a difference, right?

How do I find out how much time is left until the new year?

How can I find out how many days are left until the new year on. Python programming language? In numeric format, so that you can display this message on the screen: how many days are left until the new year.

Rename all files in a folder-Python

I need to be able to select a folder(I use the interface on tkinter) and the program will rename all the files no matter how ... ng to 200. png, or vice versa, the user needs porridge(I will deal with this if I understand at least how to do what I asked)

readline () does not read the first line (python)

I need to write a program that reads text from a file (there can be more than one line in the file) and outputs the most freq ... t_line = set(line) for i in set_line: if i in line: data[i] = line.count(i) print(data)

Python: Adding an item to a list in a JSON list

I have a JSON file: { "Chats": [ { "id": "321", "users": [ { ... "sex": "2", "urltovk": "https://vk.com/id1232" } ] } ] }