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

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 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 employees for

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, snip 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

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: Code Review request for the trash-cli project

2009-01-06 Thread Dotan Cohen
2009/1/6 Andrea Francia andrea.fran...@remove-from-here.ohoihihoihoih.to-here.gmx.it: 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: *

Re: Code Review request for the trash-cli project

2009-01-06 Thread Andrea Francia
Dotan Cohen wrote: 2009/1/6 Andrea Francia andrea.fran...@remove-from-here.ohoihihoihoih.to-here.gmx.it: 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

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 I