Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Carpenter learning python
#1
I would like to create a program where I can input different types of jobs, eg hanging doors or building interior walls etc and make it easier for me to estimate quotes for clients depending on work to be done and time and material used as variables.

I am interested to know if this is something that could be done in python?

I am new to programming and barely know how to program the turtle, which is fun :D, but I am interested to learn and think it would be a nice and useful project for me.

I am imagining a simple graphical interface where I choose from a list the type of job and then get a rough estimate depending on square meters or hours of work.

Do I have to design the interface myself or is there someway in which I can take a few shortcuts on that front?

Please forgive my ignorance on the subject.

What should I be learning and in what order to make it possible for me to create this?

I appreciate any help and pointers that I can get :)
Reply
#2
(Dec-20-2022, 10:12 AM)Snickaren Wrote: I am imagining a simple graphical interface where I choose from a list the type of job and then get a rough estimate depending on square meters or hours of work.
Many graphical interfaces exist. I suggest guidata which was developped by the French CEA to help scientists input data into their programs. I used these forms for several programs and it is very user friendly.
Reply
#3
Thank you, I´m looking into it!
Reply
#4
I do electrical/construction as well as Python so i can relate.

My first question is are you planning on running this on a desktop for quotes at home or office or are you planning on using it on the job remotely such as using your phone?

The reason I ask this is because GUI on the desktop would be highly different than on your phone. The desktop would have a lot of options, the phone not as many.

Python can pretty do any math required for construction, and far beyond such as equations, etc. So the real.question is which GUI did you want.

Desktop GUI would be PyQt, WxPython, or Tkinter. Tkinter would be ideal for newbie as well as there isn't a lot required for GUI in your program other than a few drop down lists and some input boxes. Tkinter is the simplest, but PyQt last I knew had a GUI builder where you drag and drop widgets to "build your GUI". Personally with how simple your program will be, learning how to use the GUI builder would be overkill.

As for mobile GUI, the only one I know about would be Kivy. But there may be more now as I am out of the loop for a couple years.

Next you could do a web interface

So it really.depends on which way you want to go.

Quote:I am imagining a simple graphical interface where I choose from a list the type of job and then get a rough estimate depending on square meters or hours of work.
My initial thought would be something like Rock Auto dot com with expansion for organizing job types, but with input fields for amount of wood and material used based on size as well as average time a job takes for hours. Then allow a toggle system to append each job to a total. Could even add a print to print this out to a suspected customer laying out the projected costs for material and labor. But there are a lot of different ways you could go.

Also the cost of materials fluctuate so much that instead of some arbitrary number for a 100' roll of 12/2 romex. I would have the script go to wherever you buy materials (Lowes or Home Depot, etc. ) and modify the price based on the current price. Then your estimate fluctuates with the cost of copper instead of possibly screwing you or the customer. Having this implemented into your script would require you to web scrape using BeautifulSoup or Selenium python 3rd party modules.

As a side note. This seems like such a common task for construction that it would not shock me if this program already exists somewhere. I would google and check Github and Bitbucket for existing projects before delving into this. You may find someone had already made this exact program or so close to it that you just have to modify it slightly to add more of what you want. Dont reinvent the wheel, if.you don't have to.
buran likes this post
Recommended Tutorials:
Reply
#5
Not an expert, but: There is the frontend, which is what you see, where you can click a button, enter a quantity, then there is the backend, which a. holds the data and b. does the calculations.

I'm thinking you may be trying to reinvent the wheel. There must be such programmes available.

Without getting into MySQL, Python has a thing called a dictionary. A dictionary always has key: value pairs, so you could, as a simple example, make a dictionary, say timber prices per foot:

timber_prices = {"4x4": 5, "4x2": 3, "4x1": 1, "8x4": 8}

You can access any price using the key: print(timber_prices["4x4"]) and multiply it by the length you need.

length = 500
price = timber_prices["4x4"] * length

Without getting too complicated, a dictionary can be saved directly as a .json file, which is basically just text, so small memory footprint.

You can always reload the json as a dictionary and alter it, change it, extend it, save it again.

Dictionaries for everything! That kind of stuff could be going on in the backend.
Reply
#6
(Dec-20-2022, 10:12 AM)Snickaren Wrote: What should I be learning and in what order to make it possible for me to create this?

Lots of discussion on the GUI, I will tackle this part. You said you are just learning Python, so I would suggest that you get a handle on basic structures and data types (lists, dictionaries, functions, classes, and basic operations). Then come up with a list of tasks that you want your program to do, such as read parts list, edit parts list, save parts list, calculate costs, calculate costs plus margin, save estimate, new estimate, load estimate, etc.. I don't know your business so there may be more items or fewer. Then, tackle each of those and learn what is needed. For example, file management for the loads and saves.
ndc85430 and metulburr like this post
Reply
#7
(Dec-20-2022, 11:45 PM)metulburr Wrote: Also the cost of materials fluctuate so much that instead of some arbitrary number for a 100' roll of 12/2 romex. I would have the script go to wherever you buy materials (Lowes or Home Depot, etc. ) and modify the price based on the current price. Then your estimate fluctuates with the cost of copper instead of possibly screwing you or the customer. Having this implemented into your script would require you to web scrape using BeautifulSoup or Selenium python 3rd party modules.
This crossed my mind but at the moment is probably too advanced for me, I´m not in any rush though so a script that updates prices is probably something I would like to implement further down the line.

At the moment I am only thinking about a desktop version, but who knows :).
(Dec-21-2022, 08:36 AM)Pedroski55 Wrote: I'm thinking you may be trying to reinvent the wheel. There must be such programmes available.
Yes, you are probably right, I just thought that perhaps it would be a nice challenge for me to try and make my own. Might regret it later Big Grin
(Dec-21-2022, 04:11 PM)jefsummers Wrote: You said you are just learning Python, so I would suggest that you get a handle on basic structures and data types (lists, dictionaries, functions, classes, and basic operations).
Yeah, I actually feel quite confused and overwhelmed no matter what i try do, so I have to take everything in small chunks in order to not get too discouraged.

I´m using the terminal in windows, is that ok?

The response I get for asking help is very encouraging, so thanks everyone Smile !
Reply
#8
If your doing desktop I would do Tkinter as it is the most simple and the easiest in terms of beginners. And since the program is for yourself, the aged appearance of tkinter won't really matter.

I would do exactly what jefsummers said. Forget GUI and learn the basics first. GUI complicates the program and if your not ready you will get overwhelmed. Maybe try a console program first and then later do a GUI.
Recommended Tutorials:
Reply
#9
(Dec-21-2022, 07:10 PM)Snickaren Wrote: I´m using the terminal in windows, is that ok?

Sounds like the hard way. Lots of other options that will give you color highlighting, syntax checking, automatic proper indentation, etc. I would recommend VS Code (and someone will supply a link on a recommended setup), with Spyder being a close second.

I also like the Head First series of books (Head First Python in this case) - slightly snarky sense of humor - that can walk you through a lot of the beginning stuff.
Snickaren likes this post
Reply
#10
Quote:I´m using the terminal in windows, is that ok?
It's something that is always good to know how to as a beginner, but an IDE makes it easier to handle code.
Snickaren likes this post
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020