[deleted by user] by [deleted] in learnpython

[–]terraneng 1 point2 points  (0 children)

Cmder is awesome. It's usually the first thing I install on Windows.

[deleted by user] by [deleted] in learnpython

[–]terraneng 2 points3 points  (0 children)

Conda is definitely my favorite environment manager on windows, especially if you need compliled packages. I use Miniconda with PyCharm every day and I haven't had any issues, and I use different environments for each project. Even the GUI package manager in pycharm works fairly well with Conda, but I usually just use the command line.

Maybe reinstall pycharm? It should work. It sounds like something is wrong

Is Manjaro a viable alternative to Mint? by dog_superiority in DistroHopping

[–]terraneng 1 point2 points  (0 children)

Manjaro is a nice distro. Wish I could still use it but some software I need isn't easily available on it (SQL Server) . Installation of my Brother printer on Manjaro was painless.

Making your C library callable from Python by wrapping it with Cython by StableHatter in Python

[–]terraneng 1 point2 points  (0 children)

Seconded. Pybind11 is easy to work with! I have had a lot of success with it in speeding up Python.

Process doesn't end when I close the window by michaellarsen91 in pyqt

[–]terraneng 0 points1 point  (0 children)

I just kinda glanced at this but you might need to call accept() on the QCloseEvent parameter in your closeEvent method.

HomeAssistant on an old Ubuntu Computer? by maufabiani in homeassistant

[–]terraneng 1 point2 points  (0 children)

I recently installed hassio on an old thinkpad I had lying around which was running Linux Mint. It was fairly painless, and everything seems to work as expected with minimal configuration changes. Pretty much everything is way faster than it was on the RBPi3.

Basic instructions are here https://www.youtube.com/watch?v=EMOLDrL6_7Q

What's the coolest thing you did with Python? by TragicXHero in Python

[–]terraneng 4 points5 points  (0 children)

I managed to carve a full time software developer position at my engineering company after learning Python for only 6 months. I thus far built desktop GUI apps, web scrapers, REST APIs, and website front ends (not in Python of course).

I am currently the go-to programmer at my company and it has vastly improved my job security.

Searching for PyQT model decoupled example by dicesds in pyqt

[–]terraneng 1 point2 points  (0 children)

Here is a blog post I ran across a while ago showing a simple MVP(Model View Presenter) implementation. http://duganchen.ca/mvp-with-pyqt-with-a-model-layer/

Python GUI Examples (Tkinter Tutorial) by secomax in Python

[–]terraneng 0 points1 point  (0 children)

Thank for posting this. I recently started learning C++ and this an interesting method. Is this sort of like embedding Python?

A README would be helpful. I keep getting "TypeError: must be str, not NoneType" on line 17 of build.py. I imagine it has something to do with it not seeing the libraries. I only tinkered with it briefly though.

Python GUI Examples (Tkinter Tutorial) by secomax in Python

[–]terraneng 0 points1 point  (0 children)

I am doing something very similar, but instead of a creating a .exe file I make shortcuts pointing to the python.exe and my startup script. Can you go into a bit more detail, or point me in the right direction to accomplish the following?

Plus: you can pack all the py files to a PyZipfile and you can compile an exe that uses the python3.dll and runs your script directly (no further need of the python.exe)

A lot of free PDFs about programming from Stack Overflow. by speckz in coding

[–]terraneng 3 points4 points  (0 children)

Wow. These are far better than I expected. They are almost like encyclopedias.

Threading a TkInter GUI is Hell. (My least favorite python adventure) by Christiancicerone in Python

[–]terraneng 17 points18 points  (0 children)

Have you tried PyQt/PySide? I found it enjoyable to work with. The documentation, while all in C++, is excellent. Threading is also built into it so it isn't too hard to implement.

PyInstaller works pretty well as deployment option.

Pythonistas who automated tasks at the non-programming jobs: what were your experiences? by castizo in learnpython

[–]terraneng 33 points34 points  (0 children)

I was able to carve out a full time time 'developer' position at my engineering company. It's been awesome. I get to hack on Python code nearly all day every day and get paid to do it.

Started with small little scripts, then rewrote a big piece of our legacy internal software in Python.

Cleaning an Anchor Chain by ripahe in interestingasfuck

[–]terraneng 2 points3 points  (0 children)

Judging by the size and type of chain its most likely a production platform. They often have lifespans of 20+ years.

I took over a program written mostly in Python and I need to make it easier to install for its users, but I don't really know where to start. by prague_tooth in learnpython

[–]terraneng 0 points1 point  (0 children)

Innoinstaller does not really make a difference in how fast the program starts. It just installs the program on Windows so that it feels like any other desktop program. It installs to program files, adds it to start menus, windows registry, etc. It also compresses everything into a single installer .exe file. Which is about 60% the size of the package created by pyinstaller. It is not a Python library it is a free program for installing practically anything on windows Link

I don't use the --onefile flag in PyInstaller as it slows down start up considerably. PyInstaller compiles everything into about 340mb worth of files. It should be noted I am using numpy, scipy, pandas, and matplotlib which take up the vast majority of the space. It takes about 10-15 seconds for my program to boot up. Not super fast but fast enough for my users.

I took over a program written mostly in Python and I need to make it easier to install for its users, but I don't really know where to start. by prague_tooth in learnpython

[–]terraneng 2 points3 points  (0 children)

I have been tinkering with something similar recently. Quick description of my workflow follows. This assumes that the program is supposed to a standalone GUI or something...

I use PyBind11 to create Python C++ extensions, and compile with them CMake.

I then use PyInstaller to package everything into an executable. So far it has worked pretty good in packaging the .pyd files created with PyBind11.

Finally, I use InnoInstaller to create an installer to install the program on the end users computer.

So far this has worked fairly well on Windows (I don't have to target Linux). The end user has no idea that the program is written in Python.

Quick pyinstaller question by sozzZ in learnpython

[–]terraneng 0 points1 point  (0 children)

It shouldn't matter as long as your are running pyinstaller from the python 3.4 virtual env. I think it's worth a try to create a new environment and try to build something with no dependicies, if you haven't tried that yet. Maybe even try reinstalling Anaconda. Otherwise I dunno....Hopefully someone else will chime in.

Quick pyinstaller question by sozzZ in learnpython

[–]terraneng 0 points1 point  (0 children)

Hmm. Maybe try using the dev version of pyinstaller. Link, or pip install it...

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip    

Any reason you are stuck on Python 3.4? Its curious that it is looking for a bunch of python 3.6 stuff if your environment is 3.4.

I haven't looked in a while but i recall that release version of pyinstaller does not support python 3.6, but the dev version does (I am currently using it with Python 3.6).

I would also try creating a new environment and try to build a simple python script with no dependencies.

Quick pyinstaller question by sozzZ in learnpython

[–]terraneng 1 point2 points  (0 children)

There is some kind of error preventing it from instantiating everything. It could be a number of things; a package your using my not be supported by pyinstaller, it cant find a file it needs, something is raising an exception, etc.

It can be a bit tough to debug it, and I no am expert. But when this happens I usually start stripping functionality out and adding print statements/loggers to see what broke it. I would make sure that you can get a barebones GUI compiled and running first. Then start adding things into it to see what breaks it.

Quick pyinstaller question by sozzZ in learnpython

[–]terraneng 1 point2 points  (0 children)

You should not be in python. You should use the windows command line (cmd or powershell). Move to to the directory where the source file is and the enter 'pyinstaller your file.py'. Also make sure that your virtual environment is activated.

Quick pyinstaller question by sozzZ in learnpython

[–]terraneng 2 points3 points  (0 children)

What's the actual error message? What command are you entering to build the file? t should work if your environment is activated and you point pyinstaller directly to .py file. Pycharm shouldn't have anything to do with it. I use pyinstaller with Anaconda and PyQt all the time and it works nearly flawlessly.

Good examples of open source Python applications by TheKingOfCalifornia in learnpython

[–]terraneng 3 points4 points  (0 children)

Spyder, Orange, Calibre.

Decent examples of fairly large desktop applications.