Hello, everyone!
How can I get headers with urlretrieve? I want to send request and get
headers with necessary information before I execute urlretrieve(). Or
are there any alternatives for urlretrieve()?
--
Regards,
Daniil
--
http://mail.python.org/mailman/listinfo/python-list
Ulrich Eckhardt wrote:
> I'll take this to the developers mailinglist and see if they
> consider the behaviour a bug.
Filed as bug #12459.
Uli
--
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Berg wrote:
> Okay, so I've refactored those except WindowsError blocks into calls to
> a function and fixed the os.devnull bug, but I still can't get the
> triple chain working. I added calls to ffmpeg_proc.stdout.close() and
> sox_proc.stdout.close(), but I really am not sure where to put
On Fri, Jul 1, 2011 at 12:03 AM, Даниил Рыжков wrote:
> Hello, everyone!
>
> How can I get headers with urlretrieve? I want to send request and get
> headers with necessary information before I execute urlretrieve(). Or
> are there any alternatives for urlretrieve()?
You can use regular urlopen()
Даниил Рыжков wrote:
> How can I get headers with urlretrieve? I want to send request and get
> headers with necessary information before I execute urlretrieve(). Or
> are there any alternatives for urlretrieve()?
It's easy to do it manually:
>>> import urllib2
Connect to website and inspect h
On 2011.07.01 02:26 AM, Peter Otten wrote:
> I can't reproduce your setup, but I'd try using communicate() instead of
> wait() and close().
I don't really know what communicate() does. The docs don't give much
info or any examples (that explain communicate() anyway), and don't say
when communicate
On Fri, Jul 1, 2011 at 1:02 AM, Andrew Berg wrote:
> On 2011.07.01 02:26 AM, Peter Otten wrote:
>> I can't reproduce your setup, but I'd try using communicate() instead of
>> wait() and close().
> I don't really know what communicate() does.
"Read data from stdout and stderr, until end-of-file is
Thanks, everyone!
Problem solved.
--
Regards,
Daniil
--
http://mail.python.org/mailman/listinfo/python-list
Hello again!
Another question: urlopen() reads full file's content, but how can I
get page by small parts?
Regards,
Daniil
--
http://mail.python.org/mailman/listinfo/python-list
In http://docs.python.org/faq/gui.html I came across
FOX Toolkit and the binding FXPy. The latter, it seems
is no longer officially supported (hasn't for the last 7-8
years). So my question. Has anybody to your knowledge
tweaked FOX and FXPy to work with Python 2.7?
--gv
--
http://mail.python
On 2:59 PM, Ethan Furman wrote:
> def __call__(self, func=None):
> if func is None:
> return self._call()
> self.func = func
> return self
> def _call(self):
> print("\n" + self.char * 50)
> self.func()
> print(self.char * 50 +
from threading import Timer
def Func_to_call:
do_stuff()
my_timer = Timer(10, Func_to_call)
my_timer.start()
--
http://mail.python.org/mailman/listinfo/python-list
Does anyone here have a Python 3 environment that can access MSSQL
using SQLAlchemy, running on a Windows 7 box? If so, I would like
some assistance making it happen.
The last post on this was mid-2010. It was mentioned that pyodbc had
a Python 3 branch. I've been unable to get it compiled and
On Fri, Jul 1, 2011 at 2:23 PM, Даниил Рыжков wrote:
> Hello again!
> Another question: urlopen() reads full file's content, but how can I
> get page by small parts?
>
Set the Range header for HTTP requests. The format is specified here:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec
On Fri, Jul 1, 2011 at 1:53 AM, Даниил Рыжков wrote:
> Hello again!
> Another question: urlopen() reads full file's content, but how can I
> get page by small parts?
I don't think that's true. Just pass .read() the number of bytes you
want to read, just as you would with an actual file object.
C
Dnia Thu, 30 Jun 2011 23:09:18 -0700 (PDT), Paul McGuire napisał(a):
> After about 10 months, there is a new release of pyparsing, version
> 1.5.6. This release contains some small enhancements, some bugfixes,
> and some new examples.
Thanks! That is great news.
I'm not using pyparsing right now
On 06/30/2011 11:29 PM, Steven D'Aprano wrote:
The dir() function is designed for interactive use, inspecting objects for
the names of attributes and methods.
Here is an enhanced version that allows you to pass a glob to filter the
names you see:
Comments and improvements welcome.
Having not
Tim Chase wrote:
If it came in as an effortless (i.e. O(1) where I do it once and never
again; not an O(n) where n=the number of times I invoke Python) default
replacement for dir(), I'd reach for it a lot more readily. I seem to
recall there's some environment-var or magic file-name that gets
Tim Chase wrote:
> On 06/30/2011 11:29 PM, Steven D'Aprano wrote:
>> The dir() function is designed for interactive use, inspecting objects
>> for the names of attributes and methods.
>>
>> Here is an enhanced version that allows you to pass a glob to filter the
>> names you see:
>>
>> Comments an
Dear all,
I am currently fighting with a problem writing a set of Python
extensions in C. I want to structure the whole package (here called
smt for sub-module test) into different sub-modules, e.g. according to
this layout:
smt.foo.func()
I can only build a module
>import foo
>print foo.func(1,
I need to write an application that monitors the memory consumption of
a process, there is some library that facilitates this work?
I searched on google found nothing more interesting.
Thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
On 01/07/2011 21:06, Leandro Ferreira wrote:
I need to write an application that monitors the memory consumption of
a process, there is some library that facilitates this work?
I searched on google found nothing more interesting.
Have a look at WMI
TJG
--
http://mail.python.org/mailman/listinf
The subject probably say is all but to elaborate.
I am looking for a way to communicate with a tapi driver for a PBX so I
can experiment with creating some CTI (Computer Telephony Integration)
software.
--
--
http://mail.python.org/mailman/listinfo/python-list
Am 01.07.2011 22:06, schrieb Leandro Ferreira:
> I need to write an application that monitors the memory consumption of
> a process, there is some library that facilitates this work?
> I searched on google found nothing more interesting.
Have a look at psutil http://code.google.com/p/psutil/ . It
On Friday, July 1, 2011 1:02:15 PM UTC-7, H Linux wrote:
> Once I try to nest this, I cannot get the module to load anymore:
> >import smt.bar
> Traceback (most recent call last):
> File "", line 1, in
> ImportError: No module named bar
[snip]
> PyMODINIT_FUNC
> initbar(void)
> {
> Py_In
Thanks, everyone!
Problem solved.
--
Regards,
Daniil
--
http://mail.python.org/mailman/listinfo/python-list
Excerpts from H Linux's message of Fri Jul 01 16:02:15 -0400 2011:
> Dear all,
>
> I am currently fighting with a problem writing a set of Python
> extensions in C.
If you haven't seen it yet, Cython is a *very* nice tool for writing
C extensions. http://cython.org/
--
Corey Richardson
"Those
First a trap for new players, then a question to developers
Code accelerated by numpy can be slowed down by a large factor is you
neglect to import numpy.sum .
from timeit import Timer
frag = 'x=sum(linspace(0,1,1000))'
Timer(frag ,setup='from numpy import linspace').timeit(1000)
# 0.6 sec
Timer(
On Friday, July 1 at 19:17 (-0700), bdb112 said:
> Question:
> Can I replace the builtin sum function globally for test purposes so
> that my large set of codes uses the replacement?
>
> The replacement would simply issue warnings.warn() if it detected an
> ndarray argument, then call the origi
On Thu, Jun 30, 2011 at 11:41 AM, Thomas 'PointedEars' Lahn
wrote:
> Thomas Guettler wrote:
>
>> On 30.06.2011 03:24, Thomas 'PointedEars' Lahn wrote:
>>> Andrew Berg wrote:
[…]
>>>
>>> As for your question in the Subject, I do not know since I am reading the
>>> newsgroup.
>>>
>>> Therefore,
On Fri, Jul 1, 2011 at 8:33 PM, TP wrote:
> Not sure if this is relevant. I use mail.google.com to follow mailing
> lists and a large proportion of python-list traffic ends up in my
> gmail spam folder for some reason?
Set a filter (you can "Filter messages like this") that says "Never
spam". Tha
In article
bdb112 wrote:
>First a trap for new players, then a question to developers
>
>Code accelerated by numpy can be slowed down by a large factor is you
>neglect to import numpy.sum .
>
>from timeit import Timer
>frag = 'x=sum(linspace(0,1,1000))'
>Timer(frag ,setup='from numpy import lins
>Dennis Lee Bieber:
> Timer() is a one-shot; per the OPs requirements even it would need
> to be placed within a loop to invoke multiple calls -- so there isn't
> much gain in terms of lines of code... And worse, since it calls the
> function asynchronously and not sequentially, a delay time
33 matches
Mail list logo