[Tutor] attempting to install PIP

2014-11-24 Thread Paul LaBerge
Hello, I’m trying to install PIP on a Mac running Yosemite. I downloaded get-pip.py from https://pip.pypa.io/en/latest/installing.html https://pip.pypa.io/en/latest/installing.html. I copied it to /usr/local/bin/ then ran python get-pip.py. It repeatedly downloaded something up to a count of

Re: [Tutor] attempting to install PIP

2014-11-24 Thread Albert-Jan Roskam
From: Paul LaBerge labergep...@icloud.com To: tutor@python.org Sent: Monday, November 24, 2014 6:05 AM Subject: [Tutor] attempting to install PIP Hello, I’m trying to install PIP on a Mac running Yosemite. I downloaded get-pip.py from https://pip.pypa.io/en/latest/installing.html. I copied

Re: [Tutor] multiprocessing question

2014-11-24 Thread Albert-Jan Roskam
 - Original Message - From: Cameron Simpson c...@zip.com.au To: Python Mailing List tutor@python.org Cc: Sent: Monday, November 24, 2014 2:20 AM Subject: Re: [Tutor] multiprocessing question On 23Nov2014 22:30, Albert-Jan Roskam fo...@yahoo.com.dmarc.invalid wrote: I

[Tutor] pexpect interactive password entry for luks device

2014-11-24 Thread Adam Gold
I'm trying to do something really simply (I think) with pexpect but must be missing an obvious step. I want to ssh from host to guest, establish a CIFS connection on the guest to a share somewhere else on the local network, open a luks loop device on the share by entering the password (I don't

[Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread boB Stepp
Python 2.7.8 Win7Pro str = 0123456789 str[-1] '9' str[-3:-1] '78' str[-3:] '789' I understand that the above is the way it is in Python, but I am puzzled why the designers did not choose that str[-3:-1] returns '789', especially since str[-1] returns '9'. What is the reason for choosing

Re: [Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread Zachary Ware
On Mon, Nov 24, 2014 at 12:32 PM, boB Stepp robertvst...@gmail.com wrote: Python 2.7.8 Win7Pro str = 0123456789 str[-1] '9' str[-3:-1] '78' str[-3:] '789' I understand that the above is the way it is in Python, but I am puzzled why the designers did not choose that str[-3:-1] returns

Re: [Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread boB Stepp
On Mon, Nov 24, 2014 at 12:57 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: [...] Have I clarified or muddied it for you? :) Clarified, I believe, if my following statements are correct: I did not consider that the behavior was symmetric with positive indices. So, index 0 is the center

Re: [Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread boB Stepp
On Mon, Nov 24, 2014 at 1:06 PM, boB Stepp robertvst...@gmail.com wrote: On Mon, Nov 24, 2014 at 12:57 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: [...] Have I clarified or muddied it for you? :) Clarified, I believe, if my following statements are correct: I did not consider that

Re: [Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread Zachary Ware
On Mon, Nov 24, 2014 at 1:06 PM, boB Stepp robertvst...@gmail.com wrote: On Mon, Nov 24, 2014 at 12:57 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: [...] Have I clarified or muddied it for you? :) Clarified, I believe, if my following statements are correct: I did not consider that

Re: [Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread Steven D'Aprano
On Mon, Nov 24, 2014 at 12:32:27PM -0600, boB Stepp wrote: Python 2.7.8 Win7Pro str = 0123456789 str[-1] '9' str[-3:-1] '78' str[-3:] '789' I understand that the above is the way it is in Python, but I am puzzled why the designers did not choose that str[-3:-1] returns '789',

Re: [Tutor] multiprocessing question

2014-11-24 Thread Cameron Simpson
On 24Nov2014 12:56, Albert-Jan Roskam fo...@yahoo.com wrote: From: Cameron Simpson c...@zip.com.au On 23Nov2014 22:30, Albert-Jan Roskam fo...@yahoo.com.dmarc.invalid wrote: I created some code to get records from a potentially giant .csv file. This implements a __getitem__ method that gets

Re: [Tutor] attempting to install PIP

2014-11-24 Thread Paul LaBerge
Thanks for all your suggestions. I took the option of downloading .tar.gz pip from PyPI; untar; cd to it; then; sudo python setup.py install This installed successfully finishing with: Processing dependencies for pip==6.0.dev1 Finished processing dependencies for

[Tutor] ran into a problem with pip install

2014-11-24 Thread Clayton Kirkwood
I was trying to pip install beautifulsoup and ran into the following error. It appears to be 2.x because of the print. I am installing to a python 3.4.2. What do I need to do? I tried to log a bug report to PyPI Bug Reports but that apparently isn't the cool thing to do. I can't perceive why the

Re: [Tutor] ran into a problem with pip install

2014-11-24 Thread Zachary Ware
On Mon, Nov 24, 2014 at 10:28 PM, Clayton Kirkwood c...@godblessthe.us wrote: I was trying to pip install beautifulsoup and ran into the following error. It appears to be 2.x because of the print. Your diagnosis is correct, beautifulsoup 3.2.1 is written for Python 2. I am installing to a

Re: [Tutor] multiprocessing question

2014-11-24 Thread eryksun
On Sun, Nov 23, 2014 at 7:20 PM, Cameron Simpson c...@zip.com.au wrote: A remark about the create_lookup() function on pastebin: you go: record_start += len(line) This presumes that a single text character on a line consumes a single byte or memory or file disc space. However, your data

Re: [Tutor] Philosophical question about string slicing from end of a string

2014-11-24 Thread eryksun
On Mon, Nov 24, 2014 at 1:33 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: Also note that there's no way to get the last member with a negative second index. Also note that, given a -1 step, there's no way to get the first member with a non-negative second index. s[-1:0:-1]