How to run a Python script on another PC
📁 Advanced Python Topics, question, work
Hello, I started learning Python. I'm wondering how to run a script on another computer (both PCs on Windows) without preparing the machine (without installing Python)? All I could find is the method of creating a .exe file using py2exe.
I would like to know if there are alternative ways to distribute a script (more "correct" ones) and what are the disadvantages of this approach.
The book doesn't have (maybe I haven't read it yet) methods describing portability, maybe I just don't understand the purpose of this language yet?
Python can be very helpful if you need to automate something while working on "my" computer. Or web applications, which also don't require Python to be pre-installed on the end user's computer. That's what I understood: But you can also write a regular desktop program on it, optimize
For example, like this:
>>> a=('!',',','?')>>> s='dasd,sadarg!ada'>>> ''.join(filter(lambda x: x not in a, s))'dasdsadargada'or
>>> ''.join(x for x in s if x not in a)'dasdsadargada' Log in to leave an answer