It's alive!
I am going to finish that Y axis motor bracket :)
The spanner is because the X carridge design relies on some off centre weight, which is normally my extruder that is currently broken.
Wednesday, 7 October 2009
Awesome picture of the night sky
You may have seen this story on slashdot but been a little annoyed when you couldn't just download a nice big image and instead had to look at it in some stupid flash or js viewer.
I'm not going to upload any images but I might just leave this here.
I'm not going to upload any images but I might just leave this here.
Making real use of Python in gedit
If you are a fan of gedit, and a fan of Python like me then the chances are that you have tried out the gedit Python console plugin at some point. Years ago I tried it out but realised it was really aimed at plugin developers and not at people wanting a quick and easy way to manipulate data in the text editor.
Last week I wrote a simple gedit plugin and so learned about the API and how to manipulate text in the editor. Even once I had learned about the API it still seemed far to complex to be usefull for quick data manipulation of an open file, so I decided to make a simple script that made things simpler, and makes the gedit Python console do what I wanted all along.
Get It
Save this script as ~/.gnome2/gedit/plugins/doc.py
Now open up the Python console in gedit and type import doc
Use It
import doc
d = doc.Doc(window)
d.set_lines( ['one', 'two', 'three'] )
d.append('\n')
d.append('four')
lines = d.get_lines()
lines.reverse()
d.set_lines(lines)
Now you can use regular expressions on you're open documents :)
Documentation
Last week I wrote a simple gedit plugin and so learned about the API and how to manipulate text in the editor. Even once I had learned about the API it still seemed far to complex to be usefull for quick data manipulation of an open file, so I decided to make a simple script that made things simpler, and makes the gedit Python console do what I wanted all along.
Get It
Save this script as ~/.gnome2/gedit/plugins/doc.py
Now open up the Python console in gedit and type import doc
Use It
import doc
d = doc.Doc(window)
d.set_lines( ['one', 'two', 'three'] )
d.append('\n')
d.append('four')
lines = d.get_lines()
lines.reverse()
d.set_lines(lines)
Now you can use regular expressions on you're open documents :)
Documentation
doc.Doc:
|
Subscribe to:
Posts (Atom)