convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Hi Pythonistas, I need to convert ascii escapes into binary form, e.g.: \f - ^L [EMAIL PROTECTED] - [EMAIL PROTECTED]@ (rvalues in terminal representation) Any idea, how to do this most elegantly in python? Do I really need to do a search n'replace orgy, combined with regex for this task?

Re: convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Robert Kern wrote: Hans-Peter Jansen wrote: Hi Pythonistas, I need to convert ascii escapes into binary form, e.g.: \f - ^L [EMAIL PROTECTED] - [EMAIL PROTECTED]@ (rvalues in terminal representation) Any idea, how to do this most elegantly in python? Do I really need to do a search

Re: convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Hi Robert, Hans-Peter Jansen wrote: Robert Kern wrote: That did the trick, thanks a lot, Peter. Unfortunately, on the s/Peter/Robert/g Sorry, Robert. That's the price to pay for doing multiple replies at the same time. Mea culpa.. target system, there's still python 2.0 running :-( Looks

Re: wxPython vs. pyQt

2005-03-19 Thread Hans-Peter Jansen
[EMAIL PROTECTED] wrote: I've narrowed down my toolkit selection for my project to wxPython and pyQt, and now i'd like to hear any opinions, war stories, peeves, etc, about them, particularly from anyone who's used _both_toolkits_. I'm only mildly interested in the IDEs and UI designers for

trouble with generators

2007-05-10 Thread Hans-Peter Jansen
Hi Pythonistas, I'm stuck in a maze of new style classes and generators. While I love the concepts, I obviously didn't grok them throughout. I'm trying to generate a bunch of similar classes, where some are contained in list attributes of others, e.g.: class A: def __init__(self):

Re: trouble with generators

2007-05-10 Thread Hans-Peter Jansen
Hi Diez, first, thanks for your comprehensive answer. Diez B. Roggisch wrote: Hans-Peter Jansen schrieb: I'm trying to generate a bunch of similar classes, where some are contained in list attributes of others, e.g.: All your code below shows that you don't create classes

Re: trouble with generators

2007-05-10 Thread Hans-Peter Jansen
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Hans-Peter Jansen wrote: class Gen(object): def records(self, cls): for i in range(3): setattr(cls, id, %s%s % (cls.__doc__, i)) yield cls […] class GenA(Gen): def __init__(self

Re: About one class/function per module

2009-11-12 Thread Hans-Peter Jansen
On Tuesday 03 November 2009, 12:52:20 Diez B. Roggisch wrote: Peng Yu wrote: On Mon, Nov 2, 2009 at 9:39 PM, alex23 wuwe...@gmail.com wrote: Peng Yu pengyu...@gmail.com wrote: I don't think that this is a problem that can not be overcome. A simple solution might be to associate a unique

Re: segfault with small pyqt script

2010-08-15 Thread Hans-Peter Jansen
On Thursday 12 August 2010, 01:07:25 Gelonida wrote: Hi Guys, I'm desperate. I'm having a real application, which fails rather often when finishing it. I'm not sure, whether any serious problem could be hidden behind it The script is a pyqt script, which segfaults most of the time on my

Re: segfault with small pyqt script

2010-08-17 Thread Hans-Peter Jansen
On Monday 16 August 2010, 09:22:27 Gelonida wrote: Hi Hans-Peter, It seems, that my other posts did not get through. On 08/15/2010 11:17 PM, Hans-Peter Jansen wrote: For a starter, tell us the versions of python-sip, and python-qt4 or however they're called in Ubuntu. For the record

Re: PyQt Installation Problem on Windows

2010-11-26 Thread Hans-Peter Jansen
On Wednesday 24 November 2010, 23:03:14 Saul Spatz wrote: Hi, I've been trying to install PyQt on Windows XP Pro so that I can try out eric ide. I used the binary windows installer for PyQt. I can run eric as administrator, but not with my ordinary user account. By running eric.bat with

Re: remote control firefox with python

2010-11-30 Thread Hans-Peter Jansen
On Sunday 28 November 2010, 16:22:33 News123 wrote: Hi, I wondered whether there is a simpe way to 'remote' control fire fox with python. With remote controlling I mean: - enter a url in the title bar and click on it - create a new tab - enter another url click on it - save the html

Re: while True or while 1

2010-12-14 Thread Hans-Peter Jansen
On Tuesday 14 December 2010, 10:19:04 Gregory Ewing wrote: Steven D'Aprano wrote: while True: ... print Looping ... True = 0 Just remember that if you use that inside a function, you'll have to initialise True to True before... er, wait a moment, that won't work... ah, I know:

Re: while True or while 1

2010-12-15 Thread Hans-Peter Jansen
On Tuesday 14 December 2010, 21:38:47 Arnaud Delobelle wrote: Christian Heimes li...@cheimes.de writes: [...] Tres Seavers once told me a joke like this: True = not not Who's at the door? # say it out loud! This was back in the old days of Zope 2.5 and Python 2.1, which didn't

Re: default argument in method

2010-12-15 Thread Hans-Peter Jansen
On Monday 13 December 2010, 18:14:27 Godson Gera wrote: On Sun, Dec 12, 2010 at 5:05 PM, ernest nfdi...@gmail.com wrote: Hi, I'd like to have a reference to an instance attribute as default argument in a method. It doesn't work because self is not defined at the time the method

Re: default argument in method

2010-12-15 Thread Hans-Peter Jansen
On Thursday 16 December 2010, 00:56:31 Steven D'Aprano wrote: On Wed, 15 Dec 2010 21:10:05 +0100, Hans-Peter Jansen wrote: Since this is a major pitfall, it might be worth mentioning, that mutable default arguments are generally a bad idea, as the default arguments are evaluated just once

Re: Read / Write OpenOffice SpreadSheet ?

2010-12-17 Thread Hans-Peter Jansen
On Friday 17 December 2010, 02:07:07 Torsten Mohr wrote: Hi, i search for a possibility to access OpenOffoce SpreadSheets from Python with a reasonably new version of Python. Can anybody point me to a package that can do this? http://ooopy.sourceforge.net/ Pete --

Re: GUI Tools for Python 3.1

2010-12-26 Thread Hans-Peter Jansen
On Friday 24 December 2010, 03:58:15 Randy Given wrote: Lots of stuff for 2.6 and 2.7 -- what GUI tools are there for 3.1? PyQt4 of course. http://www.riverbankcomputing.com Pete -- http://mail.python.org/mailman/listinfo/python-list

floating point woes

2011-02-15 Thread Hans-Peter Jansen
Hi, while I usually cope with the woes of floating point issues, this is one, that I didn't expect: round(2.385, 2) 2.3799 Doesn't the docs say, it's rounded up for this case? quote Values are rounded to the closest multiple of 10 to the power minus n; if two multiples are

Re: floating point woes

2011-02-15 Thread Hans-Peter Jansen
On Wednesday 16 February 2011, 01:06:08 Benjamin Kaplan wrote: On Tue, Feb 15, 2011 at 6:49 PM, Hans-Peter Jansen h...@urpla.net wrote: Hi, while I usually cope with the woes of floating point issues, this is one, that I didn't expect: round(2.385, 2) 2.3799

Re: floating point woes

2011-02-15 Thread Hans-Peter Jansen
On Wednesday 16 February 2011, 01:24:59 Chris Rebert wrote: On Tue, Feb 15, 2011 at 4:09 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Feb 15, 2011 at 3:49 PM, Hans-Peter Jansen h...@urpla.net wrote: Hi, while I usually cope with the woes of floating point issues, this is one

Re: debugging segfaults in pythen PyQt (QWebview)

2011-03-04 Thread Hans-Peter Jansen
On Thursday 03 March 2011, 10:40:20 Gelonida wrote: Hi, I have a QWebview application, which segfaults rather often, but not all the time. I assume it is some kind of race condition when loading a certain web page with quite some built in AJax. [...] The application crashes under Windows

Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Hans-Peter Jansen
Hi, I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code works as expected, if not - what should be the usual case - the code fails with some non-sensible traceback. I tried to boil it down to a

Re: Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Hans-Peter Jansen
Hi Chris, On Mittwoch, 4. Dezember 2013 10:20:31 Chris Angelico wrote: On Wed, Dec 4, 2013 at 9:32 AM, Hans-Peter Jansen h...@urpla.net wrote: I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code

Re: PyQt imageViewer does not working properly...

2010-10-05 Thread Hans-Peter Jansen
On Tuesday 05 October 2010, 00:29:04 Polimeno wrote: Hello guys, I have been looking throughout the web for some PyQt Image Viewer : http://nullege.com/codes/show/src%40pyformex-0.8.2%40pyformex%40gui%40ima geViewer.py/78/PyQt4.QtGui.QImage# Unfortunately, everytime I input any kind of

C++ vs. Python Was: Re: help!!!

2010-10-06 Thread Hans-Peter Jansen
On Wednesday 06 October 2010, 06:28:51 Dennis Lee Bieber wrote: On Tue, 05 Oct 2010 23:54:00 -0400, fkr...@aboutrafi.net23.net declaimed the following in gmane.comp.python.general: plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I

ANN: automated daily snapshot builds for PyQt and friend on openSUSE build service

2010-10-14 Thread Hans-Peter Jansen
[Sorry for cross posting] Hi PyQtnistas, I proudly announce the availability of automated builds of the most current PyQt and related packages including snapshots on openSUSEs build service for openSUSE 11.1, 11.2 and 11.3, here:

Re: Python changes

2010-10-29 Thread Hans-Peter Jansen
On Thursday 28 October 2010, 21:23:03 Craig McRoberts wrote: Oh, I like to browse brick-and-mortar enough. But it's been forever since I've bought something there. If you can get your hands on a copy of Mark Summerfield's Programming in Python3, check it out. He really raised the accustomed

Re: http error 301 for urlopen

2010-11-10 Thread Hans-Peter Jansen
On Tuesday 09 November 2010, 03:10:24 Lawrence D'Oliveiro wrote: In message 4cd7987e$0$1674$742ec...@news.sonic.net, John Nagle wrote: It's the New York Times' paywall. They're trying to set a cookie, and will redirect the URL until you store and return the cookie. And if they find

Re: ANN: PyQt v4.8.1 Released

2010-11-10 Thread Hans-Peter Jansen
Am Monday 08 November 2010 02:26:51 schrieb Robert Kern: On 2010-11-07 18:53 , Lawrence D'Oliveiro wrote: In messagemailman.720.1289149298.2218.python-l...@python.org, Robert Kern wrote: Everyone here knew exactly what he meant. But if you don’t banana the right tomato, everybody

[issue2275] urllib2 header capitalization

2008-03-11 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen [EMAIL PROTECTED]: The urllib2 behavior related to headers is - hmm - improvable. It simply capitalize() the key, which leads to funny results like: Accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 while this is seemingly conforming to the specs, it's simply

[issue2275] urllib2 header capitalization

2008-03-30 Thread Hans-Peter Jansen
Hans-Peter Jansen [EMAIL PROTECTED] added the comment: But should not this patch be handled in a way wherein. key.capitalize() is just replaced by key.upper()? Hmm, are you sure? hello.upper() 'HELLO' but the issue is with values containing dashes: 'accept-charset'.capitalize() 'Accept

[issue2275] urllib2 header capitalization

2008-03-30 Thread Hans-Peter Jansen
Hans-Peter Jansen [EMAIL PROTECTED] added the comment: Hi Senthil, that looks promising, and the title() trick is nice, as it fixes my issue.. Thanks, Pete __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275

[issue2275] urllib2 header capitalization

2008-07-11 Thread Hans-Peter Jansen
Hans-Peter Jansen [EMAIL PROTECTED] added the comment: Facundo, first of all: *really* nice work, thanks a lot. While I don't fully understand the issues raised lately here, especially what broke (user code). I can see, that it completely solves my original problem, which is great. While

[issue27256] header indentation destroyed

2016-06-07 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: In the course of replacing an old Python 2.7 email filter tool with a rewritten Python3 version, I stumbled across a ugly case, where such an header: X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTDJQUjAyTUI1MTQ7MjM6bEtRRlNaUHQvVTk5WCttdktlOUVrUGQvVFBH

[issue27256] header indentation destroyed

2016-06-07 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen <h...@urpla.net>: Added file: http://bugs.python.org/file43286/mf.9__mi0bf.out ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27258] Exception in BytesGenerator.flatten

2016-06-07 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: Attached mail, parsed with email.message_from_binary_file results in: Traceback (most recent call last): File "./mail_filter.py", line 616, in ret = main.run() File "./mail_filter.py", line 605, in run self.process(fp) Fi

[issue27257] get_addresses results in traceback with a valid? header

2016-06-07 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: In the course of replacing an old Python 2.7 email filter tool with a rewritten Python3 version, I stumbled across a ugly case, where such an header: To: unlisted-recipients: ;, ""@pop.kundenserver.de (no To-header on input

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-06-14 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: In a couple of systems, I have to stick with 3.4. Is there a chance to have this patch in 3.4 as well, if a new release 3.4 is made? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue27257] get_addresses results in traceback with a valid? header

2016-06-08 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Dear Stephen, thanks for your care. I'm glad, that you're able to reproduce it. This header is added from the email provider (the biggest here in Germany), so yes, it deserves an entry in the defects list, but must not traceback, of course

[issue27257] get_addresses results in traceback with an addrspec with an empty local part.

2016-06-16 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Sorry guys for not providing this earlier. It turned out, that the sub optimal behaviour is related to a unfortunate policy choice: email.policy.SMTP. -- Added file: http://bugs.python.org/file43416/email_flatten.py

[issue27256] email header indentation destroyed

2016-06-16 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Sorry guys for not providing this earlier. It turned out, that the sub optimal behaviour is related to a unfortunate policy choice: email.policy.SMTP. -- Added file: http://bugs.python.org/file43417/email_flatten.py

[issue27258] Exception in BytesGenerator.flatten

2016-06-16 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Sorry guys for not providing this earlier. It turned out, that the sub optimal behaviour is related to a unfortunate policy choice: email.policy.SMTP. -- Added file: http://bugs.python.org/file43415/email_flatten.py

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: > In Python 2, it looks like the proxy_bypass_etc() functions are defined > in urllib and imported into urllib2, so it makes sense to include the > tests in test_urllib rather than test_urllib2. The tests are in test_urllib. test_urllib2 is test

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: * blatant error fixed * one test case added -- Added file: http://bugs.python.org/file42582/python-urllib-prefer-lowercase-proxies-v6.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue26831] ConfigParser parsing failures with default_section and ExtendedInterpolation options

2016-04-22 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: ConfigParser fails in interesting ways, when using default_section and ExtendedInterpolation options. Running the attached script results in: ConfigParser() with expected result: global: [('loglevel', 'WARNING'), ('logfile', '-')] section1: [('key_a

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-22 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v5: don't require the proxies argument in proxy_bypass_environment() -- Added file: http://bugs.python.org/file42565/python-urllib-prefer-lowercase-proxies-v5.diff ___ Python tracker <rep...@bugs.python.

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, please find a new patch attached, that incorporates your suggestions. * added a comment to get_proxies doc in urllib.rst * documented and fixed the mixed case scheme * added a note to proxy_bypass_environment, that behaves

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v7: - reorder test code in order to improve edibility -- Added file: http://bugs.python.org/file42586/python-urllib-prefer-lowercase-proxies-v7.diff ___ Python tracker <rep...@bugs.python.org>

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, thanks for the valuable comments. Will incorporate your suggestions later today. Yes, Martin, it's a bug, and should be fixed for 2.7 and 3.5 as well, but I was unsure, if I get some feedback at all... Hence, this is a very nice

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-21 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Here's the finalized version of this patch, including unit tests. -- Added file: http://bugs.python.org/file42552/python-urllib-prefer-lowercase-proxies-v4.diff ___ Python tracker <rep...@bugs.python.org>

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: During programming a function, that replaces a wget call, I noticed, that something is wrong with urllibs proxy handling. I usually use the scheme "http_proxy= wget -N -nd URL" when I need to bypass the proxy. Hence I was prett

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen <h...@urpla.net>: -- versions: +Python 3.6 -Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-21 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Here we go: v3 fixes following issues: * prefer lowercase proxy environment settings, if multiple (disagreeing) settings are specified with differing case schemes (e.g. HTTP_PROXY vs. http_proxy) * an empty proxy variable value resets the related setting

[issue10808] ssl unwrap fails with Error 0

2016-05-09 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Poor old bug. Just being bitten from it today, while trying to package pyftpdlib on the openSUSE build service, which creates a clean reproducible build environment for all packages, and testing fails. Part of the game: openssl 1.0.1k, Python 2.7.8 https

[issue27513] email.utils.getaddresses raises exception from erroneous message get_all input

2016-07-14 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: message.get cannot decode the header correctly, and returns a Header instance instead, which makes email.utils.getaddresses stumble upon... A much better behavior for getaddresses in this case would be returning the perfectly valid address, and ignoring

[issue27513] email.utils.getaddresses raises exception from erroneous message get_all input

2016-07-14 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: An unfortunate combination of get_all and getaddresses results in a Traceback: Traceback (most recent call last): File "misc/decode_from_header.py", line 17, in print('From: %s' % email.utils.getaddresses(val)) File "/usr/lib64/

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-08-03 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: > (In msg271688, I pondered if I need to backport a behavior change from > issue26804 which will allow lower cased proxies, but then, I decided against > it as it will introduce unnecessary changes to this security fix releases). Hmm, Senthil

Re: ANN: psutil 5.1.0 with hardware sensors released

2017-02-02 Thread Hans-Peter Jansen
On Mittwoch, 1. Februar 2017 21:54:06 Giampaolo Rodola' wrote: > Hello all, > I'm glad to announce the release of psutil 5.1.1: ^ Guess, you meant to say 5.1.0 here, or probably your time machine broke ;) Cheers, Pete --

Re: Referencing section name by interpolation in ConfigParser

2017-01-27 Thread Hans-Peter Jansen
On Mittwoch, 25. Januar 2017 10:01:56 Peter Otten wrote: > Hans-Peter Jansen wrote: > > I would like to use a interpolated section name, e.g.: > > > > [Section] > > secref: %{section}s/whatever > > > > should result in: > >>>> config['Sectio

Referencing section name by interpolation in ConfigParser

2017-01-24 Thread Hans-Peter Jansen
Hi, I would like to use a interpolated section name, e.g.: [Section] secref: %{section}s/whatever should result in: >>> config['Section']['secref'] 'Section/whatever' Any idea anybody, how to archive this with minimum fuzz? Thanks, Pete --

[issue28970] ctypes.from_buffer counterpart to actively remove the mapping

2016-12-14 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: In an attempt of using ctypes.from_buffer() to map a structure to a memory mapped file, it is important to destroy the mapping after use, because the mmap won't be resizable or freeable correctly until then. The best approach, I was able to came up

distutils_ui 0.1.1 released

2016-12-04 Thread Hans-Peter Jansen
For those of you, who like PyQt{4,5} as much as I do, as well as for those who don't like it that much, because of the poor integration with setuptools et.al., here's another piece of software to bridge the gap: A distutils build extension for PyQt{4,5} applications that makes handling

distutils_ui 0.1.1 released

2016-12-05 Thread Hans-Peter Jansen
For those of you, who like PyQt{4,5} as much as I do, as well as for those who don't like it that much, because of the poor integration with setuptools et.al., here's another piece of software to bridge the gap: A distutils build extension for PyQt{4,5} applications that makes handling

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 21:58:38 Peter Otten wrote: > Hans-Peter Jansen wrote: > > On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > >> Hans-Peter Jansen wrote: > > It leaves the question on why is Python2 acting as one would expect > > related to

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 16:53:53 Hans-Peter Jansen wrote: > On Mittwoch, 28. Dezember 2016 15:17:22 Hans-Peter Jansen wrote: > > On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > > > Hans-Peter Jansen wrote: > > > > Dear Peter, > > > >

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Hans-Peter Jansen
On Montag, 2. Januar 2017 03:38:53 Antonio Caminero Garcia wrote: > Hello, I am having a hard time deciding what IDE or IDE-like code editor > should I use. This can be overwhelming. > > So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, > IntelliJ with Python plugin. Well,

Re: ctypes, memory mapped files and context manager

2016-12-29 Thread Hans-Peter Jansen
On Donnerstag, 29. Dezember 2016 09:33:59 Peter Otten wrote: > Hans-Peter Jansen wrote: > > On Mittwoch, 28. Dezember 2016 16:53:53 Hans-Peter Jansen wrote: > > The minimal example is > > >>> import weakref, ctypes > >>> T = ctypes.c_ubyte * 3 > >

Re: ctypes, memory mapped files and context manager

2016-12-29 Thread Hans-Peter Jansen
Dear Eryk, thanks for chiming in. On Donnerstag, 29. Dezember 2016 21:27:56 eryk sun wrote: > On Thu, Dec 29, 2016 at 12:18 PM, Hans-Peter Jansen <h...@urpla.net> wrote: > >> >>> import weakref, ctypes > >> >>> T = ctypes.c_ubyte * 3 &g

Re: Using sudo with pip3?

2017-01-08 Thread Hans-Peter Jansen
On Samstag, 7. Januar 2017 19:07:55 Clint Moyer wrote: > I would lightly advise against, assuming both Pip and your package > manager are trying to accomplish nearly the same thing. Stick with > updating through the repo. > > If you find that the version your OS provides is out-of-date compared >

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Hans-Peter Jansen
On Montag, 2. Januar 2017 03:38:53 Antonio Caminero Garcia wrote: > Hello, I am having a hard time deciding what IDE or IDE-like code editor > should I use. This can be overwhelming. > > So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, > IntelliJ with Python plugin. Well,

[issue9253] argparse: optional subparsers

2016-12-18 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen <h...@urpla.net>: -- nosy: +frispete ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9253> ___ __

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > Hans-Peter Jansen wrote: > > Dear Peter, > > > > thanks for taking valuable time to look into my issue. > > You're welcome! > > > It might be related to my distinct silliness, but the problem

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 15:17:22 Hans-Peter Jansen wrote: > On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > > Hans-Peter Jansen wrote: > > > Dear Peter, > > > > > > thanks for taking valuable time to look into my issue. > > > >

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
Dear Peter, thanks for taking valuable time to look into my issue. It might be related to my distinct silliness, but the problem persists with your code as well. Further comments inlined. On Dienstag, 27. Dezember 2016 21:39:51 Peter Otten wrote: > Hans-Peter Jansen wrote: > > &g

ctypes, memory mapped files and context manager

2016-12-27 Thread Hans-Peter Jansen
Hi, I'm using $subjects combination successfully in a project for creating/iterating over huge binary files (> 5GB) with impressive performance, while resource usage keeps pretty low, all with plain Python3 code. Nice! Environment: (Python 3.4.5, Linux 4.8.14, openSUSE/x86_64, NFS4 and XFS

keyrings.cryptfile released on github

2017-03-09 Thread Hans-Peter Jansen
Hi, since the PyCrypto ML is dead, I'm looking for advise/feedback from some cryptography aware people. I've released a keyring companion package today: https://github.com/frispete/keyrings.cryptfile Its primary purpose is a decent encrypted file backend for python keyrings. As such,

Re: keyrings.cryptfile released on github

2017-03-10 Thread Hans-Peter Jansen
On Donnerstag, 9. März 2017 23:09:09 ng0 wrote: > Hans-Peter Jansen transcribed 3.8K bytes: > > Hi, > > > > since the PyCrypto ML is dead, I'm looking for advise/feedback from some > > cryptography aware people. > > > > I've released a keyring companion pa

Re: keyrings.cryptfile released on github

2017-03-13 Thread Hans-Peter Jansen
On Freitag, 10. März 2017 13:31:41 Paul Rubin wrote: > Hans-Peter Jansen <h...@urpla.net> writes: > > [1] http://web.cs.ucdavis.edu/~rogaway/ocb/license.htm > > Oh that's interesting, he's expanded the free licenses. Still though, > while OCB is very clever and it wa

Re: keyrings.cryptfile released on github

2017-03-13 Thread Hans-Peter Jansen
On Dienstag, 14. März 2017 00:33:34 Hans-Peter Jansen wrote: > > I plan to add authenticated service and username support via associated data > as well (that protects against tampering with these values). Done. > Cheers, > Pete -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCA cryptography 2.3 released

2018-07-18 Thread Hans-Peter Jansen
Hi Paul, you have a version mismatch in subject and text. Cheers, Pete On Mittwoch, 18. Juli 2018 05:19:27 Paul Kehrer wrote: > PyCA cryptography 2.2.2 has been released to PyPI. cryptography includes > both high level recipes and low level interfaces to common cryptographic > algorithms such

[issue33327] Add a method to move messages to IMAPlib

2020-07-03 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: If I'm not mistaken, this is applied to the openSUSE TW version of Python. For some reason, this seems to not play well with .uid('move',...) on a cyrus imap server (v2.4.19). Is that to be expected? ``` 2020-07-03 18:04:05 INFO: [imap_reorg] move b