edit.py now checks validity of jobs, prompts user to correct invalid crontabs, and opens the crontab via preferred text editor, if available. Otherwise it prompts user to set a preferred text editor and exits.
Replaced python-crontab validity check with a version using croniter. Adjusted style. Now continuously prompts user to edit their invalid crontab.
Minor style error (one trailing whitespace character).
Small stylistic changes. Store boolean for amount of params, and no newline after prompt.
Removed main function call, made the prompt response case-insensitive, and added ValueError to the except for validating jobs.
Now displays the invalid crontab the user attempted to input, if they decide to edit it.
Merge branch 'master' of https://github.com/BigFav/MegaCron into fnc4
Removed bad elif statement.
Removed useless "valid_interval" variable
Merge pull request #35 from BigFav/fnc4

edit.py Update
Added all the options for crontab. Does all functionality except for -i. Overrides the print usage and print help to display the true usage. Each user has a crontab stored as string in the db file. Effective root users may access any crontab, while others may only do commands to their own. Removing a crontab also removes the jobs associated with it. Removing a crontab simply replaces it with an empty string, and the jobs with an empty list. Crontab lines that begin with # are ignored, and comments that are on a command line, but separated by 2 spaces, are parsed out and ignored as well.
Added all the options for crontab. Does all functionality except for -i. Overrides the print usage and print help to display the true usage. Each user has a crontab stored as string in the db file. Effective root users may access any crontab, while others may only do commands to their own. Removing a crontab also removes the jobs associated with it. Removing a crontab simply replaces it with an empty string, and the jobs with an empty list. Crontab lines that begin with # are ignored, and comments that are on a command line, but separated by 2 spaces, are parsed out and ignored as well.
Now using if-else instead of dict.get because if-else is faster.
defaultdict is faster, not sure why I wasted time with the other implementations. This may introduce a slight overhead of 120 bytes, may switch the lambda function with (bool).
Changed the defaultdict function to bool.
Added functionality for -i, and made the code version independent. I could not test for Python > 2.7 as I did not have the croniter package installed for Python 3.2, but it works for 2.7.
Adjusted to work for Python3 as well.
Forgot to remove main call.
Previously, I was oddly defaulting the user to root, and now that was fixed.
Small stylistic change (used pwd attribute instead of index in getpwuid).