I have found a neat little cheatsheet for regular expressions on the internet. It can be found here.
Props go to the author of it for investing work and research and then sharing it with the community, it will for sure help me!
Monday, 30 June 2008
Saturday, 28 June 2008
unittest screencast
I have created a screen cast on unittest today. It explains the basics of unit testing and will be extended by another video explaining more complicated uses of it.
I have already uploaded it, but I will turn up the volume and do some other adjustments and then upload it again and to ShowMeDo.
UPDATE: Uploaded xvid version with louder sound: http://www.mediafire.com/?4jkjowghy1q
I have already uploaded it, but I will turn up the volume and do some other adjustments and then upload it again and to ShowMeDo.
UPDATE: Uploaded xvid version with louder sound: http://www.mediafire.com/?4jkjowghy1q
Screencast on XMLRPC
The Pocoo Pastebin has made me interested in XMLRPC, because you can post and view pastes using it. I have done some research and now done a short, 5 minute, screencast explaining the most basic features it offers.
If you do not know XMLRPC, it is a way of calling functions on a remote server nearly the same way than if they were in your program directly.
The screencast can be downloaded here and should soon be available at ShowMeDo.
If you do not know XMLRPC, it is a way of calling functions on a remote server nearly the same way than if they were in your program directly.
The screencast can be downloaded here and should soon be available at ShowMeDo.
Thursday, 19 June 2008
pyometry Python-3.0 compatible
I have just tried out pyometry.vector in a Python-3.0b1 and it has worked perfectly. This means there most likely will be a nearly seamless conversion from Python-2.x to Python-3.x, at least for the vector module.
[Python-3.0b1 console session]
[Python-3.0b1 console session]
New Python3.0 string formatting
I have just tried out the new Python 3.0 string formatting in the alpha release, and I got to say it is really great. I will make great use of it for the pypentago configuration files as I will not have to manually replace {foo} with "foovalue" but rather do string.format(foo="foovalue").
Here you've got a code sample: http://paste2.org/p/40928
Here you've got a code sample: http://paste2.org/p/40928
Friday, 13 June 2008
Z Shell
I have once again installed the Z Shell, better known as zsh. I have done this because I got more and more pissed about the bad completion features bash, where you cannot tab through the possible commands.
The feature that lets you display the return code of the last command in the prompt is also great.
All in all I like the zsh much better than the bash as some features are much more advanced in it. It also has a quite helpful first time users configuration program to create a really basic .zshrc.
The bad thing is that rxvt prevents me from having a prompt using colour or such without having to escape all the special characters[1]. But I think this is not the fault of zsh but rather the one of rxvt, as the users in that mailing list describe the same problem using the bash.
I put my .zshrc[2] onto dotfiles if you are interested. I know it is not really advanced so far, but I have most of my stuff defined in .aliases[3] which is loaded by .profile[4]. I have uploaded these two files to dotfiles too.
You might notice that the unp alias in the .aliases file does not need different attributes for different types of files. This is due to tar being able to auto detect the type of a file in new versions, if it does not work for you replace tar with bsdtar, which also supported this in earlier versions.
Some of the ideas for these files also came from other ones on dotfiles.
If you think these files could be improved, which for sure they can, please let me know!
The feature that lets you display the return code of the last command in the prompt is also great.
All in all I like the zsh much better than the bash as some features are much more advanced in it. It also has a quite helpful first time users configuration program to create a really basic .zshrc.
The bad thing is that rxvt prevents me from having a prompt using colour or such without having to escape all the special characters[1]. But I think this is not the fault of zsh but rather the one of rxvt, as the users in that mailing list describe the same problem using the bash.
I put my .zshrc[2] onto dotfiles if you are interested. I know it is not really advanced so far, but I have most of my stuff defined in .aliases[3] which is loaded by .profile[4]. I have uploaded these two files to dotfiles too.
You might notice that the unp alias in the .aliases file does not need different attributes for different types of files. This is due to tar being able to auto detect the type of a file in new versions, if it does not work for you replace tar with bsdtar, which also supported this in earlier versions.
Some of the ideas for these files also came from other ones on dotfiles.
If you think these files could be improved, which for sure they can, please let me know!
Monday, 9 June 2008
pyometry on gitorious
I named the package in which I put my vector module pyometry. That name was produced by merging Python and Geometry into pythongeometry. I also think that the name does not sound bad, so I picked it.
Enough of the name, I put this package, called pyometry, onto Gitorious today because I wanted to try out something new. For a change I picked this host, using Git instead of SVN which all hosting sites I used so far provided. So far I like it really good, because it has a simplistic web interface but still has all the features one would need. For source code management, that is, because Gitorious does not offer any features like web-hosting, file-mirroring or bug-tracking.
I think in the beginning I will be fine without those, but maybe I will need to host these somewhere else, if the package is used by some people eventually.
If you like Python and maths, and always waited for some chance to develop something, head over to Gitorious, create yourself an account and clone the mainline branch and eventually file a merge request so I can merge the changes you have done into the mainline branch.
Be ready for some more posts about git in the future, now that I can try it out first handidly.
Enough of the name, I put this package, called pyometry, onto Gitorious today because I wanted to try out something new. For a change I picked this host, using Git instead of SVN which all hosting sites I used so far provided. So far I like it really good, because it has a simplistic web interface but still has all the features one would need. For source code management, that is, because Gitorious does not offer any features like web-hosting, file-mirroring or bug-tracking.
I think in the beginning I will be fine without those, but maybe I will need to host these somewhere else, if the package is used by some people eventually.
If you like Python and maths, and always waited for some chance to develop something, head over to Gitorious, create yourself an account and clone the mainline branch and eventually file a merge request so I can merge the changes you have done into the mainline branch.
Be ready for some more posts about git in the future, now that I can try it out first handidly.
Vectors in Python
I have just created a module capable of doing vector calculations for Python. It currently supports calculation cross products, scalar products, unit vectors, the length of vectors and angles between two vectors.
It is pretty easy to use as this code-snippet should show. If there is anything in this that you do not understand, feel free to leave me a comment.
I also tinker with the idea of putting this onto some hosting-site, because I plan extending it so it is capable of doing calculations with planes and lines as well.
If you think you could make use of this, feel free to contact me so I can send you the code I have at the moment.
It is pretty easy to use as this code-snippet should show. If there is anything in this that you do not understand, feel free to leave me a comment.
I also tinker with the idea of putting this onto some hosting-site, because I plan extending it so it is capable of doing calculations with planes and lines as well.
If you think you could make use of this, feel free to contact me so I can send you the code I have at the moment.
Friday, 6 June 2008
eric IDE for Python code refactoring
I have just found a way to refactor Python projects. You can use eric4 using the rope plugin. It allows you to rename methods and classes in your whole project and appears to be working well.
With MS Windows I have experienced some problems with it, but with Archlinux it seems to work fine. I will post again once I have tried it out a bit more.
With MS Windows I have experienced some problems with it, but with Archlinux it seems to work fine. I will post again once I have tried it out a bit more.
Wednesday, 4 June 2008
Python code refactoring
I have been searching a tool that refactors my Python code, thus renaming my methods, classes and functions throughout the project so I do not have to manually change the names and all references to it.
I have not yet found any tool that really meets my requirements. Most of them are just plain hard to use, or are only integrating into IDEs or editors that I do not use.
I have not yet found any tool that really meets my requirements. Most of them are just plain hard to use, or are only integrating into IDEs or editors that I do not use.
Sunday, 1 June 2008
Change permissions for NTFS partition
I have just found out a little hack to change the permissions for a whole NTFS partition, but not for the files in it. It is good if you have a multi-user system and want to deny other users to access your NTFS drive.
First, create /mnt/win/win, then change /mnt/win to the permissions you want, mount the ntfs drive at /mnt/win/win and then create a symlink at /mnt/windows pointing at /mnt/win/win.
This will allow you to control access to this NTFS partition, remember that you cannot change the permissions for anything that is in the parition.
First, create /mnt/win/win, then change /mnt/win to the permissions you want, mount the ntfs drive at /mnt/win/win and then create a symlink at /mnt/windows pointing at /mnt/win/win.
This will allow you to control access to this NTFS partition, remember that you cannot change the permissions for anything that is in the parition.
pyPentago userbar
If someone of you has tried out the pyPentago alpha and liked it, I have created a userbar so you can show that you like it.
You can get the alpha version of pyPentago here, please follow the instructions on how to install it.
You can get the alpha version of pyPentago here, please follow the instructions on how to install it.
New Blog
I have opened a blog here on Blogger.
I will write about releases of my software or software I am excited about and my thoughts on different things, mostly computers, I think.
I will write about releases of my software or software I am excited about and my thoughts on different things, mostly computers, I think.
Subscribe to:
Posts (Atom)