The Best Solution to the Shopping List Ever

No phone, no cloud, no data-sharing. Just a spreadsheet, some Python and a receipt printer. And it's awesome!

Similar projects worth following
My wife told me she felt uncomfortable using Out of Milk on the phone at the store. It seemed inevitable that sooner or later the phone would be knocked out of her hand or dropped accidentally. I found the whole experience of the app klutzy and inconvenient.

So, what if we just used Excel or LO Calc to manage our shopping list, and printed it to take to the store? But that letter sized paper is just unwieldy when you’re negotiating the aisles with a cart. What would be great would be a list on a receipt sized printout. Like from a receipt printer.

This is, quite frankly, the most awesome shopping list method we’ve ever used. It’s quick, convenient, easy and we are not sharing our shopping habits with any unknown third party. You can check it out on Github if you want.

ShoppingList is written for Windows in Python. Tkinter is the Python module that creates the graphical interface.

ShoppingList ('SL' from here on) reads from an LibreOffice Calc or Excel .xlsx file. It displays your compiled list in a window, and just to the right of it, gives you a space to type notes you want to appear on the final printed list.

SL reads data from the first four columns. The first column must be named 'Qty', which is short for Quantity. Maybe in future releases that will be configurable, but for now, it seems like a pretty basic category to use for this sort of thing.


SL is intended for use with a networked 80mm ESC/POS receipt printer. There are many under a hundred bucks to choose from. No more carrying that $900.00 phone around in your hand while navigating the treacherous aisles of your local grocery store. Instead, your list is on a small piece of paper that won't break if it gets dropped.

The python-escpos module is used to interface to with the printer. It contains support for serial and USB protocols as well as network, but network is so simple that it is currently the default transport protocol. Perhaps in the future the other protocols can be added.

THE FILE MENU: There are three options: Configure, Select Database, and Exit.

  • Configure lets you set the IP address for the recipt printer as well as set your own title text for the top of your printed shopping list. This is stored in ShoppingList.ini which is in the same folder with ShoppingList.exe.
    • When you set the title text, try to keep it less than around 20 characters long.
  • Select Database opens a Windows file selection dialog. When you click on the file of your choice, the location of that file is saved in ShoppingList.ini.

SL optionally creates a PDF version of your list when you print. This file is saved in the folder where your Shopping List .xlsx file is. 

You can actually use SL without a receipt printer by leaving the IP address at  Select 'File/Configure' to set the IP address.

  • RELOAD: Once you've selected your database file and set your printer IP address, it's time to add some stuff to your list. In your .xlsx database (aka, spreadsheet), add the quantities in the Qty column to the things you need to buy. If you have SL open, after saving the database file you can press the 'Reload' button and your list will be displayed in the 'Selected items' box. In this way you can keep track of what you have added to your list as you go.

  • CLEAR ALL: If you want to clear your selections from your database after printing your list, there are two steps: 1) Check the 'Clear All Qtys' checkbox, and 2) press the 'Clear All' button. If you press the button without checking the box,your selections will NOT be cleared, and you will see a info box telling you just that.

  • PRINT: This . . . well, it prints your list. Afterwards you will see a box asking if you want to exit or not. If you exit, your current selections will be retained in the database. If you want to remove them, select 'No' and go back and use the Clear All function to remove them.

I compiled this using pyInstaller. I chose the 1-Folder option rather than the 1-File option because it seems to load and run quicker. Unzip the .zip file somewhere and make yourself a shortcut to the .exe file. I have mine pinned to my Taskbar.

You can always find the current version number in the 'About' dialog.

  • v.1.8 adds list title options

    Gregory Sanders09/10/2021 at 02:10 0 comments

    I added a couple of checkboxes to the Configuration window.

    One took the place of a text field for saying "yes" to automatic PDF generation, and the other lets ShoppingList create your list title from the filename of the database you have open.

    So, you can have an automatically generated title at the top of the list, or you can specify what you want to show up there.  Your choices are saved to the .ini file.

  • 1.7.2 adds 'Edit Database' button

    Gregory Sanders09/09/2021 at 00:16 0 comments

    I realized I should put a button in the application that would open the database spreadsheet for editing using the system default application for spreadsheets.  So I did.

    The spreadsheet must be closed after editing before pressing any other buttons, otherwise you get a popup reminding you to do so.

  • v1.7 improves Word-wrap

    Gregory Sanders09/06/2021 at 19:24 0 comments

    Word wrapping is much better now.

    The Notes section previously did alright with wrapping, but in the actual list itself, not so much. So now, items in the list that are longer than the paper is wide are wrapped and indented on the second and subsequent lines.

    v1.7 is available at Github:

  • First Windows Setup.exe

    Gregory Sanders07/19/2021 at 00:08 0 comments

    I just created my first ever Windows setup.exe using Inno Setup.  My limited testing here indicates it works as expected, both for installing and uninstalling.

    I was  only able to get it to work by only installing as the local user, not 'For Everyone'.  I think it's a permissions problem, but I have neither the inclination to worry about it, nor the interest to chase it down.  I don't think this app deserves 'For Everyone' status, so this isn't a problem from my perspective.

    Other than that, it seems to work great!  ShoppingList is available on Github here.

  • Backup .pdf List Feature

    Gregory Sanders07/15/2021 at 10:29 3 comments

    If you get to the store and reach into your pocket for the list you printed at the house, and you suddenly realize you left it sitting on the kitchen counter, what do you do?

    As an emergency backup strategy, I thought it might be good to figure out how to create a receipt-sized .pdf of the list and save it into one of the cloud storage services that everyone has on their phones and laptops/desktops/whatever.

    The irony is not lost on me, but this would not be intended (at least not for me and my wife) to be the primary strategy for the shopping list.

    Last night I worked through learning about the 'reportlab' module, and I was able to get a .pdf with the size and font spacing that was close enough to the actual printed receipt to satisfy me.

    Next I'll move my test code over to the main app and see if I can get the whole thing to work.

    7/15 UPDATE: It works, and now v1.6 is on Github.  I'm really excited about how this has come together.

    Actually, now if you want to use the .pdf as a list on your phone, you can just leave the printer IP set at it's default and SL will print your list to the .pdf file and save it to the folder where your .xlsx file is located.

View all 5 project logs

Enjoy this project?



rafununu wrote 09/18/2023 at 15:28 point

You can change the Excel print format ad well and use a pair of scissors !

  Are you sure? yes | no

Julian wrote 07/19/2021 at 02:29 point

Super cool. I got an unused Bixolon printer off work and replaced the original wifi module with a Pi Zero. Currently working on a little webinterface to print shopping lists and all sorts of stuff. Definitely gonna have a look at how you made it work

  Are you sure? yes | no

Gregory Sanders wrote 07/12/2022 at 11:00 point

That sounds like a fun way to spend some time.  I hope it worked out for you!

  Are you sure? yes | no

mark gunderson wrote 07/15/2021 at 17:46 point

Feature request: sort the list based on where in the store the items are. I understand this is considerably more complex, as you'd need to map your store somehow. But I think it would be pretty cool. Put cold or frozen items last at the very least.

  Are you sure? yes | no

Gregory Sanders wrote 07/16/2021 at 00:54 point

You can actually do that now.  Create an .xlsx file for a store.  Create a tab for each aisle.  When you print your list, it will be in the order of the items on each tab from left to right.  At least that's what has happened so far.

  Are you sure? yes | no

TacticalNinja wrote 07/14/2021 at 10:15 point

Sweet! I think the unmentioned featured here is that you can also strike out completed items without needing a writing tool (if this is a thermal printer).

  Are you sure? yes | no

Gregory Sanders wrote 07/12/2021 at 23:54 point

I have other tweaks in the back of my mind: 1) generate a .pdf of the list that can be viewed on your phone in case you lose the paper list, 2) provide a way to save 'recurring lists' and call them up in a hurry, those two are predominant.  And yeah, thermal paper is not great when you accidentally leave it on the dash of the car in August.  LOL.  Thanks for the comment!  73. KB5SBW

  Are you sure? yes | no

Dan Maloney wrote 07/12/2021 at 23:25 point

I'm right there with you on the phone as a shopping list -- it's more of a pain than anything else, especially for more than a few items. We've tried a number of apps, and nothing works as well as a dead-tree list. We mostly use handwritten lists on a scrap of paper, but this feels smarter. And maybe an idea for the future -- install a receipt printer in the car, so you can buzz off a quick list before heading into the store.

Of course with the heat lately, thermal paper might not behave...

  Are you sure? yes | no

Gregory Sanders wrote 07/16/2021 at 00:56 point

I got one feature going.  Now it prints a .pdf version of your list to the folder where your database .xlsx file lives.  The .pdf is about the same size as the actual paper list, so it looks the same on your phone or whatever.  I think that's pretty cool.  I've been having a blast learning how to make this stuff work!

  Are you sure? yes | no

Simon Merrett wrote 07/18/2021 at 10:49 point

We now need a micro plotter which takes graphite for mechanical pencils to perfect the shopping list system in hot weather! 

  Are you sure? yes | no

Gregory Sanders wrote 07/18/2021 at 11:39 point

LOL.  Yeah, that would be perfect!  I don't know where we would source rolls of 80mm regular paper, though. 

  Are you sure? yes | no

Simon Merrett wrote 07/18/2021 at 11:49 point

@Gregory Sanders  true - "when I were a lad" most receipt paper was plain and the ink was purple. No thermal paper. I'm sure it is available now as I doubt thermal printers are universal but it may depend on where you are as to how convenient it is. I expect aliexpress will be a more likely source than Staples.

For a UK source in that dimension range.

  Are you sure? yes | no

Simon Merrett wrote 07/18/2021 at 12:48 point

How about a laser burning the text into plain paper, like an underpowered version of Coasty:

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates