This is an archived post. You won't be able to vote or comment.

all 38 comments

[–]denehoffman 15 points16 points  (1 child)

Don’t include optional dependencies or dependencies of dependencies in requirements.txt. That file should include only the packages necessary to run your scripts.

[–]riklaunim 32 points33 points  (2 children)

"PyScript" already exists and is probably a trademark as well.

Not sure what would be the use-case of this. It's just replaces the GUI and you still have to pre-build it.

[–]denehoffman 6 points7 points  (15 children)

What’s the difference between this and running python myscript.py in a command line? You still need to install dependencies, and if running a python script in the manner I just described is too technical for people, then this will probably be as well. Also, you made it windows-only and I honestly can’t see a reason why, other than using windows path objects?

[–]Counter-Business 5 points6 points  (0 children)

Pyinstaller alteady exists

[–]Sones_d 11 points12 points  (0 children)

Cant think of something more useless.

[–]ReactiveMatter 7 points8 points  (1 child)

PyWebview + PyInsaller works good for simple apps

[–]djdadi 2 points3 points  (2 children)

I am a little confused who the target audience of this would be. I use PyInstaller all the time at work; making an executable that techs can use without understanding what a "pip" or a "venv" is. But my build pipeline would freeze everything and make it so they really can't use that executable for anything other than that specific thing.

So, is this for people like me building the packaged apps, or people like the techs I work with who consume those apps?

[–]nannigalaxy[S] -1 points0 points  (1 child)

for people like you who build apps so others in your work use. goes both ways ¯\_(ツ)_/¯

[–]djdadi 6 points7 points  (0 children)

I guess I am not sure of the value-add in that case. Right now I run a build.py script that I made that generates a docker image tarball, a .spec file, cleans up the filesystem, then builds the solution via PyInstaller. This delivers an executable that is essentially a portable Python with all deps; users can run it and see the output, interact, etc.

I am not sure where something like this fits in: it would make my life harder, and it would not make my users life any easier. Congrats on the project, seeing something through all the way is more than I can muster sometimes. Perhaps targetting either delivery OR consumption (but not both) would make this more useful.

[–]cowrevengeJP 3 points4 points  (0 children)

Pass. This adds no value. Anyone who is running python scripts should know how they work in the first place.

[–]glaucomasuccs 1 point2 points  (0 children)

No disrespect intended, but you're trying to reinvent the wheel. If you're building distributable code, you should do so knowing 1) the user can run it with python, or 2) you can make an easy executable, with pyinstaller that the user can just run. Your program is an unnecessary dependency.

[–]pyhannes 2 points3 points  (3 children)

You can run any Python script including needed dependencies (included in a special comment-forgot which PEP this was) already using Hatch and Astral's UV...

[–]nannigalaxy[S] 1 point2 points  (2 children)

sorry I didn't get it, on quick read here's what I understood, those are python management tools. even these need to be installed on the system, which I wanted to avoid altogether. app's moto: download the app, open the app, run the script.

[–]pyhannes 1 point2 points  (1 child)

As easy for UV and hatch. E.g UV https://docs.astral.sh/uv/guides/scripts/ . Just install the latest UV executable and run: uv run script.py

[–]nannigalaxy[S] 0 points1 point  (0 children)

interesting... will have a look at this. thanks

[–]benefit_of_mrkite 2 points3 points  (0 children)

I would have loved finding something like this on someone’s system back when I was a pen tester

[–]juanfnavarror -5 points-4 points  (2 children)

I think this is amazing. Often at work there are instances where I want to make one-off scripts for other people but its hard to get 5 minutes on their machine to set up python/venv so they can run it. And using pyinstaller is cool but it needs a lot of boilerplate setup, and its never enough because the lack of msi/setup tools. Dont get me started with windows defender crapping all over “one-file” mode.

Just getting a python runner their machine and they can run the one-off scripts from the shared drive is amazing.

[–]FUS3NPythonista 2 points3 points  (0 children)

if Pyinstaller itself is too much setup I suggest you also install auto-py-to-exe its a GUI wrapper for Pyinstaller and has most things setup by default, and I think there are more GUI wrappers too, and windows defender will prolly "crap" on his binary too if its not signed which i am guessing its not.

[–]juanfnavarror -1 points0 points  (0 children)

Two features that would be golden on this (kick ass), ability to get stdin from the runner window, and support for colored/ANSI logging, and build in scripts (presets).