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
hi, how can I make the program copy itself to startup?
Читать полностью…
Syntax error in D:\PYTH\pyt\Students.py
File "D:\PYTH\pyt\Students.py", line 1
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
This group is to help you on specific issues you have on YOUR code, so you have to show the code you wrote and explain where and why you are stuck... as simple as that
Читать полностью…
Hello
Could someone assist me with a code that can automatically insert a recipient's email address into a login page link within a mass marketing email?
For instance, something like www.example.com/(insert recipient email here)
This way, when recipients click the link, it opens our business login page with their email address pre-filled, so they only need to enter their password to sign in. Hope that makes sense!
Python really doesnt have anything to do with it. Just figure out the networking
Читать полностью…
I use aiohttp, the problem occurs when I make a request from the docker, if I run it natively (not in the container, then everything is OK), help
Cannot connect to host 169ac7100590:443 ssl:default [Connect call failed ('172.18.0.2', 443)]
Читать полностью…
One is inheriting from another class and calling the parents initializer. The other does not inherit from another class and hence also doesn't call the parents initializer.
Читать полностью…
hello. can anyoune please explain to me a basic python? how do i declare a class with a single variable? why exactly code below fails???
why exactly the first code works and second fails?????
works:
class TestClass:
def __init__(self, a1, a2):
self.var_a1 = a1
self.var_a2 = a2
class SBot(telegram.Bot):
def __init__(self, token, a1):
super().__init__(token)
self.var_abc = a1
self._var_abc = a1
Hey!
I’m using the cs1robots Python module to teach myself some programming concepts. Basically, I write algorithms to control a robot in a grid world to solve different "world" problems.
Here’s the deal:
I have to solve each world problem in separate modules.
Then, I need to write a master script to run each solution one by one.
The problem is, cs1robots doesn’t have any way to close the grid windows automatically, so when I run everything with subprocess, all the windows just stay open. It gets messy fast!
I’m looking for any tips on how to close each window as soon as a solution finishes running so the next one can start fresh. If anyone has ideas, I’d appreciate the help!
Thanks!
Have you read what it says
It tells you how to fix it
Using error handling (try-except) is useful everywhere in your program
Just be sure to use it correctly, and not catch all errors, but the one you expect
Using try and except when taking user input is useful for preventing crashes. ??
You can use "pycharm community edition" if you finding for an IDE.
Читать полностью…
🚫 Charly banned Gordon [7813307847].
Reason: [Python] spam
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://dpaste.org, https://hastebin.com, https://bin.kv2.dev or your favorite one!
Читать полностью…
This is not a Python specific question, please delete your offtopic message, move to @PythonOfftopic and ask there.
Читать полностью…
I've used Tailscale for several years w/ great success
Читать полностью…
Hello everyone, I have a problem how to make a p2p connection between two phones if they are behind NAT (Full cone) without a server, because I am doing it for testing so I can manually enter the IP, so as far as I know NAT generates a new port for each connection and I can’t do it, any ideas? (if anything i use a translator)
Читать полностью…
Sounds more suitable for @pythonofftopic, since your issue seems to be related to Docker.
Читать полностью…
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase.
This is not a Python specific question, please delete your offtopic message, move to @PythonOfftopic and ask there.
Читать полностью…
So, people, listen... if you're writing Python code but at the end you're coming to ask how to compile it, how to hide the code, how to make a single executable (make a .exe file 🙄), or things like those, it means you don't know what you're doing, because that's not how Python works, that's not the way you should run your Python scripts, if you wanna do those things then change your programming language.
Yes, there are tools that make Python code to be one executable (compile it, convert to .exe, call it whatever you want) but, if you use them, it means you really know what you're doing and you won't be here asking how to achieve that task, otherwise just use other programming language.
If you're using Python to write code, you should know how it works and how to run your scripts without bloating them with unnecessary stuff.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
how to fix? debian 12
which IDE are you guyz using for python , which is more user friendly and easy to use
Читать полностью…
You can't use tkinter, but you can use kivy. As of pyside and pyqt; i have no ideal, i know that the c++ binding of qt allows mobile development but i am not sure of the python bindings
Читать полностью…