python on android: where to start
I looked at the newsgroup, but I didn't find recent infos on this topic. On the other side I went lost by looking for this topic with google. So I'm asking you my question, if I want to develop or run some code with python on android, what are the resources to start with? Thanks mauro -- https://mail.python.org/mailman/listinfo/python-list
Re: python on android: where to start
Il Fri, 14 Nov 2014 16:48:41 +, Phil Thompson ha scritto: > On 14/11/2014 2:18 pm, maurog wrote: >> I looked at the newsgroup, but I didn't find recent infos on this >> topic. >> On the other side I went lost by looking for this topic with google. So >> I'm asking you my question, if I want to develop or run some code with >> python on android, what are the resources to start with? > > PyQt4 or PyQt5 with pyqtdeploy... > > http://pyqt.sourceforge.net/Docs/pyqtdeploy/ > > Phil Thanks to all of you for yoour answers -- https://mail.python.org/mailman/listinfo/python-list
where in Nan defined
I'm running some pandas examples and I canno find in what module NaN is defined. Does anyone know what module I have to import in order to have it defined? -- https://mail.python.org/mailman/listinfo/python-list
OpenCv: different behavior of cv2.imread and cv2.imdecode
The starting point is an invalid jpg file, grabbed from a site showing
pictures from a webcam while the site is updating the picture itself. So
the upper part of the picture is ok, the lower part no.
If I execute this code
flags = cv2.CV_LOAD_IMAGE_COLOR
img = cv2.imread('bad.jpg', flags)
this message is printed on stderr
"Premature end of JPEG file"
and in the part of img np array related to the lower part of the picture
all the values are 128 for all the RGB layers, that is black pixels.
If I execute this code, as suggested here
https://stackoverflow.com/questions/13329445/how-to-read-image-from-in-
memory-buffer-stringio-or-from-url-with-opencv-pytho
r = open('bad.jpg','rb').read()
img_array = np.asarray(bytearray(r), dtype=np.uint8)
flags = cv2.CV_LOAD_IMAGE_COLOR
img = cv2.imdecode(img_array, flags)
no error message is shown and in the img np array there are mixed values
in the part related to the lower part of the picture
So it looks to me that cv2.imread and cv2.imdecode handle in a different
way the loading of a jpg image. Is it like that or am I missing something?
--
https://mail.python.org/mailman/listinfo/python-list
Page layout in Python
The first step in grabbing information from a pdf file is to translate it into text format with pdftotext -layout command. Is it available any specific python tool or library to describe the layout of a page with ascii characters and to help in identifying and extracting the useful pieces of information? For example a function allowing to select N characters at line I starting from column Y. If a such tool is not available, what is in your mind the best structure to describe in python a two dimensions page layout? -- https://mail.python.org/mailman/listinfo/python-list
