Re: [Tutor] List comprehensions to search a list--amazing!

2015-03-19 Thread Patrick Thunstrom
>>> The generalized problem: >>> >>> L = [V0, V1, ..., Vn], where V0 >= V1 >= V2 >= ... >= Vn . >>> Find index i, such that V[i] >= Vt >= V[i + 1], where Vt is the test >>> value being searched for. I need to know the indices i and i + 1, >>> which I need to interpolate based on where Vt falls. >>>

Re: [Tutor] Python for linux

2015-01-27 Thread Patrick Thunstrom
You're actually asking multiple subquestions here, let me start by asking a clarifying question: When you say "log in to the Linux machine" I assume you mean you need to access a remote host? Your script will be running locally? Next your other questions: Checking permissions of a file: Look int

Re: [Tutor] Class errors

2015-01-23 Thread Patrick Thunstrom
If the code I'm seeing is correct, the problem is the class is Jobs, and you instantiated a Job, which doesn't exit. Replace one with the other in either case should fix it. On Thu, Jan 22, 2015 at 11:11 AM, jarod...@libero.it wrote: > Dear All, > > I created a class that invoke from another fi

Re: [Tutor] Python advice about API, JSON

2014-09-29 Thread Patrick Thunstrom
On Mon, Sep 22, 2014 at 4:01 PM, Juan Christian wrote: > I'm trying to make my script the more pythonic possible. How would a good > approach regarding external API and json be? I don't think dealing with a specific API is actually appropriate for this list. I'll try to answer the general element

Re: [Tutor] debug and execute python code in Mac

2014-08-27 Thread Patrick Thunstrom
On Wed, Aug 27, 2014 at 7:14 AM, Najam Qasim wrote: > What is preferable method to debug and execute python code in Mac? > > I do not like the cmd/terminal execution. Thanks ! > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change sub