Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: .py pandas matplotlib .xlsx files
Post: RE: .py pandas matplotlib .xlsx files
Cross-posted at StackOverflow
For start I can repeat what I commented there as well
Quote:Keep adding [hardcoded and seemingly random] file names manually into categories is recipe for disaster. Use ... |
|
buran |
General Coding Help |
1 |
103 |
Yesterday, 09:38 AM |
|
|
Thread: Storing version of the downloaded libs using json file
Post: RE: Storing version of the downloaded libs using j...
IMHO, the best for this task would be using a database. Python comes with native support for sqlite. As of version 3.24.0 (2018-06-04) INSERT/UPDATE (a.k.a UPSERT) support was added, making it even ea... |
|
buran |
Homework |
3 |
150 |
Mar-21-2023, 07:50 AM |
|
|
Thread: Storing version of the downloaded libs using json file
Post: RE: Storing version of the downloaded libs using j...
I have strong doubts that this is some sort of homework assignment. There was virtually the same question on StackOverflow today
|
|
buran |
Homework |
3 |
150 |
Mar-20-2023, 05:09 PM |
|
|
Thread: Trying something that may not be possible?
Post: RE: Trying something that may not be possible?
I addition to @ndc85430 comment - in the other thread I suggested using regedit via subprocess because you were not satisfied with other available options to work with Windows Registry.
What prevents ... |
|
buran |
General Coding Help |
8 |
368 |
Mar-17-2023, 06:44 AM |
|
|
Thread: Read complete windows registry?
Post: RE: Read complete windows registry?
You can always use regedit via subprocess
import subprocess
subprocess.run(['regedit', '/e', r'c:\AllRegistryEntries.reg'])Code not tested. |
|
buran |
General Coding Help |
3 |
273 |
Mar-15-2023, 08:14 PM |
|
|
Thread: Read complete windows registry?
Post: RE: Read complete windows registry?
https://www.google.com/search?q=python+read+registry |
|
buran |
General Coding Help |
3 |
273 |
Mar-15-2023, 06:40 PM |
|
|
Thread: working with TLV module Object
Post: RE: working with TLV module Object
The entries in final_output are of type tlv8.Entry. There is dataattribute to access the values you want. Now the conversion is bit cumbersome, it's interesting why e.g. last two entries are tlv8.Data... |
|
buran |
General Coding Help |
3 |
339 |
Mar-14-2023, 07:44 AM |
|
|
Thread: Import Modules
Post: RE: Import Modules
(Mar-10-2023, 03:32 PM)TheBunyip Wrote: Buran: Please explain "Read the docs"It literally means "read the documentation"
Starting with the docs for modules in python standard library. Of course, the... |
|
buran |
General Coding Help |
4 |
488 |
Mar-10-2023, 04:47 PM |
|
|
Thread: Another one
Post: RE: Another one
There are plenty of problems with this code, apart from obvious missing colon that cause this error right now. |
|
buran |
General Coding Help |
2 |
287 |
Mar-07-2023, 08:10 PM |
|
|
Thread: Import Modules
Post: RE: Import Modules
First of all, you don't pass arguments to modules. Probably you mean what functions and classes you can use from imported module and what arguments to pass when using the said functions or class from ... |
|
buran |
General Coding Help |
4 |
488 |
Mar-07-2023, 05:38 PM |
|
|
Thread: What Is this Error?
Post: RE: What Is this Error?
In if statement you want comparison ==, not assignment = |
|
buran |
General Coding Help |
5 |
431 |
Mar-04-2023, 04:53 AM |
|
|
Thread: Pymodbus read and save to database
Post: RE: Pymodbus read and save to database
for i in range(len(meters)):
sql = ("INSERT INTO meter (meter, power, energy, date_of_reading) VALUES (%s, %s, %s, %s)",
(meters[i], power_calculation[i], energy_calculation[i], date_of_readin... |
|
buran |
General Coding Help |
3 |
317 |
Mar-02-2023, 09:14 AM |
|
|
Thread: [ESP32 Micropython]Total noob here, I don't understand why this while loop won't run.
Post: RE: [ESP32 Micropython]Total noob here, I don't un...
(Feb-28-2023, 06:27 PM)wh33t Wrote: Originally I tried while while !station.scan(): but I don't think that's valid python.It should be
while not station.scan(): |
|
buran |
General Coding Help |
9 |
293 |
Feb-28-2023, 07:00 PM |
|
|
Thread: [ESP32 Micropython]Total noob here, I don't understand why this while loop won't run.
Post: RE: [ESP32 Micropython]Total noob here, I don't un...
in python 2 print was a statement, in python3 it's a function and you need them for function call |
|
buran |
General Coding Help |
9 |
293 |
Feb-28-2023, 06:05 PM |
|
|
Thread: [ESP32 Micropython]Total noob here, I don't understand why this while loop won't run.
Post: RE: [ESP32 Micropython]Total noob here, I don't un...
If you are using python 3, this line print "Waiting for Wifi..." should be print("Waiting for Wifi...") |
|
buran |
General Coding Help |
9 |
293 |
Feb-28-2023, 05:55 PM |
|
|
Thread: I am confused with the key and value thing
Post: RE: I am confused with the key and value thing
Yes, it does - each name is key and corresponding response - value in the dict |
|
buran |
General Coding Help |
3 |
298 |
Feb-22-2023, 06:50 AM |
|
|
Thread: My First App
Post: RE: My First App
https://github.com/Bcopeland64/IU-Habit-.../db.py#L26
DELETE CASCADE //added ON DELETE CASCADE to delete the related entries in completions when a row in habits is deletedThe "comment" is not valid S... |
|
buran |
Code Review |
7 |
548 |
Feb-16-2023, 11:20 AM |
|
|
Thread: My First App
Post: RE: My First App
(Feb-15-2023, 05:46 PM)BCopeland64 Wrote: Also, can you suggest a better way to iterate over the copy of the list rather than changing it as you mentioned?
Compare
spam = [1, 2, 2, 3]
for item in ... |
|
buran |
Code Review |
7 |
548 |
Feb-15-2023, 07:21 PM |
|
|
Thread: How do I instantiate a class with **kwargs?
Post: RE: How do I instantiate a class with **kwargs?
(Feb-15-2023, 04:21 PM)deanhystad Wrote: Consider not doing that. What is your use case for a class that creates different instance attributes based on the named arguments passed to __init__()?
Actu... |
|
buran |
General Coding Help |
6 |
462 |
Feb-15-2023, 05:22 PM |
|
|
Thread: My First App
Post: RE: My First App
Couple of things, after a brief flight over the code
https://github.com/Bcopeland64/IU-Habit-...ain.py#L70
What is the purpose of main()? You never call it and also it repeats the different cli comma... |
|
buran |
Code Review |
7 |
548 |
Feb-15-2023, 11:57 AM |