Re: [Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

2015-04-30 Thread Alex Kleider
On 2015-04-30 20:39, boB Stepp wrote: I created my remote repository on, say my C-drive, with "git init". I then copied and pasted a file to that location and put it under version control with "git add filename.py". Next I went to my E-drive, which is where I intend to be my working directories.

Re: [Tutor] Python 2.4 (was comparison operators)

2015-04-30 Thread boB Stepp
On Thu, Apr 30, 2015 at 1:02 AM, Laura Creighton wrote: > Python 2.4 is really old, right now. OpenCSW has 2.6.9 > http://www.opencsw.org/package/python/ > > Any chance you could use that? Laura, I may just attempt this on the dev machine. I have mentioned before that the production environment

Re: [Tutor] Questions (and initial responses) on using version control: Why cannot I push my single (master) branch to origin without an error occurring?

2015-04-30 Thread boB Stepp
I created my remote repository on, say my C-drive, with "git init". I then copied and pasted a file to that location and put it under version control with "git add filename.py". Next I went to my E-drive, which is where I intend to be my working directories. After setting up a similar directory str

Re: [Tutor] Ancient Python versions

2015-04-30 Thread Ben Finney
boB Stepp writes: > On Thu, Apr 30, 2015 at 12:15 AM, Ben Finney > wrote: > > If you actually need to read the documentation specifically for a > > Python version that has not been supported since 2008, then I agree > > that is a problem. > > I'm pretty much stuck with these relics of Pythons p

Re: [Tutor] Ancient Python versions (was: Is there a way to store and later use comparison operators (<, <=, =, >=, >) ?)

2015-04-30 Thread boB Stepp
On Thu, Apr 30, 2015 at 12:15 AM, Ben Finney wrote: > boB Stepp writes: > >> One problem I have with searching the Python documentation is this: >> https://docs.python.org/release/2.4.4/lib/lib.html > > If you actually need to read the documentation specifically for a Python > version that has no

Re: [Tutor] Good Taste Question: Using SQLite3 in Python

2015-04-30 Thread Laura Creighton
The fact that _ and __ are intended as throw away values is only clear to people who have read a particular doc about coding styles. If you haven't read the doc, you don't know what is going on. I name my throw away variables junk, and if there are lots of them, for instance when I am reading fro

Re: [Tutor] Good Taste Question: Using SQLite3 in Python

2015-04-30 Thread Alan Gauld
On 30/04/15 20:22, Roel Schroeven wrote: Alan Gauld schreef op 2015-04-30 00:51: Summarizing a bit, I think you make two main points (please correct me if I'm wrong): Your quite correct. I'm probably a bit paranoid but as I said I spent a significant bit of my production-programming career

Re: [Tutor] Good Taste Question: Using SQLite3 in Python

2015-04-30 Thread Roel Schroeven
Dave Angel schreef op 2015-04-30 21:33: Well, are you aware that _ has a meaning in the debugger? It holds the last value of an expression that wasn't assigned to a variable. or something like that. Yes, I know the meaning of _ in Python's interactive mode. It's something I sometimes use fo

Re: [Tutor] Good Taste Question: Using SQLite3 in Python

2015-04-30 Thread Dave Angel
On 04/30/2015 03:22 PM, Roel Schroeven wrote: Alan Gauld schreef op 2015-04-30 00:51: > ... Trying to visually scan for _ or even __ is hard. Also different fonts make _ and __ hard to distinguish. > ... But they will be. Almost for certain. It's human nature and the nature of code maint

Re: [Tutor] Good Taste Question: Using SQLite3 in Python

2015-04-30 Thread Roel Schroeven
Alan Gauld schreef op 2015-04-30 00:51: > ... Trying to visually scan for _ or even __ is hard. Also different fonts make _ and __ hard to distinguish. > ... But they will be. Almost for certain. It's human nature and the nature of code maintenance. If it's there somebody will find a use fo

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-30 Thread boB Stepp
On Wed, Apr 29, 2015 at 11:38 PM, Dave Angel wrote: > On 04/30/2015 12:28 AM, boB Stepp wrote: >> >> The main danger as I see it is that if I am not careful, then the code >> on the dev environment could diverge from the state of code on my >> Windows PC, i.e., I forgot to do the scp part. But whe

Re: [Tutor] if/then statement and sql count rows

2015-04-30 Thread Alan Gauld
On 30/04/15 03:59, Spencer For Friends wrote: class PriceCheck(object): def __init__(self, db): self.conn = sqlite3.connect(db) self.c = self.conn.cursor() def query(self, arg, cardname): self.c.execute(arg, cardname) r

Re: [Tutor] Newbie problems

2015-04-30 Thread Alan Gauld
On 30/04/15 04:58, Jag Sherrington wrote: Can anyone please tell me what I am doing wrong?As this code I have for the Roulette Wheel colours exercise, won't work. number = int(input('Enter a number between 0 and 36: '))green_number = (0) red_number = (1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23,

Re: [Tutor] Newbie problems

2015-04-30 Thread Dave Angel
On 04/29/2015 11:58 PM, Jag Sherrington wrote: Can anyone please tell me what I am doing wrong?As this code I have for the Roulette Wheel colours exercise, won't work. number = int(input('Enter a number between 0 and 36: '))green_number = (0) red_number = (1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-30 Thread Alan Gauld
On 30/04/15 05:28, boB Stepp wrote: That is what I have implemented as of today. I installed Git on my Windows PC where I have been doing my actual coding This is off topic but due to your peculiar restrictions might be useful so I thought I'd bring it up. Do you have Cygwin installed on your

Re: [Tutor] subprocess.Popen(..., cwd) and UNC paths

2015-04-30 Thread Alan Gauld
On 30/04/15 01:48, eryksun wrote: > Actually cmd.exe is fine with UNC paths. cmd.exe cannot use a UNC path as the current directory. Oops, my mistake. I got my POSIX and UNC mixed up. I was thinking about forward slashes etc not network names. Apologies for not reading the message properly. --

Re: [Tutor] Fwd: circular movement in pygame

2015-04-30 Thread diliup gabadamudalige
Thanks all for the very informative responses especially to Alan for being descriptive. I am now going to make my movement linear and move away from my current circular one. I hope a little bit of fun and "Thank you" emails fall into the order of the day.. :) On Thu, Apr 30, 2015 at 9:13 AM, Da

Re: [Tutor] Python 2.4 (was comparison operators)

2015-04-30 Thread Laura Creighton
Python 2.4 is really old, right now. OpenCSW has 2.6.9 http://www.opencsw.org/package/python/ Any chance you could use that? Laura ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/l

[Tutor] if/then statement and sql count rows

2015-04-30 Thread Spencer For Friends
Hi All, I'm attempting to perform an if then statement based on the results of a sql count rows query. The query is returning the proper values however the if/then statement seems to be ignoring the returned value of the sql statement. Here is my code. import sqlite3 # Define SQL statem

Re: [Tutor] How to use Git from Windows PC for files on Solaris machine where Git cannot be installed?

2015-04-30 Thread Laura Creighton
In a message of Wed, 29 Apr 2015 23:28:59 -0500, boB Stepp writes: >The main danger as I see it is that if I am not careful, then the code >on the dev environment could diverge from the state of code on my >Windows PC, i.e., I forgot to do the scp part. But when I am actively >working on a section

[Tutor] Newbie problems

2015-04-30 Thread Jag Sherrington
Can anyone please tell me what I am doing wrong?As this code I have for the Roulette Wheel colours exercise, won't work. number = int(input('Enter a number between 0 and 36: '))green_number = (0) red_number = (1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36) black_number = (2,

Re: [Tutor] raise exception works as planned in program but not when imported into testing module

2015-04-30 Thread Jim Mooney Py3.4.3winXP
Oops, my mistake. Ignore dumb remark below. I was thinking of the try - except in the main loop, but since I only tested the parse function, I never used that. I need to look a bit harder and find this stuff Before I post ;') Jim On 29 April 2015 at 23:04, Jim Mooney Py3.4.3winXP wrote: > > I