[Tutor] Python Script Problem. Simple sql problem & py problems.

Panagiotis Atmatzidis p.atmatzidis at gmail.com
Tue Dec 6 17:48:46 CET 2005


I wrote my first script (ever) in Python. It's an interface for
handling the proftpd virtual users. I wrote the script after reading
the howto.
You can see the browse[1] the code anytime.

These are my first steps in programming in general so.. the problems
that this script has until now, are two:

One is that MySQL's autoincrement works only the first time, I can't
add users after I exit the program the first time. This version or the
script is a re-write. The first one, had no problem with that. The
users were getting the respective key in auto every time I was about
to add a user.

The second one is more python specific I guess. The programs prints
the "Exiting" string on exit one time for every action I do. Which
means that if I add 4 users, I'll see 4 time exiting printed. If I add
2 users and delete 1 user, I'll see 3 exiting prints and so on. Any
idea why does this happen?

Best Regards,

Panagiotis Atmatzidis

[1] http://beast.merseine.nu/files/other/vuhandle.html

ps. This script comes with a specific proftpd configuration file, it
does not make sense without it. If someone wants to test this please
drop a mail and I'll upload the proftpd conf file.

More information about the Tutor mailing list