It’s been a while since the first version of numpy-stl and a lot has changed since. Most importantly, usage has become even easier. So here’s a demo on how to use matplotlib to render your stl files: [python]from stl import mesh from mpl_toolkits import mplot3d from matplotlib import pyplot # Create a new plot figure […]
Reading MT940 files using Python
Some time ago I wrote a library to read MT940 files with Python. While there are multiple libraries available for this target, none of the others really work properly and/or support all variants of the format. The MT940 library I wrote is slightly different, it’s designed to be able to parse any MT940 file, regardless […]
Checking for Python version and Vim version in your .vimrc
Recently I’ve had to adjust a bunch of my dotfiles to support some old (Centos 5) systems which means that I am using a Vim that has Python 2.4 build in… needless to say, it breaks some of my dotfiles 😉 So here’s some tips on patching Vim version issues. First, checking if you have […]
Reading/writing 3D STL files with numpy-stl
For issues and/or questions, create an issue on Github: WoLpH/numpy-stl issues As a followup of my earlier article about reading and writing STL files with Numpy, I’ve created a library that can be used easily to read, modify and write STL files in both binary and ascii format. The library automatically detects whether your file […]
Reading and writing binary STL files with Numpy
I’ve since written a library to replace this script and add more functionality such as reading/writing both binary and ascii STL files. See the blog post here After seeing Sukhbinder’s implementation of reading STL files with Numpy I thought it would be a nice thing to have a simple STL class to both read and […]
Batch restoring files in Dropbox recursively (Dropbox Time Machine)
When you are sharing a Dropbox folder with a lot of different people at one point someone will eventually delete the shared folder through his/her file manager instead of dropbox, resulting in having half of the files in the subdirectories being gone. As this got so annoying for my use case I wrote a little […]
Windows version of os.walk with long path (255 characters) support
There are these times that you really have to use Windows and in those cases some issues like the 255 path limit tend to occur with network mounts. Luckily, this is fairly easy to solve with a small Python snippet: [python]import os UNUSED_DRIVE_LETTER = ‘x:’ def windows_walk(top, topdown=True, onerror=None, followlinks=False): for path, dirs, files in […]
Batch adding data to Pocket
For some reason I do not understand, Pocket seems to have no support for batch adding articles to the reading list. After looking around quite a bit it doesn’t even seem possible to get a simple add url so you can add them with a little batch script… Since I still wanted to have my […]
Recent Comments