How to create my Python3 automation program useable by another users? - python-3.x

Right now I can create a simple Ms.Excel automation program using Python3 but I want to others can also use my program.
What kind of features or packages that I could learn to make others able to use my program? Such as turn my program into portable software or web application?

You need to look into packaging your python application with all its dependedncies. Pyinstaller is a good way to go you can find a very good tutorial here.

Related

Python integration in Qlik on MacOS

I'm very new to using Qlik and at the moment I've only used the cloud via my browser. I would like to integrate python and Qlik such that I can run my code on data in the QlikCloud and visualize using Qlik. I am using a Mac, therefore I can not install the desktop version of Qlik to do the integration.
Do you have any suggestions on how to integrate python in Qlik while using a Mac?
Any suggestions are highly appreciated, I have not been able to find any complete answers yet.
Thank you!
Use Data Load Script
When I first started Qlik, I had a very similar situation. My goal was to manipulate data to do calculations in Python, then basically import that into Qlik. What I ended up learning and realizing is that there's a 90% chance what you're trying to calculate outside of Qlik can be done in Qlik's data load script.
Get started with the Qlik data script: https://help.qlik.com/en-US/sense/September2019/Subsystems/Hub/Content/Sense_Hub/Scripting/introduction-data-modeling.htm
In my opinion and experience, Qlik Community Forum is more active than Stack Overflow. I highly recommend checking it out for help: https://community.qlik.com/
But If You Still Need External Calculation...
That said, if you do have crazy calculations and math to do and/or need to use an external "thing", Qlik has a repo for a server-side extension. Repo at: https://github.com/qlik-oss/server-side-extension (Docs and instructions in the link)
It has extensions for Java, C++, C#, Go, and Python.
I highly recommend this Server Side Extension developed by Nabeel which you can run in a docker on your machine. https://github.com/nabeel-oz/qlik-py-tools

How to make a python application distributable

My question pertains to distributing a python application the proper way. i have done research, but the answers appear to be vague and usually instruct the user to upload projects to the python package index. I simply want to make sure i research the proper methods instead of steering in the wrong direction.
I have been writing a stock analysis application with stored text files, and a dozen or so python scripts that interact with each other. Outside computers are to communicate with my servers through a random port (not the internet ports). all the imports work properly and the communication works properly, but i have no clue how to approach the distribution/setup or the GUI.
As an application with dozens of python scripts, should i write each script as an executable via pyInstaller, or should i add a python environment to the application to install python on all the user systems?
I need to add 'README', and 'LICENSE' to the application. What is the point of set up? is that a resource so python knows what is going on or does it actually setup the application? Does it need a URL, and what is the point of using the URL? Do i need anything else for the setup tools?
How do i package the entire application to download on user systems? I want the software to be uploaded via a URL link or from a USB. Do i have to make a tar file? i can do it automatically by writing my own python setup script, but i believe python has an easier way. Do i put a function in the setup to send an executable file to the desktop as a controller so the users don't open all the folders? How do i install from a link on a website?
For a graphical interface for the users on python applications, do most programmers use tkinter, or python integration into HTML, CSS? I do not want this application to be live in a website, but rather as a desktop application. Do i need to use a framework, such as django, to implement python into my html code?
I apologize if this is all unorganized. Ive always coded my own programs and never distributed or put a GUI on any of the scripts, so i just want to make sure i approach the task the right way.

Python: Does the user need to download library?

noobie question here. I've been writing a program in python3.5.1 and I'm managing pretty well with the built in libraries like tkinter but I'm starting to want to use libraries that aren't built in with python3.5.1.
The problem with this is that as far as I can tell if I use a library that isn't built into python the users of my program will have to download the library as well. Which would be a major pain in the ass for a lot of users. Am I correct in assuming this? Is there a way to work around this?
I don't mind having to download the stuff myself, but I would like my users to be able to run my program with just basic python3.5.1.
Thanks
Users need to download your program. And many Python programs do consist of multiple source files. In some cases you can simply include the external libraries you use with the files you're shipping to the user. But this may not work well if the libraries contain compiled C code and you're targeting multiple platforms.
Alternatively, you can simply document which packages users need to install to use your program. They can then use whatever system package manager they have, or PIP, etc.

Automated test tools for Linux/ncurses

I've picked up a legacy application developed in C/C++ on Linux, using ncurses for UI. What automated testing tools are there for this environment?
Edit: I've used AutomatedQA TestComplete in the past, and this is the type of tool I'm looking for - except running on Linux, and with the ability to test Text UI apps.
I wrote something like that before. Not much docs, but you can try the code. It's written in Python and runs on Linux.
You would basically need the ANSIterm filter, and the expect module. Then you compose them into a filter. You'll likely have to start the process with the proctools module. They are all designed to work together or separately (modular).
I have considered using Rational Function Tester and TestComplete.
RFT has explicit support for testing this type of application (text-mode linux) via built-in terminal emulation.
TestComplete does not support testing Linux apps directly, but can be made to work by "testing" a COM-enabled terminal emulation program (Attachmate Reflection at this stage), and using COM from the test scripts to do screen scraping.
Have also considered using Reflection as the terminal emulator and rolling my own test framework in C# and NUnit.
Edit: "Final" solution is using Terminator (a Java terminal emulator), extending it with an RMI interface and using TestNG...
The expect tool sounds like what you need: http://linux.die.net/man/1/expect
Have a look at the free version of TETware from the Open Group. It is a full test harness based on TCL.

Best way to manage code snippets in Linux?

How you manage/organize your collection of code snippets on Linux? Is there a specialized tool to do that (both in GUI and CLI environment)? Is there any convention about code snippet management in Linux? Also, I often do some work via ssh so it would be really helpful if I can access my snippet easily from command line. I just moved to Linux for several months and still got to learn a lot about software development in Linux.
Any suggestion is appreciated.
Thanks!
I think this is what you are looking for: Snippely and jCodeCollector
I use Snippely on my mac, it awesome.
Update: Moved to Dash for mac: http://kapeli.com/dash
You could use Code Barrel to do that. For GUI based you could use the webapp but for CLI you could write scripts using the API. There is a plugin for Eclipse based IDEs as well.

Resources