Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

Python

Python & Ctypes: Passing a struct to a function as a pointer to get back data

August 14, 2022 by Magenaut

I’ve looked through other answers but can’t seem to get this to work. I’m trying to call a function within a DLL for communicating with SMBus devices. This function takes a pointer to a struct, which has an array as one of it’s fields. so…

Categories Python, Q&A Tags ctypes, pointers, python, struct Leave a comment

Filtering os.walk() dirs and files

August 14, 2022 by Magenaut

I’m looking for a way to include/exclude files patterns and exclude directories from a os.walk() call.

Categories Python, Q&A Tags filtering, os.walk, python Leave a comment

Can’t use SURF, SIFT in OpenCV

August 14, 2022 by Magenaut

I’m trying a simple thing like

Categories Python, Q&A Tags opencv, python, sift, surf Leave a comment

Unittest setUp/tearDown for several tests

August 14, 2022 by Magenaut

Is there a function that is fired at the beginning/end of a scenario of tests? The functions setUp and tearDown are fired before/after every single test.

Categories Python, Q&A Tags python, unit-testing Leave a comment

Sort filenames in directory in ascending order

August 14, 2022 by Magenaut

I have a directory with jpgs and other files in it.

Categories Python, Q&A Tags python, sorting Leave a comment

AttributeError: ‘datetime’ module has no attribute ‘strptime’

August 14, 2022 by Magenaut

Here is my Transaction class:

Categories Python, Q&A Tags class, python, python-2.7 Leave a comment

How to remove lines in a Matplotlib plot

August 14, 2022 by Magenaut

How can I remove a line (or lines) of a matplotlib axes in such a way as it actually gets garbage collected and releases the memory back? The below code appears to delete the line, but never releases the memory (even with explicit calls to gc.collect())

Categories Python, Q&A Tags matplotlib, plot, python Leave a comment

How do you add additional files to a wheel?

August 14, 2022 by Magenaut

How do control what files are included in a wheel? It appears MANIFEST.in isn’t used by python setup.py bdist_wheel.

Categories Python, Q&A Tags pip, python, python-wheel Leave a comment

byte string vs. unicode string. Python

August 14, 2022 by Magenaut

Could you explain in detail what the difference is between byte string and Unicode string in Python. I have read this:

Categories Python, Q&A Tags python, string, unicode Leave a comment

Pythonic way to combine datetime.date and datetime.time objects

August 14, 2022 by Magenaut

I have two objects that represent the same event instance — one holds the date, the other the time of this event, and I want to create a datetime object.

Categories Python, Q&A Tags datetime, python Leave a comment
Older posts
Newer posts
← Previous Page1 … Page646 Page647 Page648 … Page827 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress