In Python script, how do I set PYTHONPATH?
I know how to set it in my /etc/profile and in my environment variables.
I know how to set it in my /etc/profile and in my environment variables.
In python, I have a list that should have one and only one truthy value (that is, bool(value) is True). Is there a clever way to check for this? Right now, I am just iterating across the list and manually checking:
I am starting to render plots with matplotlib as I learn both python and this interesting plotting library. I need help with a custom plot for a problem I am working on. May be there is an inbuilt function already for this.
Are there any algorithms that will return the equation of a straight line from a set of 3D data points? I can find plenty of sources which will give the equation of a line from 2D data sets, but none in 3D.
I’m trying to GET an URL of the following format using requests.get() in python:
What Python PDF libraries are there? I need to make some PDF with many grids, and I’m looking for a library that allows to manage pages (multi-page). The library should calculate when the page is ended and then create the next page. Answers: Thank you for visiting the Q&A section on Magenaut. Please note that … Read more
I’m very new to PyQt and I am struggling to populate a QTableView control.
I’m trying to create a web app with Flask that lets a user upload a file and serve them to another user. Right now, I can upload the file to the upload_folder correctly. But I can’t seem to find a way to let the user download it back.
Google didn’t turn up anything that seemed relevant. I have a bunch of existing, working C++ code, and I’d like to use python to crawl through it and figure out relationships between classes, etc. EDIT: Just wanted to point out: I don’t think I need or want to parse every bit of C++; I just … Read more
What is the “format” of the character devices located in /dev/input/event*?