python | Unsorted

Telegram-канал python - Python

135201

You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython

Subscribe to a channel

Python

Honestly, idk. I just had my doubts because I don't know decorators very well.

Читать полностью…

Python

why did you think that?

Читать полностью…

Python

the question here is "WHY are you using @classmethod ?"

Читать полностью…

Python

anyone could link me a guide to use decorators? i don't understand when i should use them
this is my case:

class Foo:

elements = []

@classmethod
def _adder(self, new_elements):
self.elements.extend(new_elements)

@classmethod
def _remover(self, elements):
for e in elements: elements.remove(e) # Actually i don't remember exactly the method

def update_elements(self, elements, action):
match action:
case 'add': self._adder(elements)
case 'rmv': self._remover(elements)

the class in brief

Читать полностью…

Python

If you are having issues installing it, post your question in the @pythonofftopic group; there might be people who can help you.

Читать полностью…

Python

Win7 only supports up to version 3.8.10 of Python.

Читать полностью…

Python

Please python 3.8 versiya

Читать полностью…

Python

Setup issues go into @pythonofftopic. And you really should not use a Python version that does not receive any updates any more (unsupported).

Читать полностью…

Python

python.org/downloads

Читать полностью…

Python

the wrong group
please delete your messages

Читать полностью…

Python

Hello everyone, I need a programmer

Читать полностью…

Python

Anyone to help me with a final project idea please?

Читать полностью…

Python

https://www.google.com/search?q=OCR+python

Читать полностью…

Python

In my config.yml file, my project loads this configuration by default. The format follows the documentation of the GitHub project exactly.


api_hash: 1
api_id: 1
chat_id: 1
last_read_message_id: 0
ids_to_retry: []
media_types:
- audio
- photo
- video
- document
- voice
- video_note
file_formats:
audio:
- all
document:
- all
video:
- all

#optional
download_directory: /downloads # Custom directory path for downloads (absolute or relative)
start_date: null
end_date: null
max_messages: null


proxy:
scheme: http
hostname: 127.0.0.1
port: 7897

Читать полностью…

Python

If a personal API doesn't meet your needs, and you find enterprise APIs too cumbersome, you can write automation scripts.

Читать полностью…

Python

you dont need to use classmethod for your example above. classmethod used when you need a function that related to a class but not related with the class data. eg:

class Person:
liver_count = 2
@classmethod
def has_liver(cls):
return True
def remove_liver(self):
if self.liver_count == 1: raise PersonNeedALiverError()
self.liver_count -= 1

Person.has_liver() # to use class method

p = Person()
p.remove_liver()

Читать полностью…

Python

Because, as you can see from my code, the editor methods receive elements from an update method that calls them based on what needs to be done, so I thought they should be preceded by the @classmethod decorator.

Читать полностью…

Python

@Inchidi told me i don't have to use @classmethod but i didn't understood the motivation and so when i should use it and the decorators in general

Читать полностью…

Python

❎ ‎clouded pardoned ‎ㅤ [6468398014] for
1/3: ‎[Python] [Automated] Rule 1️⃣: Speak English.

Читать полностью…

Python

Nothing we can do about it. And it's the other around. Python does not support certain Windows versions.

Читать полностью…

Python

/channel/Python/2241299

Читать полностью…

Python

Read this please:
http://www.catb.org/~esr/faqs/smart-questions.html

Читать полностью…

Python

That's a bit too little to work with.

Читать полностью…

Python

Please pythonn versiya 3.8 windows7 32 bit Please send

Читать полностью…

Python

Do you want to hire someone?

Читать полностью…

Python

This is not a group to discuss project ideas.

Читать полностью…

Python

I am an IT student, currently at level 300

Читать полностью…

Python

i searched but i didn't find something that can help me

Читать полностью…

Python

This is because I'm using proxy software. 127.0.0.1:7890 is the address mapped by the software. My system proxy uses this to access my proxy software, thus accessing websites like Google and YouTube that are restricted in China. My main problem is that while I've configured the proxy correctly and can access Google, Telegram, YouTube, etc., normally, my current GitHub open-source project [telegram_media_downloader] still throws a connection timeout error when starting.

Here are the error details:

C:\Users\micro\Downloads\Compressed\telegram_media_downloader-3.1.0\telegram_media_downloader-3.1.0\media_downloader.py:530: DeprecationWarning: There is no current event loop
updated_config = asyncio.get_event_loop().run_until_complete(
INFO Connecting to 149.154.167.51:443/TcpFull... mtprotosender.py:234[01:56:01] WARNING Attempt 1 at connecting failed: TimeoutError: mtprotosender.py:294[01:56:12] WARNING Attempt 2 at connecting failed: TimeoutError: mtprotosender.py:294

Читать полностью…

Python

The API is divided into personal and enterprise APIs. Personal APIs allow you to send messages to a specific contact via a single link. Enterprise API authorization is cumbersome, so unless you are a company, it is recommended to use the personal API.

Читать полностью…
Subscribe to a channel