Re: No Content-Length header, nor length property

2015-07-07 Thread Kev Dwyer
zljubi...@gmail.com wrote: > > >> Hello, >> >> urlopen returns an HttpResponse >> object(https://docs.python.org/3/library/http.client.html#httpresponse-objects). >> You need to call read() on the return value to get the page content, or >> you could consider the getheader method to check for

Re: No Content-Length header, nor length property

2015-07-07 Thread zljubisic
> Hello, > > urlopen returns an HttpResponse > object(https://docs.python.org/3/library/http.client.html#httpresponse-objects). > You need to call read() on the return value to get the page > content, or you could consider the getheader method to check for a Content- > Length header. > > Hop

Re: No Content-Length header, nor length property

2015-07-07 Thread Kev Dwyer
zljubi...@gmail.com wrote: > Hi, > > if I put the link in the browser, I will be offered to save the file to > the local disk. > > If I execute these few lines of code, I will get None: > > import urllib.request > > url = 'http://radio.hrt.hr/prvi-program/aod/download/118467/' > site = urllib.

No Content-Length header, nor length property

2015-07-07 Thread zljubisic
Hi, if I put the link in the browser, I will be offered to save the file to the local disk. If I execute these few lines of code, I will get None: import urllib.request url = 'http://radio.hrt.hr/prvi-program/aod/download/118467/' site = urllib.request.urlopen(url) print('File size:', site.len

Re: understanding why there is no setup.py uninstall

2015-07-07 Thread Laura Creighton
In a message of Tue, 07 Jul 2015 22:31:04 +0200, c.bu...@posteo.jp writes: >On 2015-07-06 18:34 Ben Finney wrote: >> Part of the better system is that we have the Python Packaging >> Authority http://pypa.io/> which didn't exist when Distutils was >> designed. Read the documents there and I hope y

Re: Best practices for writing jobs run through cron

2015-07-07 Thread Weitao
BTW,You can also manage your celery cron against Django admin page,if you want. Django+Celery will give you more. 发自我的 iPhone > 在 2015年7月7日,03:16,Juan Gutierrez 写道: > > Hi WU, > > It sounds like you want to add a lot of helpful transparency into your task > runner which is awesome, however,

Re: understanding why there is no setup.py uninstall

2015-07-07 Thread c.buhtz
On 2015-07-06 18:34 Ben Finney wrote: > Part of the better system is that we have the Python Packaging > Authority http://pypa.io/> which didn't exist when Distutils was > designed. Read the documents there and I hope you'll be glad at the > improvement! > ... Thank you very much for that explana

PyDev 4.2.0 Released

2015-07-07 Thread Fabio Zadrozny
Release Highlights: --- * New search page for Python contents * Text-searches using a Lucene index allows for fast matches. * Matches can be flattened and grouped by project, folders and modules. * Results page allows additional filtering based on module name. * Furth

Re: pygtk2 and colors

2015-07-07 Thread nickgeovanis
On Tuesday, July 7, 2015 at 12:58:12 PM UTC-5, Chris Angelico wrote: > > Part of your confusion may be because "background" isn't necessarily > what you think it is. Indeed. Yet "foreground" _is_ what I think it is :-) I would argue that we have here a clumsy intrusion of OO inheritance into a

Re: pygtk2 and colors

2015-07-07 Thread Chris Angelico
On Wed, Jul 8, 2015 at 3:25 AM, wrote: > On Tuesday, July 7, 2015 at 11:54:21 AM UTC-5, Cousin Stanley wrote: >> You might try >> >> self.set_rgb_fg_color( fg ) > > Well thanks, that works. Yet set_rgb_bg_color() does not. And I notice that > the example at the link you sent doesn't s

Re: Trying to import numpy

2015-07-07 Thread Laurent Pointal
ryguy7272 wrote: > I'm trying to use numpy. I get this error: import numpy as np > > Traceback (most recent call last): > File "", line 1, in > import numpy as np > ImportError: No module named numpy > > > > I followed the instructions here. > https://pip.pypa.io/en/latest/install

Re: pygtk2 and colors

2015-07-07 Thread nickgeovanis
On Tuesday, July 7, 2015 at 11:54:21 AM UTC-5, Cousin Stanley wrote: > You might try > > self.set_rgb_fg_color( fg ) Well thanks, that works. Yet set_rgb_bg_color() does not. And I notice that the example at the link you sent doesn't set the background color either. Do I have a col

Re: pygtk2 and colors

2015-07-07 Thread Cousin Stanley
> With python 2.7.5, pygtk 2.24, gtk 2.24: > The following snippet successfully sets the line_width > but not the foreground color, and I can't figure-out why. > > The color human-name and the result returned > by gtk.gdk.color_parse are correct. Clues? Thanks. > > self.gc.set_line_attributes

Re: Trying to import numpy

2015-07-07 Thread Terry Reedy
On 7/7/2015 9:23 AM, Dennis Lee Bieber wrote: On Mon, 6 Jul 2015 20:17:34 -0700 (PDT), ryguy7272 declaimed the following: I'm trying to use numpy. I get this error: import numpy as np Traceback (most recent call last): File "", line 1, in I have no experience with whatever pro

Re: windows and file names > 256 bytes

2015-07-07 Thread Tobiah
On 06/24/2015 10:45 AM, Albert-Jan Roskam wrote: Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python 2.7 and [1] and [2] fail under Windows XP [3] fails th

ANN: python-ldap 2.4.20

2015-07-07 Thread Michael Ströder
Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.20 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related st

Re: pygtk2 and colors

2015-07-07 Thread Chris Angelico
On Wed, Jul 8, 2015 at 12:47 AM, wrote: > Hi Nick, > Doing colors with pygtk2 is a real pain... I understand there's a different set of GTK bindings, pygobject. But I've not used it, so I don't know if it's more pythonic in style. Might be worth considering. ChrisA -- https://mail.python.org/m

Re: pygtk2 and colors

2015-07-07 Thread bkimstunnaboss
Hi Nick, Doing colors with pygtk2 is a real pain... But to change the foreground, what you wanna do is to get a copy of the style of the widget, set the color values on it, and then set it back as the style. Like so... color = gtk.gdk.color_parse('#ac0102') style = self.get_style().copy()

Creating a Virtual Environment

2015-07-07 Thread hemla21
Dear all, I have made a python program which I would like to be able to install on to linux machine. I want my python code to be able to use a standalone python with the libraries installed. The code works with python3.4 and above and uses h5py and numpy packages. I was looking at the optio

pygtk2 and colors

2015-07-07 Thread nickgeovanis
Morning- With python 2.7.5, pygtk 2.24, gtk 2.24: The following snippet successfully sets the line_width but not the foreground color, and I can't figure-out why. The color human-name and the result returned by gtk.gdk.color_parse are correct. Clues? Thanks. self.gc.set_line_attributes(myclass.b

Re: Fast capture and 2D image stacking as 3D numpy array with Python and Raspberry Pi

2015-07-07 Thread Oscar Benjamin
On Mon, 6 Jul 2015 at 22:36 Agustin Cruz wrote: > I'm working on a Python - Raspberry Pi project in which I need to take > about 30 images per second (no movie) and stack each 2D image to a 3D array > using numpy array, without saving each 2D capture as a file (because is > slow). > > I found thi

Re: Trying to import numpy

2015-07-07 Thread Mark Lawrence
On 07/07/2015 04:17, ryguy7272 wrote: I'm trying to use numpy. I get this error: import numpy as np Traceback (most recent call last): File "", line 1, in import numpy as np ImportError: No module named numpy I followed the instructions here. https://pip.pypa.io/en/latest/installi