On 2018-04-04, 07:27 GMT, Steven D'Aprano wrote:
> I'm no expert, but it seems to me that this has surely got to
> be crazy talk. Whatever task you're doing, processing it
> asynchronously doesn't reduce the amount of work. For example,
> if you want to download ten files, you still have to down
On 2017-04-22, 18:33 GMT, Peter Otten wrote:
> Yes, the documentation should warn about the limitations of
> textwrap's notion of width -- but still, the line you
> complained about
Perhaps, I have screwed up somewhere, but I am glad we were able
to figure it out.
Thank you for your patience,
On 2017-04-22, 01:01 GMT, Gregory Ewing wrote:
> I don't know what vim is doing, but if you tell Python you
> want lines no longer than 65 characters, it takes you at
> your word.
Oh, I’ve got it. textwrap.fill() (only in Python 2.*?) completely
sucks with bytes, because of course it counts every
On 2017-04-21, 21:54 GMT, Peter Otten wrote:
> It's not the algorithm, it's the width. Try
> textwrap.fill(text, 72).
I don’t understand. Why 72? I have set tw=65 in vim.
Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: mc...@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B
,
Matěj Cepl
~$ git diff -- mind.rst
diff --git a/mind.rst b/mind.rst
index a9523c2..e55c56b 100644
--- a/mind.rst
+++ b/mind.rst
@@ -63,16 +63,18 @@ personal religious belief. It is a commentary, in the light
of
specialised knowledge, on a particular set of statements made in the
Christian
Hi,
this is probably a dumb question but I just cannot find a way
how to create AuthHandler which would add Authorization header
to the FIRST request. The only thing I see in urllib2.py are
various http_error handler which add Authorization header to the
ADDITIONAL request which handles the er
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
this is probably a dumb question but I just cannot find a way
how to create AuthHandler which would add Authorization header
to the FIRST request. The only thing I see in urllib2.py are
various http_error handler which add Authorization header
[This message has also been posted to gmane.comp.python.general.]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2014-01-25, 07:18 GMT, Frank Millman wrote:
> I have stated that my objective is to express as little as
> possible in Python code.
Yes, and I believe that it is very wrong. But any
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2014-01-24, 11:18 GMT, you wrote:
> Write your rendering engine as a few simple helper functions,
> and then put all the rest in as code instead of XML. The
> easiest way to go about it is to write three forms, from
> scratch, and then look at th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2014-01-17, 23:19 GMT, you wrote:
> But defining the auxfunc takes away the elegance of a list
> comprehension.
Au contraire! Remember, that brevity is the sister of talent.
I would definitively vote for
labels = [make_label(then, name) f
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 2014-01-11, 08:07 GMT, you wrote:
> Hi, I've just begun to learn programming, I have an open question for the
> group:
> Is the Python language an all in one computer language which could replace C,
> C++, Java etc.. I only ask becuase I am starti
Hi,
I have a script (https://github.com/mcepl/gg_scraper) where I need to
read possibly malformed mbox messages. I use subprocess.Popen() and
/usr/bin/formail to clean up them to be correct mbox messages (with
correct leading From line etc.). Now I try to run tests for my script on
Travis-CI, wh
Did you try to archive email list hosted on the Google Groups?
Were you endlessly frustrated by the black hole which is Google
Groups, conscpicious by its absence on the Data Liberation Front
website? Yes, I was too_
So, I have created a script webscrapping a google group and
created gg_scra
Hi,
I know that vim has native support for cucumber (the original BDD
framework for Ruby). I have also found
https://github.com/veloce/vim-behat for BDD with PHP (frightening
idea!), but I haven't found a module supporting BDD with vim and Python.
Especially I envy to our Ruby friends ability
On 2013-02-26, 16:25 GMT, Terry Reedy wrote:
> On 2/21/2013 4:22 PM, Matej Cepl wrote:
>> as my method to commemorate Aaron Swartz, I have decided to port his
>> html2text to work fully with the latest python 3.3. After some time
>> dealing with various bugs, I have no
On 2013-02-26, 16:57 GMT, W. Martin Borgert wrote:
> 1. Is there any plan to backport this Python >= 3.3 feature to
> Python 2?
No, development of Python 2 ceased to exist (only important bugfixes or
security fix will happen, IIRC)
If you need advanced use of SSL, use pyOpenSSL (it has be
-l *.html
* ?
Does anybody know about something which changed in modules re or
html.parser between 3.2 and 3.3, which could influence this script?
Thanks,
Matěj Cepl
--
http://mail.python.org/mailman/listinfo/python-list
On 2013-02-26, 03:48 GMT, eli m wrote:
> On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote:
>> Any small program ideas? I would prefer to stick to command line
>> ones. Thanks.
>
> Thank you guys for the suggestions. Any more?
1) Clone git repository from https://github.com/mcepl/html2te
On 2013-02-23, 18:44 GMT, jmfauth wrote:
> Very easy to explain: wrong, incorrect, naive unicode
> handling.
PLONK!
--
http://mail.python.org/mailman/listinfo/python-list
On 2013-02-25, 03:37 GMT, llanitedave wrote:
> url_link = "file:///" + fullpath
Isn't this too many slashes. On Linux I get URI
file:usr/share/doc/whatever.html
which is just too many slashes (it should be three, two for the
protocol, one for the root directory).
Matěj
--
http://m
On 2013-02-23, 15:51 GMT, Chris Angelico wrote:
> When you learn your first language, you think you're learning to
> program, but that's not really accurate. Once you've learned half a
> dozen, you begin to understand something of the art of coding as
> distinct from any particular language; after
On Sat, 13 Oct 2012 20:14:50 +0200, Kwpolska wrote:
> https://live.gnome.org/EyeOfGnome/Plugins#Python
>
> That is all the documentation in existence for Python plugins.
>
> Examples:
> http://git.gnome.org/browse/eog-plugins/tree/plugins/slideshowshuffle
> http://git.gnome.org/browse/eog-plugins
On 28/09/12 12:57, Roy Smith wrote:
> But, you might as well get into the habit of
> using the /usr/bin/env flavor because it's more flexible.
In the same manner as one's freedom-fighter is another's fundamentalist
terrorist, what's flexible could be also dangerous. E.g.,
#!/usr/bin/env python
On 26/09/12 15:30, Kevin Walzer wrote:
> Apart from IronPython, what constituency do these alternative
and Jython ... that is widely used in the Java server world
> implementations of Python have that would raise them above the level of
> interesting experiments?
Matěj
--
http://mail.python.org/m
On 24/09/12 00:53, Steven D'Aprano wrote:
Googling for "python inkscape" comes up with too many hits for Inkscape's
plugin system to be much help to me.
Aside from suggesting lxml, I would ask "So why not to follow the stream
and create Inkscape plugin"? I have in similar situation created a
might be some pyOpenSSL compatibility wrapper for
m2crypto ... do I understand it correctly?
Any suggestoins, help is highly welcomed.
Thank you in advance,
Matěj Cepl
--
http://mail.python.org/mailman/listinfo/python-list
On 13/09/12 03:59, Jason Friedman wrote:
Or if Python 3.2 is an option, the concurrent.futures module would be
very well suited for this task.
Also available as an external download for Python 2.* ...
http://pypi.python.org/pypi/futures/
Matěj
--
http://mail.python.org/mailman/listinfo/pytho
On 26/08/12 09:41, coldfire wrote:
I will really appreciate if someone type the address of any of the following
for use with python
If you can live just with PaaS (i.e., no shell account in the strict
sense of the word, although you have ssh access) then my employer is
introducing OpenShift
On 21/07/12 05:26, Ethan Furman wrote:
dbf (also known as python dbase) is a module for reading/writing
dBase III, FP, VFP, and soon Clipper, .dbf database files. It's
an ancient format that still finds lots of use.
Other than the caring for the ancient legacy data, it is still widely
used in
On 18/07/12 05:12, gaodexiaozh...@gmail.com wrote:
However,there is one project implemented by Python used PyXML and now
my Jython project has to depend on it ,so I am afraid that if Jython
doesn't support PyXML,then my jython project can not depend on the
original Python project ,then my jython
On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote:
> I'm trying to parse an xml file with jython (not through java parsers
> like xerces).
https://code.google.com/p/jython-elementtree/ ???
--
http://mail.python.org/mailman/listinfo/python-list
On 12/06/12 11:39, Gilles wrote:
I notice that Python-based solutions are usually built as long-running
processes with their own web server (or can run in the back with eg.
Nginx and be reached through eg. FastCGI/WSGI ) while PHP is simply a
language to write scripts and requires a web server (s
On 11/06/12 06:20, rusi wrote:
Hi Matěj! If this question is politically incorrect please forgive me.
Do you speak only one (natural) language -- English?
And if this set is plural is your power of expression identical in
each language?
I have written about that later ... no, I am a native Czec
On 10/06/12 22:40, Paul Rubin wrote:
You might start with Abelson and Sussman's classic book:
http://mitpress.mit.edu/sicp
I know that, and it lies on my badtable for some time already, but I
just never got enough excited about the idea yet. Python is just much
more fun.
Matěj
--
http://
On 10/06/12 18:32, Paul Rubin wrote:
Really, that's only if the new language is pretty much the same as the
old ones, in which case you haven't really learned much of anything.
Languages that use interesting new concepts are challenges in their own
right.
Well, I could at least passively read m
On 10/06/12 00:44, Yesterday Paid wrote:
I'm planning to learn one more language with my python.
Just my personal experience, but after passively learning many many
languages, I came to the conclusion that I (and I suppose many others)
am able to learn only one platform well. The point is tha
On 03/06/12 13:59, Colin Higwell wrote:
Google Groups is an abomination IMHO, and I find it much easier to read
mailing lists via a newsreader. I highly recommend Pan, by the way.
I am still surprised how good experience I have with reading news with
Thunderbird. Yes, Pan is better, but it use
On 16.5.2012 10:36, zayatzz wrote:
/opt/bin/python^M: bad interpreter: No such file or directory
Your script has CRLF end-of-lines. Change it to plain Unix LF.
Matěj
--
http://mail.python.org/mailman/listinfo/python-list
On 15.4.2012 15:42, Bryan wrote:
Paramiko is a Python library for SSH (Secure Shell). Over about the
last year, I've grown dependent upon it. Its home page is still easy
to search up, but the links to its mailing list and repository don't
work.
Paramiko depends on PyCrypto, and not so long ago t
Bayeux 0.2 is now available at http://pypi.python.org/pypi/bayeux
bayeux is a module for generating TAP (http://testanything.org/).
Version 0.2 is an initial version registered in the Cheesshop.
Release notes:
--
* module tap.py for programatic writing of TAP stream
* clone of un
Bayeux 0.2 is now available at http://pypi.python.org/pypi/bayeux
bayeux is a module for generating TAP (http://testanything.org/).
Version 0.2 is an initial version registered in the Cheesshop.
Release notes:
--
* module tap.py for programatic writing of TAP stream
* clone of un
yamlish 0.8 is now available at http://pypi.python.org/pypi/yamlish
yamlish is a module for generating (and parsing) YAMLish
(http://testanything.org/wiki/index.php/YAMLish).
Release notes:
--
* Don't leak tempfiles
* setup.py test actually runs tests
* add requires to setup.py
On 16.2.2012 16:22, Michael Torrie wrote:
Android simply isn't going to run the JVM anytime soon.
In reality yes, but just technically speaking there is the project
IcedRobot (http://www.icedrobot.org/), which is a fork of Android over
OpenJDK.
Best,
Matěj
--
http://mail.python.org/mailman
For one I don't know of any sun-compatible JVM
that has been ported to ARM.
http://www.senecass.com/projects/OpenJDK-ARM/
"This work has been completed, and is now in OpenJDK HEAD. This page is
now mostly for historical documentation."
Also, http://openjdk.java.net/projects/zero/ (I know my c
On 15.2.2012 18:48, Tim Arnold wrote:
Just a note to encourage you to stick with XSLT. I also use lxml for
creating and postprocessing my DocBook documents and it is great. But I
use the DocBook XSL stylesheets to convert to html; if you're like me,
you got discouraged at the strangeness of the X
Hi,
I am getting more and more discouraged from using XSLT for a
transformation from one XML scheme to another one. Does anybody could
share any experience with porting moderately complicated XSLT stylesheet
(https://gitorious.org/sword/czekms-csp_bible/blobs/master/CEP2OSIS.xsl)
into a Pytho
On 12.2.2012 09:14, Matej Cepl wrote:
Obvious answers:
- Try decoding with UTF8 or Latin1. Even if you don't get the right
characters, you'll get *something*.
- Use open(filename, encoding='ascii', errors='surrogateescape')
(Or possibly errors='ignore'.
On 12.2.2012 03:23, Steven D'Aprano wrote:
The use-case given is:
"I have a file containing text. I can open it in an editor and see it's
nearly all ASCII text, except for a few weird and bizarre characters like
£ © ± or ö. In Python 2, I can read that file fine. In Python 3 I get an
error. What
On 7.2.2012 04:24, alex23 wrote:
Experience?
Are you seriously advocating something for which you've done nothing
more than watch a podcast?
No, I am not. If you reread my original post, you may find that I was
asking exactly for experience and explanation why something which seems
to me obv
On 6.2.2012 20:26, Tim Chase wrote:
In an ideal world, the code wouldn't have broken backwards compat.
However, given the conditions, if Matej is willing to forgo bug-fixes,
it's a reasonable solution. The alternate might be to try moving the
recent/fixed version into the old project and updating
On 6.2.2012 21:51, Terry Reedy wrote:
The 'TAP standard' is what the Perl TAP module does. There is a
pre-draft for an IETF standard. You could ask why Perl people don't care
about joining the unittest 'standard'.
I don't think it is fair:
http://en.wikipedia.org/wiki/Test_Anything_Protocol#Ex
On 6.2.2012 09:45, Matej Cepl wrote:
Also, how could I write a re-implementation of random.choice which would
work same on python 2.6 and python 3.2? It is not only matter of unit
tests, but I would really welcome if the results on both versions
produce the same results.
Silly, of course, the
On 6.2.2012 09:05, Steven D'Aprano wrote:
You have persuaded me that the doc should be more explicit that while
the basic random.random sequence will be kept repeatable with seed set
(except perhaps after a changeover of several releases), the convenience
transformations can be changed if improve
Hi,
I have this working function:
def as_xml(self):
out = etree.Element("or")
for k in sorted(self.keys()):
out.append(etree.Element("hostname",
attrib={'op': '=', 'value': random.choice(self[k])}))
# ... return somehow string representing
I have just finished listening to the FLOSS Weekly podcast #200
(http://twit.tv/show/floss-weekly/200) on autotest, where I've learned
about the existence of TAP (http://testanything.org/). A standardization
of testing seems to be so obviously The Right Thing™, that it is strange
that I don't s
On 3.2.2012 02:19, Ian Kelly wrote:
Then how are you going to maintain the code? Maintain the compiled
code or the source?
As with all compiled software, you maintain the input, not the output.
I don't think that's what was the question. CoffeeScript is a hopeless
hack in the hopeless situat
On 29.1.2012 06:52, Shrewd Investor wrote:
Or do I need to find a way to convert a PDF file into a text file? If
so how?
http://en.wikipedia.org/wiki/Pdftotext ?
--
http://mail.python.org/mailman/listinfo/python-list
On 28.1.2012 17:06, Miki Tebeka wrote:
cheeseshop :)
+1
--
http://mail.python.org/mailman/listinfo/python-list
I released json_diff 0.9.2.
http://pypi.python.org/pypi/json_diff
json_diff is an utility comparing two JSON files and generating diff in
form of another JSON file with differences for each level of the object
in a dict
{
"_append": {},
"_remove": {},
"_update": {}
}
This is the fir
Dne 11.11.2011 14:31, macm napsal(a):
def Dicty( dict[k1][k2] ):
When looking at this I returned to the question which currently rolls in
my mind:
What's difference/advantage-disadvantage betweeng doing multi-level
dicts/arrays like this and using tuple as a key? I.e., is it more
Pythonic
Dne 8.11.2011 23:36, MrSmile napsal(a):
Thank you all, that was it that I was searching for you.
Except that most likely it wasn't the right answer. Take a look at
http://docs.python.org/library/argparse.html (or optparse, if you are on
Python < 2.7).
Best,
Matěj
--
http://mail.python.org/
Dne 6.11.2011 14:18, Kev napsal(a):
Again the wrong path is being used to create the symbolic link to
where virtualenv is installed:
http://packages.python.org/distribute/easy_install.html#administrator-installation
for list of additional configuration files which might go wrong (namely
*.pth
Dne 27.10.2011 21:49, Terry Reedy napsal(a):
Use '_append', etc, much like namedtuple does, for the same reason.
Right, done. What about the presentation issue? Any ideas?
Best,
Matěj
--
http://mail.python.org/mailman/listinfo/python-list
Dne 22.10.2011 17:02, Steven D'Aprano napsal(a):
Rather than assume malice, we should give X1 the benefit of the doubt and
assume he genuinely believed what he wrote but was merely mistaken.
Sure, I didn't want to assume malice (sorry, English is my second
language and sometimes it shows; woul
On Oct 8, 2:51 pm, X1 wrote:
easy_install does not exist on Fedora.
That's a pure lie.
mitmanek:~ $ sudo repoquery -qf /usr/bin/easy_install
python-setuptools-0:0.6.10-3.el6.noarch
mitmanek:~ $
Matěj
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-03-04, 18:53 GMT, allen.fowler wrote:
> 1) Is there a python module I can use to edit the metadata in
> MP4
> files?
I am not sure whether taglib supports MP4, but take a look at
http://developer.kde.org/~wheeler/taglib.html and
http://developer.berlios.de/project/showfiles.php?group_id
On 2008-03-02, 08:16 GMT, Matej Cepl wrote:
> Thanks for your help, but plain-text strings is not what
> I wanted. The boolean variables was what I was after. See this
> modified version of the script:
OK, I got it -- I was missing detect_types parameter of the
connect method.
Matěj
On 2008-03-01, 23:41 GMT, Mel wrote:
> There's nothing much wrong. cur.fetchall is returning a list
> of all the selected rows, and each row is a tuple of fields.
> Each tuple is being converted for display by repr, so the
> strings are shown as unicode, which is what they are
> internally.
ptors.py
[(u'False',), (u'True',)]
[EMAIL PROTECTED] dumpBugzilla]$
There is probably something quite obvious what I do incorrectly, but I just
don't see it. Could somebody kick me in the right direction, please?
Thanks a lot,
Matěj Cepl
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-05-25, 18:28 GMT, John J. Lee wrote:
> Not sure whether you know this already, but module mailbox in
> Python 2.5 supports writing mbox folders. If it's not 2.4
> compatible, it's fairly likely to be an easy backport.
Cool! Thanks a lot.
One more reason why to upgrade to Fedora Core 7
read-only, am
I right?
Thanks for any reply,
Matej Cepl
--
http://mail.python.org/mailman/listinfo/python-list
?
Thanks,
Matej Cepl
--
http://mail.python.org/mailman/listinfo/python-list
Matěj
--
Matej Cepl, http://www.ceplovi.cz/matej
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
Scouts are saving aluminum cans, bottles and other items to be
recycled. Proceeds will be used to cripple children.
Hi,
using python 2.3, ClientForm, and ClientCookie and I have this code:
opener = ClientCookie.build_opener(ClientCookie.HTTPRefererProcessor,
ClientCookie.HTTPRefreshProcessor,
ClientCookie.SeekableProcessor)
response = opene
Thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
chool -- it means
many attempts to play with urllib. I would prefer to do it in an
interactive session, but then I would love to have a record of all what
I've done, so I can edit this record into final script.
Thanks for any hint,
Matej Cepl
--
http://mail.python.org/mailman/listinfo/python-list
76 matches
Mail list logo