Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: pyserial/serial "has no attribute 'Serial' "
Post: RE: pyserial/serial "has no attribute 'Serial' "
Maybe there was a file named serial.py next to your script. In this case, Python imports this instead from site-packages. |
|
DeaD_EyE |
General Coding Help |
9 |
567 |
Aug-24-2023, 07:18 AM |
|
|
Thread: Help with chaos function
Post: RE: Help with chaos function
eval is lesser evil than exec.
eval should only evaluate Literals.
exec can import and execute code.
eval is used in Jinja2 to fill the templates with data because it's faster than dispatching the d... |
|
DeaD_EyE |
Homework |
11 |
965 |
Aug-23-2023, 09:02 AM |
|
|
Thread: Python rule about the space character surrounding the equal sign
Post: RE: Python rule about the space character surround...
(Aug-22-2023, 08:06 PM)ineuw Wrote: Thanks for the suggestion. "Black" is excellent, but had to revert the double quotes to single. Everything is in single quotes in the context of my use.
It depend... |
|
DeaD_EyE |
General Coding Help |
10 |
706 |
Aug-23-2023, 08:32 AM |
|
|
Thread: Microsof announced Pyhon in Excel
Post: RE: Microsof announced Pyhon in Excel
Better late, than never, but I refuse to use MS Office.
LibreOffice is good enough and also supports Python.
Edit: I admit, it looks better as the integration of Python in LibreOffice. Hopefully, thi... |
|
DeaD_EyE |
News and Discussions |
3 |
490 |
Aug-23-2023, 08:23 AM |
|
|
Thread: Help with conversion to exe
Post: RE: Help with conversion to exe
Create a new clean venv and install in your venv only auto-py-to-exe and the required dependencies of your program (pandas).
Some packages could cause trouble with PyInstaller.
The tool auto-py-exe u... |
|
DeaD_EyE |
General Coding Help |
3 |
316 |
Aug-21-2023, 10:39 AM |
|
|
Thread: Can you recommend me a vps that will run api python code?
Post: RE: Can you recommend me a vps that will run api p...
You can install any kind of software on a Virtual Private Server.
But then you are, for everything you do, responsible.
Or do you mean a managed Server (virtual or dedicated) or Webspace which could ... |
|
DeaD_EyE |
News and Discussions |
2 |
529 |
Aug-16-2023, 08:17 AM |
|
|
Thread: Trying to find the next prime number
Post: RE: Trying to find the next prime number
sympy has an implementation in pure python with some math tricks.
You can find them here: https://github.com/sympy/sympy/blob/b7a7...14-L522C14 |
|
DeaD_EyE |
Homework |
8 |
1,055 |
Aug-11-2023, 08:56 AM |
|
|
Thread: Python Struct Question, decimal 10, \n and \x0a.
Post: RE: Python Struct Question, decimal 10, \n and \x0...
(Aug-11-2023, 06:39 AM)3python Wrote: Why is decimal 10 appearing as \n and not \x0a ? It is after all hex value \x0a.
Python replaces known ASCII characters with their representation as Escape Sequ... |
|
DeaD_EyE |
General Coding Help |
2 |
336 |
Aug-11-2023, 08:34 AM |
|
|
Thread: dictionary insertion order
Post: RE: dictionary insertion order
If you also want to compare with insertion order, then use an OrderedDict.
from collections import OrderedDict
dx = {}
dx["a"] = 1
dx["b"] = 2
dx["c"] = 3
dy = {}
dy["c"] = 3
dy["b"] = 2
dy["a"] = ... |
|
DeaD_EyE |
News and Discussions |
2 |
424 |
Aug-09-2023, 07:29 PM |
|
|
Thread: Empty default value for tkCalender
Post: RE: Empty default value for tkCalender
I guess you want Calendar().selection_clear().
from tkinter import Tk, Button, StringVar
from datetime import date
from tkcalendar import Calendar
def calendar_selected(event):
selected_date =... |
|
DeaD_EyE |
GUI |
2 |
407 |
Aug-08-2023, 12:08 PM |
|
|
Thread: Problem trying to install UniCurses on Python-3.12 / W10-64
Post: RE: Problem trying to install UniCurses on Python-...
For modern console applications you could use rich and https://textual.textualize.io/
Edit: deanhystad was faster |
|
DeaD_EyE |
General Coding Help |
5 |
368 |
Aug-02-2023, 06:24 PM |
|
|
Thread: Pip install problem with Python 3.7, not 3.9
Post: RE: Pip install problem with Python 3.7, not 3.9
If Python 3.9 was compiled, you need libopenssl.
https://github.com/pyenv/pyenv/wiki#trou...oting--faq
sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadlin... |
|
DeaD_EyE |
General Coding Help |
2 |
358 |
Aug-02-2023, 08:45 AM |
|
|
Thread: Problem trying to install UniCurses on Python-3.12 / W10-64
Post: RE: Problem trying to install UniCurses on Python-...
I haven't tried it, because I do not use Windows.
I was able to extract the Data from the exe file with binwalk.
Command:
binwalk ../Downloads/UniCurses-1.2.win32.exe -eResult: https://filetransfer.... |
|
DeaD_EyE |
General Coding Help |
5 |
368 |
Aug-02-2023, 08:21 AM |
|
|
Thread: elif not responding on print
Post: RE: elif not responding on print
The order was right, but your comparison is greater than, so the number must be bigger.
Changed the operator to greater equal than.
while True:
grade = int(input("Enter the Grade: "))
if gra... |
|
DeaD_EyE |
General Coding Help |
3 |
477 |
Jul-20-2023, 09:51 AM |
|
|
Thread: Convert File to Data URL
Post: RE: Convert File to Data URL
There are many mime-type for the same extension. I found this: https://www.wikidata.org/wiki/Q105852795
You need the mime-type, what your application expects. If the application requires "application... |
|
DeaD_EyE |
General Coding Help |
3 |
399 |
Jul-08-2023, 11:35 AM |
|
|
Thread: What is all the info in the info window in Idle?
Post: RE: What is all the info in the info window in Idl...
Not all classes do have a dict. If the classvariable __slots__ is used, then only the names from the supplied sequence are available and there is no __dict__. This is used to save memory. If you have ... |
|
DeaD_EyE |
General Coding Help |
3 |
304 |
Jul-08-2023, 11:26 AM |
|
|
Thread: What is all the info in the info window in Idle?
Post: RE: What is all the info in the info window in Idl...
Python has a rich data-model: https://docs.python.org/3/reference/data...-and-types
Some methods and attributes are created automatically.
For example, you can add the ability of comparison to your c... |
|
DeaD_EyE |
General Coding Help |
3 |
304 |
Jul-07-2023, 08:53 AM |
|
|
Thread: Why am I getting this TypeError Exception?
Post: RE: Why am I getting this TypeError Exception?
If I use VSCode, then, after a change, I press notoriously CTRL+S to save the changes. Just pressing the play button, starts the unmodified file.
PyCharm is different. All changes are written directl... |
|
DeaD_EyE |
General Coding Help |
8 |
517 |
Jul-07-2023, 08:26 AM |
|
|
Thread: Installing Python 3.8.11 from TGZ File
Post: RE: Installing Python 3.8.11 from TGZ File
If you want to compile Python on Windows for Windows, you need all build-dependencies.
I guess the easiest way is the use of Visual Studio Community Edition to compile Python, but you can do it also w... |
|
DeaD_EyE |
General Coding Help |
2 |
441 |
Jul-07-2023, 08:21 AM |
|
|
Thread: Regular Expression
Post: RE: Regular Expression
Regex is not a good tool to parse HTML. I can't find the source, but someone mathematically proofed, that HTML is not parsable by regex.
You could use BeautifulSoup to parse HTML.
from bs4 import Bea... |
|
DeaD_EyE |
Data Science |
9 |
884 |
Jul-05-2023, 01:18 PM |