So i had all the raw text from my blog posts backed up in a flat text file (just a bunch of text). I wanted to be clever and not manually enter each blog post again, so I made a new button and tied it to this grabPosts function: class BlogPostGrabber(): def grabPosts(self): os.chdir(‘/home/colin/blogposts’) for[…]
Original Timestamp: 2014-01-26 21:58:04.803373 Second test!!
Original Timestamp: 2014-02-06 00:09:18.512687 Get going quick – coding for MineCraft on FreeBSD10 # mkdir mineDev # cd mineDev # mkdir craftbukkit # pkg install netbeans *you can accomplish this different ways – this is the newest / easiest (instal # fetch http://dl.bukkit.org/downloads/craftbukkit/get/02389_1.6.4-R2.0/craftbuk # fetch http://apache.mirrors.tds.net/maven/maven-3/3.1.1/binaries/apache-maven- # mv craftbukkit.jar craftbukkit # tar -xf apache-maven-3.1.1.bin.tar.gz #[…]
Original Timestamp: 2014-02-18 20:48:13.659576 From: http://stackoverflow.com/questions/7108193/frequently-repeated-try-except-in-python …The best way to abstract exception handling is with a context manager: from contextlib import contextmanager @contextmanager def common_handling(): try: yield finally: # whatever your common handling is then: with common_handling(): os.remove(‘/my/file’) with common_handling(): os.chmod(‘/other/file’, 0700)
Original Timestamp: 2014-01-26 22:04:56.656605 Fifth Post
Original Timestamp: 2014-01-26 22:02:58.632113 unauth EDIT@@@!!!
Original Timestamp: 2014-02-24 05:55:24.274556 Worked tonight to get social media updated when I update the blog. Python makes this super easy… I’ll hopefully get around to writing a lenghtly post about how… (I’d like to do my domain justice and actually explain how) but I’m tired.
Original Timestamp: 2014-02-28 00:12:28.787585 Test public only Twitter post
Original Timestamp: 2014-01-29 04:08:54.030452 Ripped through some learnage: http://sql.learncodethehardway.org/book/ex13.html
Original Timestamp: 2014-01-26 22:56:14.080675 Woot – Blog finally live (though in early stages!)… Originally started from folliwing this: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world … Since, I have added some functionality, migrated the app to ‘The Cloud’ and added this blog front page (as well as a users’ page). Stay tuned for future updates / blog posts… I intend to[…]