Python Script Written - GUI options? [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I really am lost.
I've written a python script which takes two files, converts one to the same format as the second and outputs the differences.
I now need to create some kind of GUI?
I'm thinking a relatively simple HTML page which allows users to click on two separate boxes to upload each of the files and then submit them - resulting in the output being offered as file which the user can download to the PC.
Any help of direction would be really appreciated. It's only really a guess that HTML will be my best/simplest choice. Working from the command line isn't really an option I can go with. The PC that this will sit on will not have internet access. I intend to have this installed on the PC as an application.
I accept I'll need to make some changes to my Python code. Posted this here as I'm not sure Python questions would have been the best place but I'll move it if suggested.
Please, any help at all will be useful. First timer

This is not a kind of answer that normally gets a reply on StackOverflow because it is much too broad / subjective.
Given the fact that you are quite new I would like to provide a solution anyway that will allow you to build a GUI quite easily like EasyGUI.
A very easy example:
import easygui
easygui.msgbox('This is a basic message box.', 'Title Goes Here')
Other possibilities (less customizable but arguably easier) are Wooey (automatic web interface generation for your script) and Gooey (automatic GUI generation for your script.
Please, for next time, remember to always provide a Minimal Reproducible Example and read https://stackoverflow.com/help/how-to-ask

I don't suggest you use the Django Framework for such a small application.
You should definitely use Flask for this. Flask is more lightweight

Related

Must everyone who uses my program see the ugly code next to it? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I started working on some beginner projects and games to test my abilities.
I found that all I was doing is simply writing a code and seeing the ugly output next to it (in the interactive window). The code works, but that's not how I want a normal user to interfere with it.
I'm looking for a way to display my python program properly to a user. Is there some sort of interface manipulating that I should learn in order to accomplish that? thanks.
It sounds like you're seeking to build a GUI for your programs.
In several of my early projects, I used the built-in Tkinter module to accomplish what you're suggesting. It may not give you the most modern-looking GUI, but it's nice to use due to it being included with Python by default and the abundance of documentation and tutorials.
There are tons of great videos on YT that walk you through step-by-step on everything from pop-up, dialog-box messages, to full on user-input, menu-laden GUIs. Just search "tkinter tutorials".

Good Python Module for Saving Data [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Okay, so I'm new to coding, so don't kill me. I just started about a year ago and I use repl.it. I want to learn how to save user data. Also I want to know what python IDE is best suited for this.
If you want human-readable cross-programming-language data files, check out the json module.
If you want data that is faster, but that only python can read, check out the pickle module.
About your IDE Question:
From my point of view, you don`t need an full featured IDE at this point, though PyCharm is quite nice, despite the fact that it's written in java xD... (and it has a ton oof features that will be noise for a beginner (ME 2 ...)) you can make sth. like VS Code quite easy to sth. like a lightweight IDE. If you don't like Microsoft, go for Sublime, or Atom (both also Editors with nice plugins and extensions for Python and other languages...)
If you want to go for scientific python features: check out https://www.spyder-ide.org/
Have fun :-)

Automatic Configuration Generation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am installing Cisco ASA Firewall for my customer at several locations. The basic ASA configuration for all the locations is the same with a deviation of certain things like Interface IP addresses, Routing next hops, etc.
For every location I have an excel sheet with all the variables.
I know basic Python. The question is : is it possible to write a script in python which will read the variables in the Excel Sheet and generate the configuration for ASA?
Moreover could someone recommend a source to learn scripting targeted for networking or such an automation task? (Simply googling led me to many confusing options and hence the question here)
I suggest you use templating engine such as jinja2 along with python.
(https://github.com/jedelman8/interop-nyc-2014.git)
(http://keepingitclassless.net/2014/03/network-config-templates-jinja2/)
Or you can use simple Ansible tool along with Jinja2 templates to generate configs. (No need for programming skills)
(https://sreeninet.wordpress.com/2014/09/28/ansible-for-networking-automation-part-1/)
(https://sreeninet.wordpress.com/2014/09/28/ansible-for-network-automation-part-2/)
(https://sreeninet.wordpress.com/2014/09/28/network-device-configuration-using-templates-with-jinja2-and-yaml/)
(http://jedelman.com/home/ansible-for-networking/)
I would also suggest to look at a very good library "netmiko" for ssh connection in future and push, pull config (https://github.com/ktbyers/netmiko/tree/master/examples)
All above options can work for you. See below examples. I am a Network professional myself and found these useful.
This is pretty easily done with Python, but will take a bit of learning.
Depending on the format of the Excel file, I would recommend OpenPyXL, or XLRD.
This will also depend on the configuration format you are wanting to output. If it's a JSON Config file, you can simple use the built-in json module. Otherwise, there are a variety of other modules out there for things like CSV, etc.
One warning, however. If you hard-code all of your Excel columns/positions within your code, you could be in for a world of hurt in the event that the columns change.

mysql to pdf - python or ruby [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
i have a mysql database that i'd like to query. i would like to format the results a certain way, then turn it into a pdf. in the past, i used PHP and FPDF, while it worked, it was a pain and tedious. i don't think PHP can handle this sort of thing. i don't have much experience in python or ruby but this would be a great project to do in either language so i can get more familiar. it doesn't have to be web based. it can be desktop script that i could run with a cron or manually. hope someone can point me to some resources. thanks.
In Ruby you have a number of options for your PDF authoring, and your DB management is very easy if you use the ActiveRecord library (comes with Rails) or Sequel to read or write data.
Complete and heavy duty PDF authoring can be done using Prawn... it requires some studying, but it's an amazing library.
You can also create HTML web pages and convert them into PDF using the wicked_pdf gem, which is quite simple to use.
Or, you can combine it all, or write simple PDF's with simple tables and text using the combine_pdf, which is as easy as it gets and also allows you to use PDF templates (so you can have a well designed template and just add the text you need).
I love Ruby and I think it's very easy to learn. Plus, it has more applications than just web programming - there's even a project called RubyMotion which lets you program native applications for iOS and Android using Ruby!
I'm sure you'll love Ruby.
In Python, you can use pyPdf to create PDF files. As for the querying a mySQL DB, you can use mySQLdb. Installing it is slightly harder than other modules, but once you have done so, it's just like any other sql package. Hope it helped.

I want to develop a framework in Python for desktop based applications. How should I go about it? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I want to develop a desktop application framework in Python, much like QT, but how to go about it? Any tutorials or links related to it would be helpful!
There is so many great freameworks like wxPython (Tutorial), PyQt (Tutorial), PyGtk (Tutorial) already.
You just need to try your favorite one.
You can get a pretty comprehensive list of Gui programming frameworks for Python here, http://wiki.python.org/moin/GuiProgramming
Well the best way to start is to look at the source code of the framework the other answers are talking about.
First, try to use them all to build the same application with the functionalities you expect from a framework. Them, look at how it works under the hood.
Secondly, build your framework, starting by writing your first widgets, then notice the problems with your current architecture, and re factor. Start again, until you have something stable and usable.
Eventually, find out this was nice as training experience, but useless as a contribution to the software communities since you will never reach out the qualities of existing tools.
Then give up and try to code your own MMORPG.
theres WxPython tutorial http://www.wxpython.org/tutorial.php
or PyQt http://zetcode.com/tutorials/pyqt4/
or the ever stylish Tk http://www.pythonware.com/library/tkinter/introduction/

Categories

Resources