1,181 reputation
188
bio website
location St. Andrews, United Kingdom
age 18
visits member for 5 years, 2 months
seen Jun 15 at 4:50

Maths student at St Andrews University, Scotland. Hobbyist programmer. I dabble in a few languages; mainly Python and C at the minute.


May
25
comment Py-StackExchange: An API wrapper for Python
I'll double-check this, but unaccepted_questions is probably one of the fields that is not fetched automatically; instead use ii.get_user().unaccepted_questions.fetch().count. I know this is a little clunky, but otherwise it would need to pull in tonnes of data each request.
May
18
comment Py-StackExchange: An API wrapper for Python
@LarsH: That's a good idea; it'll also encourage me to keep as close to 100% coverage as is humanly possible!
May
18
comment Py-StackExchange: An API wrapper for Python
Note to future readers: a nicer API is supported in v1.1: site.questions.by_user(uid).
May
18
comment Py-StackExchange: An API wrapper for Python
Doing some testing... strange: with from_date=aWhileAgo and to_date=currentDate it works, as it does with fromdate=int(aWhileAgo) and todate. But using a float as fromdate (as aWhileAgo was), which is formatted with a trailing .0 fails with error 500. So both work with integers; this might be an API inconsistency.
May
18
comment Py-StackExchange: An API wrapper for Python
While I'm here, I'll try putting in some more descriptive exceptions, too.
May
18
comment Py-StackExchange: An API wrapper for Python
@LarsH: That, and the wiki (also on Github). Will clarify.
May
18
comment Py-StackExchange: An API wrapper for Python
Hello; sorry for the delay, glad you solved your problem. To answer your first question, you can turn on debug printing of URLs by setting stackexchange.web.WebRequestManager.debug = True. I agree that the documentation in that area is lacking; a wiki page is coming up. I'll look into that inconsistency; it seems quite pointless... I apologise on behalf of my younger self.
May
4
comment Py-StackExchange: An API wrapper for Python
Sorry for the delay - OpenID/hosting problems... Anyway, doing some testing, I noticed that Django view parameters are Unicode strings. I hadn't thought to have handled Unicode explicitly in the library, and it turned out that the urllib module encodes it as UTF-16 by default, which the API (understandably) doesn't like. I've changed it to UTF-8, which now works under Django for me. Summary: update to the latest version in the Git repo. (Or, I can push a new release of the egg out if necessary.)
May
4
comment Py-StackExchange: An API wrapper for Python
Not as far as I know, unless you use client-side JavaScript or something like that to fetch the result. You'll probably be fine with a single key, with an increased quota if necessary. The SO team are very approachable ;).
Apr
30
comment Py-StackExchange: An API wrapper for Python
You could well hit the limit if you get lots of hits. See stackapps.com/questions/67/how-api-keys-work for the official line. If your quota is increased, you won't need to change any code except to make sure you're using your API key.
Apr
5
comment Py-StackExchange: An API wrapper for Python
@Sridhar Ratnakumar: Thanks for the edit there; you beat me to it! :)
Feb
23
comment Py-StackExchange: An API wrapper for Python
Updated version on Github, and the egg should work now.
Feb
23
comment Py-StackExchange: An API wrapper for Python
Aha. I should probably rename build.sh to release.sh - it's the script I use for publishing new releases to PyPI. I'll write a README or something too... anyway, it should just work, from Github, out-of-the-box without running the script. If it doesn't, let me know! :)
Feb
14
comment Non-verbatim search strings in py-stackexchange
You might find, now that version 1.1 of the API has been released, that the /similar method might suit your needs (api.stackoverflow.com/1.1/usage/methods/similar). You can access this in Py-StackExchange with the site.similar() method; just remember to update the library to a recent version.
Jan
20
comment Py-StackExchange: An API wrapper for Python
Committed and pushed!
Jan
20
comment Py-StackExchange: An API wrapper for Python
Thanks! I really should have tested that... thanks again, though. I'll incorporate that just now. :)
Sep
7
comment geek score calculator - SO + Github on Rail
I am 62.5% geek! Yay! :) Nice idea.
Aug
14
comment How to format reputation numbers similar to Stack Exchange sites
Do you mean like that?
Aug
14
comment Can we have a test user account?
Do you think they'd mind if we went on Area 51 to do this?
Aug
14
comment Can we have a test user account?
I agree that not having a test area can be a bit annoying. What would be quite neat is a spam.stackexchange.com which is not search engine-indexed, unmoderated, and possibly wiped every so often, for test purposes. Of course, that'll never happen, but... :)