Re: [Tutor] Help with python-gnupg

2011-03-12 Thread Becky Mcquilling
Thanks, everyone: Your suggestions worked. I will make sure to include full information next time. Becky On Sat, Mar 12, 2011 at 12:14 AM, Steven D'Aprano wrote: > Becky Mcquilling wrote: > >> If anyone is familiar with python-gnupg, I am having some difficulty with >> the syntax. I've tried

[Tutor] Simplistic drive simulation

2011-03-12 Thread R. Alan Monroe
I'm trying to mentally plan out the most bare bones drive simulation possible, but I have this nagging feeling that I'm missing something. I was just going to start with, say, 16 or 64 "blocks", then randomly add and delete ficticious "files" (which won't have any actual content - I'm just trying t

Re: [Tutor] what is 2.7 equiavelent of apihelper

2011-03-12 Thread Alan Gauld
"Yaşar Arabacı" wrote >>> from apihelper import info ImportError: No module named apihelper Appereantly, my python doesn't have a apihelper library. Neither does anyone elses. Its a module defined in the book. A quick Google search suggests you will find the code in section 4.1.1. Here is t

[Tutor] what is 2.7 equiavelent of apihelper

2011-03-12 Thread Yaşar Arabacı
Hi, I am following "div into pyton" to learn python, because I like to dive into learning something :) I was following it, and got an error. Here is what I have done: Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more inform

Re: [Tutor] What's an IndentationError & How Do I Fix It

2011-03-12 Thread Dorje Kawabata
Perfect. Thanks for both how to make them and on how to not make them. 2011/3/12 Yaşar Arabacı > You could use any amount of spaces before your code. Just to remember being > consisted, as every level of spaces counts as different code block. > > When you want to get out of indentation, just en

Re: [Tutor] What's an IndentationError & How Do I Fix It

2011-03-12 Thread Yaşar Arabacı
You could use any amount of spaces before your code. Just to remember being consisted, as every level of spaces counts as different code block. When you want to get out of indentation, just enter a line without indenting it. 12-03-2011 18:20, Dorje Kawabata yazmış: I'm using the python interp

Re: [Tutor] What's an IndentationError & How Do I Fix It

2011-03-12 Thread Steven D'Aprano
Dorje Kawabata wrote: IndentationError: expected an indented block I'm learning python as my first language since coding Basic in 6th grade (over 30 years ago). I assume that in a text editor I would simply indent the code. *My question is how do I fix this in the interpreter? What do I type?*

[Tutor] What's an IndentationError & How Do I Fix It

2011-03-12 Thread Dorje Kawabata
I'm using the python interpreter and entered the following code: >>> for page in range(1,6): ... search_results.append(twitter_search.search(q="#prayforjapan", rpp=100, page=page)) And received this: File "", line 2 search_results.append(twitter_search.search(q="#prayforjapan", rpp=100, pag

Re: [Tutor] Resources

2011-03-12 Thread Bill Allen
These are quite good, The Building Skills Books, these are online. http://homepage.mac.com/s_lott/books/index.html Tarleton Area Amateur Radio Club On Fri, Mar 11, 2011 at 20:19, s s

Re: [Tutor] On off Toggle

2011-03-12 Thread David Hutto
You want toggle_power to turn on or off. class Television(object): def __init__(self): pass def toggle_power(self, choice): if choice == 0: poweroff() if choice == 1: poweron() # you set a choice that won't work unless user says choice =

Re: [Tutor] On off Toggle

2011-03-12 Thread Alan Gauld
"Adrian Atkinson" wrote class Television(object): While using a class is not in itself a bad idea it looks like you have much more fundamental issues to deal with so I'd suggest dropping the class for now and just write some functions using global variables to store the data. You can then mo

[Tutor] On off Toggle

2011-03-12 Thread Adrian Atkinson
class Television(object): def __init__(self,__channel,volume,is_on): self.volume = volume self.is_on = "Power is off" power = self.is_on def toggle_power(self): if choice == "1" and power == self.is_on : power = "Power is Now on" elif c

Re: [Tutor] Sorting multiple sequences

2011-03-12 Thread Dinesh B Vadhia
The two sequences are pairs and have to be sorted as such. There are in fact hundreds of thousands of pairs of sequences (with different elements) with each sequence containing 10,000+ elements. Looks like pairs = sorted(zip(g,h)) is the best option? Dinesh Message: 6 Date: Sat, 12 Mar 2011 1

Re: [Tutor] Help with python-gnupg

2011-03-12 Thread Steven D'Aprano
Becky Mcquilling wrote: If anyone is familiar with python-gnupg, I am having some difficulty with the syntax. I've tried the following: When dealing with third party packages, unless it is an extremely well-known package like numpy or nltk, it is usually a good idea to link to the project's