Python

The Register has been having fun with a script that removes all mention of the word “iPhone” from webpages; a necessary function these days. Better, they developed it to work on an iPhone; but just check out the code. // JavaScript here //This one thinks it’s an object var myRequest = new XMLHttpRequest(); //This is…

Read More Concise

Google is, essentially, a honking great unix system whose command line interface is addressed through URLs. This came to mind preparing the embedded map for the G3 Systems post; Google Maps autogenned a slightly different location than the view I wanted every time, although I could link directly to the right view. So, of course,…

Read More Google: the world’s favourite command line

I’ve recently been experimenting with various ways of automatically gathering information about Viktor Bout’s airlines; you’ve probably noticed the resumption of Pathetic Python Blogging. Anyway, though the project is far from ready, enough of itnow works to produce some useful results. For example, who the hell are “Asia Airways”, who regularly fly between Sharjah and…

Read More Political Pathetic Python; and some mystery jets

OK, so we solved the last problem. But now I’ve got another. We’ve just created a window with a Tkinter frame within, and announced that a listbox will be there. Then, we have the following statement: self.selector = Listbox(frame)..Listbox.pack(side=TOP)…for item in [“lots”,”of”,”data”,”in”,”here”,”that”,”takes”,”up”,”four”,”lines”]:….Listbox.insert(Tk.END,item) Dots inserted to get the indenting right. Tk.END causes the interpreter to fart…

Read More Bonus Pathetic Python Sunday

OK, so I’m trying to create a dropdown menu with around 40 options using the Python lib Tkinter. I’ve just learned that you can’t just define a command – call it get – and pass in the option as a variable (i.e. def get(variable) and then, for option X, command=get(X)), which brings me the horrible…

Read More Bleggin’