Re: Code review request

2010-12-22 Thread Steven Howe
On 12/22/2010 10:34 AM, Jason Staudenmayer wrote: Hi All, I'm a python newbie so please be kind. I've been reading book after book and have written a script or two but this is my first real "program". Just looking for any suggestions and pointers. I've done some work with bash scripts and php (

RE: [SPAM] - Re: Code review request

2010-12-22 Thread Jason Staudenmayer
: Code review request Am 22.12.2010 19:34, schrieb Jason Staudenmayer: Hi All, Hi Jason, the program could be more dense. You have several redundant code in there, too. For example, all the *Employee functions basically just call dbconnect and let it execute the sql there. dbconnect in this

Re: Code review request

2010-12-22 Thread MRAB
> """ > Created on Tue Dec 21 13:39:41 2010 > @author: jason > > Usage: cmd_drug_testing.py [options]... > Will select a random employee from the local database (located in the current directory) > and display the name by default. > > This program (Drug Testing) was written to help select employ

RE: Code review request

2010-12-22 Thread Gerald Britton
Hi Jason, There are a couple of things that I noticed: 1. You might want to check out PEP 8 -- a Python style guide. Among other things, some lines are very long and you are not consistent with putting a space after a comma in a list or between arguments in a function call. e.g. opts, args =

Re: Code review request

2010-12-22 Thread Stefan Sonnenberg-Carstens
Am 22.12.2010 19:34, schrieb Jason Staudenmayer: Hi All, I'm a python newbie so please be kind. I've been reading book after book and have written a script or two but this is my first real "program". Just looking for any suggestions and pointers. I've done some work with bash scripts and php (n

Code review request

2010-12-22 Thread Jason Staudenmayer
Hi All, I'm a python newbie so please be kind. I've been reading book after book and have written a script or two but this is my first real "program". Just looking for any suggestions and pointers. I've done some work with bash scripts and php (not OOP) a while a go. I'm not a programmer but wou

Re: Code Review request for the trash-cli project

2009-01-06 Thread Steven D'Aprano
On Tue, 06 Jan 2009 17:30:19 +0200, Dotan Cohen wrote: > I don't know about the code, but would there be a reason _not_ to alias > rm, rmdir to this program? I see that it is GPL, so this would be a > great addition to any Linux distro. I sure as hell don't want rm to move files to the trash. If

Re: Code Review request for the trash-cli project

2009-01-06 Thread Andrea Francia
Dotan Cohen wrote: 2009/1/6 Andrea Francia : The trash-cli project is a opensource implementation of the FreeDesktop.org I don't know about the code, but would there be a reason _not_ to alias rm, rmdir to this program? Actually the trash-put command accept all the options of GNU rm in orde

Re: Code Review request for the trash-cli project

2009-01-06 Thread Dotan Cohen
2009/1/6 Andrea Francia : > The trash-cli project is a opensource implementation of the FreeDesktop.org > Trash Specification that provides a command line interface to manage the > trashcan. > > It's provide the following commands: > * trash-put trashes files and directories. > * trash-e

Code Review request for the trash-cli project

2009-01-06 Thread Andrea Francia
The trash-cli project is a opensource implementation of the FreeDesktop.org Trash Specification that provides a command line interface to manage the trashcan. It's provide the following commands: * trash-put trashes files and directories. * trash-empty empty the trashcan(s)