Re: [Tutor] Concatenating Strings

2012-05-29 Thread Steven D'Aprano
On Tue, May 29, 2012 at 03:51:21PM +1000, Steven D'Aprano wrote: Using + is arguably preferable when you have a choice to make, since it works in all cases, including constants. I'll argue differently: even though + works with string literals as well as variables, you shouldn't use it.

[Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Opher Lubzens
Hello to the list, I'm working on a python script that has to interact with a Postgresql database, and the only python version I can use is python 2.7-static. I have two questions: 1) Is there any way to add libraries to this version? 2)If not, what would you recommend as a method to work with

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Joel Goldstick
On Tue, May 29, 2012 at 2:42 AM, Opher Lubzens opher.lubz...@gmail.com wrote: Hello to the list, I'm working on a python script that has to interact with a Postgresql database, and the only python version I can use is python 2.7-static. I have two questions: 1) Is there any way to add

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Opher Lubzens
On Tue, May 29, 2012 at 1:25 PM, Joel Goldstick joel.goldst...@gmail.comwrote: On Tue, May 29, 2012 at 2:42 AM, Opher Lubzens opher.lubz...@gmail.com wrote: Hello to the list, I'm working on a python script that has to interact with a Postgresql database, and the only python version I can

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Joel Goldstick
On Tue, May 29, 2012 at 7:20 AM, Opher Lubzens opher.lubz...@gmail.com wrote: On Tue, May 29, 2012 at 1:25 PM, Joel Goldstick joel.goldst...@gmail.com wrote: On Tue, May 29, 2012 at 2:42 AM, Opher Lubzens opher.lubz...@gmail.com wrote: Hello to the list, I'm working on a python script

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Walter Prins
On 29 May 2012 12:20, Opher Lubzens opher.lubz...@gmail.com wrote: Unfortunately I'm using this in my work, and cannot rely on the psycopg2 extension being available in the server that the script will run on unless I can enter it into the python-static bundle as an in-built module: I'm aware

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Opher Lubzens
On Tue, May 29, 2012 at 4:18 PM, Walter Prins wpr...@gmail.com wrote: What does this work machine run exactly?  Why won't you be able to (for example) keep some libraries in your own home lib folder and update the library load path so that your own libraries can be used by your programs?  Does

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Walter Prins
Hi, On 29 May 2012 14:40, Opher Lubzens opher.lubz...@gmail.com wrote: This is supposed to be a QA tool to be run on virtual machines to make sure several of our features work correctly and do not degrade during development and version changes. OK... Our machines are susually running a

Re: [Tutor] Python 2.7 Static Version and Postgresql

2012-05-29 Thread Opher Lubzens
On Tue, May 29, 2012 at 6:26 PM, Walter Prins wpr...@gmail.com wrote: Hi, On 29 May 2012 14:40, Opher Lubzens opher.lubz...@gmail.com wrote: I presume you can't develop on a VM which is less restrictive by any chance?  How about setting up something similar to Movable Python or Portable

Re: [Tutor] Parsing data from a set of files iteratively

2012-05-29 Thread Steven D'Aprano
Steven D'Aprano wrote: location = '/Users/spyros/Desktop/3NY8MODELSHUMAN/HomologyModels/' zdata = [] for filename in os.listdir(location): zdata.extend(get_zcoords(filename)) Hah, that can't work. listdir returns the name of the file, but not the file's path, which means that Python

[Tutor] Loop Question - Beginner Help (Thanks in Advance)

2012-05-29 Thread Joseph Rishe
#Operating System - Mac OS X 10.6.8 #Python Version - Python 2.6.6 ##Goal: I am creating a program to calculate credit card payments. ## The user should be able to put in a credit card balance and interest ## rate, and the program will tell them what monthly payment will allow ##

[Tutor] Break Help

2012-05-29 Thread PhantomsCore
if gameIsDone: if playAgain(): missedLetters = '' correctLetters = '' gameIsDone = False secretWord = getRandomWord(words) else: break That is my coding. When I try to run it I get Break outside loop -- View

Re: [Tutor] Break Help

2012-05-29 Thread Corey Richardson
On Tue, 29 May 2012 17:50:37 -0700 (PDT) PhantomsCore thomas...@wsdstudent.net thomas...@wsdstudent.net wrote: if gameIsDone: if playAgain(): missedLetters = '' correctLetters = '' gameIsDone = False secretWord =

Re: [Tutor] Loop Question - Beginner Help (Thanks in Advance)

2012-05-29 Thread Dave Angel
On 05/29/2012 08:46 PM, Joseph Rishe wrote: #Operating System - Mac OS X 10.6.8 #Python Version - Python 2.6.6 ##Goal: I am creating a program to calculate credit card payments. ## The user should be able to put in a credit card balance and interest ## rate, and the program