Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to export the reports which is generated using python 3.2.3 & django 1.6 to pdf.
I swicthed to python3.2.3 now only,earlier I was using python2.7 in which I used PISA for pdf generation. bt PISA is not available in python3.2.3
Can anybody suggest me how to generate pdf in python 3.2.3
If you'd like to generate PDFs from HTML, you can use weasyprint, which supports python 3, and has really cool capabilities.
http://weasyprint.org/
You can also use wkhtmltopdf (based on webkit). It's a command line tool, but there is a python pdfkit wrapper for it. I really like wkhtmltopdf as in some cases it's much faster than PISA or weasyprint.
They both handle CSS, so the styling is pretty easy and powerful.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I need to extract news article headlines from Google alerts using Python 3.7, I tried to use "galerts" library, but I couldn't install it because it doesn't have a newer release which is supported by Python 3.7. Is there any alternative way with which I can scrape the headlines?
From the README of the galerts library, there is a link to a google-alerts library - this supports Python 3.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I need to read information from PDF file using, python or robotframework, however I can not install any external libraries due to my company rules. Is it possible and how I could do that?
Of course it is!
You'll just have to write the parser for PDFs from scratch. You can find the PDF 1.7 file specification over here at Adobe.com, it's only 756 pages.
On a more serious note, not being able to use any external libraries in any circumstances is idiotic – that company rule is misguided, and those who enacted it probably are using oodles of unvetted external code anyway.
(If you are allowed to install system packages, though, pdftotext from Poppler might help you a bit.)
I have used this one: https://github.com/euske/pdfminer/blob/master/tools/pdf2txt.py.
Used the script to convert PDFs to strings and then tested the contents.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have implemented a new algorithm in python, using sources which use the numpy, scipy libraries and deal with file I/O. I now need to build a Windows GUI app (python might not be installed in any form on a Windows OS) which will implement my existing python source, and take inputs such as file names and some other parameters. Please suggest some possible methods to make this happen.
You may create a GUI for your app, using different options like as below:
wxPython
TkInter
PyQt
This question may help you too.
Regarding creating the final executable you have some options like as below:
py2exe
GUI2EXE
cx_freeze
PyInstaller
There are other issues regarding the creation of an executable discussed here on the SO you may refer to them here if you are interested.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
If I write code with NumPy, can a webserver which run Python 2.5 run the code?
Can we use NumPy as a dynamic language in writing websites of computational nature?
Yes of course you can.
If you wanted to use straight Python to serve up your HTML pages etc you should look at something like Django (a fully featured Python web framework) and Flask (a much lighter framework with less implemented features).
As all of these are Python you can install them alongside Numpy in a virtualenv on your webserver and then just import numpy as you would normally in your code to perform the computational work.
Yes. Your web site will need to be able to run Python code in some way, but if you can import numpy then you can use it.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm using Blender and Python and want to give the .py file to other users to use my script... My script uses external modules (like NumPy) which will rise the errors (like can't find module xxxx).
Not all people can install NumPy (or even Python :D) as many Blender users are just artists.
Another note is that NumPy doesn't work with Blender (I install it in the system's Python, then delete Blender Python so it relies on the system Python).
If you want to distribute your code with external dependencies then you should build a Python egg. The .egg format was created to solve the issue you are dealing with. It is a self-contained release of your code with dependencies and meta-data. Here is some information on how create Python eggs.