Re: Simple Python Inventory Program

Well, it's been a while since I posted anything about Python. I completed my BS in Computer Engineering and I'm working on my MS in IT Management, so not a lot of spare time lately.

The main thing I've been working on the last few weeks has been making an inventory system for my wife's business. She currently uses a spreadsheet to create her price lists and inventory, but she has to manually create an order form in email every time she buys new things (she's a consultant for a friend's home business, so no one has spent money on a real ordering system yet). read more...

Please let me know what you think.

This is an auto-generated message posted by GIDNetwork™ on behalf of the author.

Re: Simple Python Inventory Program

Thanks for clearing that up Crystal,

I thought I had seen that feeble-minded Quitter thing before. Another thing is that the MultiListbox code has the old Python NoNo of mixed space and tab indents and hangs up misserably on the DrPython IDE.

Re: Simple Python Inventory Program

I usually go through and clean up imported code when I use it in my programs, even if it's just to add comments so I know what it's doing. But usually I find a lot of small quirks that I can fix, like the tabs vs. spaces indenting.

The code I just posted are straight from the "source"; they aren't the modified ones I'm actually using, though I didn't modify the quitter program very much since it does what I need it to. However, they should work for someone who wants to use them as-is.

Out of curiosity, why do you consider the Quitter "feeble-minded"? (I just like to know how other programmers think so I can get better myself).

Re: Simple Python Inventory Program

Congratulations C, and thank you for sharing your work.

Recently, I was also interested in a simple "inventory program", and I was going to write to you about your program but problems with my Internet connection prevented me from starting a discussion with you.

Considering that I know nothing about Python, how difficult is it to 'install' this program on my (Windows XP) PC? That's considering that you are willing to share the files with me, of course.

On a related note, I have been using StarOffice / OpenOffice since 2000, and the only thing I missed is the fact that it didn't include a database program.

Today, I see that this is no longer true. Version 2+ (I was using ver.1+) comes with a database program (Base), and the best part, is that I can use it to connect to my existing MySQL server.

I have just downloaded the file (took a while!) and I will experiment to see if I can create a simple form to help me manage my inventory.

Re: Simple Python Inventory Program

As long as you have Python installed on your computer, it should work just fine. The easiest way to run it is just type "python MPPInventory.py" at a DOS prompt; you just have to make sure that all the necessary files are put in the same directory. Because of the interest, I'll see about making a .exe file so everything will be in one package and easily runs on Windows.

Please be aware that it's a very simplistic program right now. I made it as a coding practice mostly so it doesn't have all the whiz-bang features a true DB should have; it's really just using hash tables to store everything. But if people are interested I can work on it some more; Python 2.5 has SQLite built in so I make a true DB out of it.

I wasn't aware that Base connected to MySQL. That's pretty cool. I thought it was just an Access clone; it sounds like it may be even better than Access in that sense.

Re: Simple Python Inventory Program

I've created a Windows .exe file but it weighs in at 4MB, so I can't upload it here. If you would like a copy, just PM me w/ your email address. Otherwise you can just use the Python scripts in the below ZIP file. If you need help, just ask.

Re: Simple Python Inventory Program

So what happens if you didn't want to quit but clicked the wrong button accidentally? I've had it happen several times so I personally like being asked if I really want to quit.

Now, if I close the window with the "X" corner button, then I don't want to be bothered because I'm voluntarily closing the whole thing. Of course, it still might be good to have an "are you sure?" dialog in case the user was trying to maximize/minimize the window.

Probably the best thing is to make it user selectable: have a check box where a person can specify "don't ask me again". That way everyone should be happy.