[issue24339] iso6937 encoding missing

2021-06-29 Thread Maarten Derickx
Maarten Derickx added the comment: Hi Marc-Andre Lemburg, Thanks for your responses and guidance. At least your pointers to charmap_encode and charmap_decode helped, since it shows at least what the general idea is on how to deal with these types of encodings. In the mean time I did

[issue24339] iso6937 encoding missing

2021-06-29 Thread Maarten Derickx
Maarten Derickx added the comment: The route via gencodec or more generally via charmap_encode and charmap_decode seems to be one that is not possible without some low level CPython code adjustments. The reason for this is that charmap_encode and charmap_decode only seem to support mappings

[issue24339] iso6937 encoding missing

2021-06-24 Thread Maarten Derickx
Maarten Derickx added the comment: Hi Marc-Andre Lemburg, Thanks for your reply. I tried using gencodec.py as could be downloaded from https://github.com/python/cpython/blob/main/Tools/unicode/gencodec.py as you mentioned. However the code in gencodec.py seems to be in a much worse shape

[issue24339] iso6937 encoding missing

2021-06-23 Thread Maarten Derickx
Maarten Derickx added the comment: Is there any way to contact John Helour? I would still very much like to put this package on github and pypi. And would like to ask him permission for licensing. Or is there some standard open source license under which all code uploaded to https

[issue7946] Convoy effect with I/O bound threads and New GIL

2021-01-15 Thread Maarten Breddels
Maarten Breddels added the comment: In case someone finds it useful, I've written a blog post on how to visualize the GIL: https://www.maartenbreddels.com/perf/jupyter/python/tracing/gil/2021/01/14/Tracing-the-Python-GIL.html In the comments (or at https://github.com/maartenbreddels

[issue42321] Limitations of building a static python library on Windows (MSVC)

2020-11-11 Thread Maarten
New submission from Maarten : `PCbuild/readme.txt` contains a little paragraph about how to build a static python library. The resulting static `python.lib` library contains all python C API functions. Windows DLL's don't allow missing symbols, so C extensions modules must link

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-24 Thread Maarten
Change by Maarten : -- keywords: +patch pull_requests: +21060 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21950 ___ Python tracker <https://bugs.python.org/issu

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-24 Thread Maarten
New submission from Maarten : When building python using Visual Studio, the curses and curses.module, are not getting built. -- components: Build, Library (Lib) messages: 375871 nosy: maarten priority: normal severity: normal status: open title: Visual Studio does not build the curses

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2020-08-24 Thread Maarten
Maarten added the comment: My previous comment should have contained: Because I noticed the timestamp was not included in the CRC, ... -- ___ Python tracker <https://bugs.python.org/issue31

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2020-08-24 Thread Maarten
Maarten added the comment: I have the same issue. The timestamp is inserted here: https://github.com/python/cpython/blob/802726acf6048338394a6a4750835c2cdd6a947b/Lib/tarfile.py#L419-L420 Because I noticed the timestamp was not included in the timestamp, I could zero it by doing: ``` with open

[issue1723038] Curses Menu

2020-08-20 Thread Maarten
Change by Maarten : -- pull_requests: +21047 pull_request: https://github.com/python/cpython/pull/21933 ___ Python tracker <https://bugs.python.org/issue1723

[issue1723038] Curses Menu

2020-08-20 Thread Maarten
Change by Maarten : -- pull_requests: -21045 ___ Python tracker <https://bugs.python.org/issue1723038> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41604] [curses.panel] Failed panel.set_userptr will decrement refcount of original userptr

2020-08-20 Thread Maarten
Change by Maarten : -- keywords: +patch pull_requests: +21046 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21933 ___ Python tracker <https://bugs.python.org/issu

[issue1723038] Curses Menu

2020-08-20 Thread Maarten
Change by Maarten : -- nosy: +maarten nosy_count: 5.0 -> 6.0 pull_requests: +21045 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21933 ___ Python tracker <https://bugs.python.org/iss

[issue41604] [curses.panel] Failed panel.set_userptr will decrement refcount of original userptr

2020-08-20 Thread Maarten
New submission from Maarten : When ncurses' function `set_panel_userptr` fails, panel.set_userptr should not decrement the reference count of the previous userptr. -- components: Library (Lib) messages: 375738 nosy: maarten priority: normal severity: normal status: open title

[issue2889] curses for windows (alternative patch)

2020-08-19 Thread Maarten
Maarten added the comment: Current ncurses master is buildable on Visual Studio, using msys2. It should be possible to create a vcxproject and integrate it in the Visual Studio build. -- nosy: +maarten ___ Python tracker <https://bugs.python.

[issue41595] curses' window.chgat does not change color when specifying curses.A_COLOR

2020-08-19 Thread Maarten
Maarten added the comment: Equivalent c script of chgat.py Compile with: gcc chgat.c -lncurses -o chgat -- Added file: https://bugs.python.org/file49408/chgat.c ___ Python tracker <https://bugs.python.org/issue41

[issue41595] curses' window.chgat does not change color when specifying curses.A_COLOR

2020-08-19 Thread Maarten
New submission from Maarten : Or'ing curses.A_COLOR in the `attr` argument of curses.window.chgat ends of with the line not showing. Actual Problem: The text is invisible/hidden/not shown. Using only the attribute curses.A_BLINK is fine. Expected: The color of the line is changed +the text

[issue10486] http.server doesn't set all CGI environment variables

2020-08-11 Thread Maarten
Maarten added the comment: The CGI examples of urwid (see http://urwid.org/manual/displaymodules.html#cgi-web-display-module-web-display) don't work on http.server because of missing meta variables. Using cgitb, I found out that the webdriver expects the environment variable

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2019-10-07 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: Can I please get a review of the pull request? -- ___ Python tracker <https://bugs.python.org/issue17088> ___ ___ Pytho

[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open

2019-10-07 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: Another problem with the current code is that when passed a URL with a host name that is not empty or "localhost", but is one of the alternative names for localhost returned by get_names(), file_open() returns None implicitly instead of openin

[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Maarten
Maarten added the comment: I have submitted a PR to github: https://github.com/python/cpython/pull/15560 -- ___ Python tracker <https://bugs.python.org/issue37

[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Maarten
Change by Maarten : -- pull_requests: +15233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15560 ___ Python tracker <https://bugs.python.org/issu

[issue37965] CCompiler has_function displays warning

2019-08-27 Thread Maarten
New submission from Maarten : When using the `has_function` method of a CCompiler object, the compiler will emit a warning because the main function has no return type specified. https://github.com/python/cpython/blob/8c9e9b0cd5b24dfbf1424d1f253d02de80e8f5ef/Lib/distutils/ccompiler.py#L784

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-09 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: I think I have a good solution now, see the pull request for details. It does touch a lot of code, but I split all the changes into small consistent units, so it should be easier to verify whether they are correct

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-09 Thread Maarten ter Huurne
Change by Maarten ter Huurne : -- pull_requests: +10286 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue17088> ___ ___ Python-bugs-lis

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-08 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: I was working on what I thought would be an elegant solution to this problem: for non-qualified attributes, add the element's namespace before accessing the cache and strip the namespace prefix after accessing the cache if it's equal to the element's

[issue30839] Larger and/or configurable _MAX_LENGTH for unittest messages

2017-07-03 Thread Maarten ter Huurne
New submission from Maarten ter Huurne: In a unit test for one of my projects I am comparing tree-structured objects using assertEqual(). Because there can be a few nested levels, the repr() string can exceed the _MAX_LENGTH which is just 80 characters. Not by much, but enough to get

Re: To whoever hacked into my Database

2013-11-08 Thread Maarten
. Judging from the questions and the code quality you post here, it is only a matter of time before accidents happen. Maarten -- https://mail.python.org/mailman/listinfo/python-list

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Maarten
is fairly foolproof, and the logic is clear. What's not to like? Maarten -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it that easy to install Python ?

2013-07-25 Thread Maarten
your python. Next your users will probably start requesting additional packages (regex, lxml, numpy, scipy, matplotlib, ... depending on what they actually do). Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to understand the memory occupation of big lists

2013-05-03 Thread Maarten
del i 3616.691 MB 0.000 MB gc.collect() # nothing change if I comment this If I make the two functions identical, the behave the same. Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: Using SciPy in application

2013-04-24 Thread Maarten
it, it probably doesn't exist. Very few people would do this without numpy. A trivial 'pure python spline' google search yields this: http://urchin.earth.li/~twic/splines.py (Warning: old code, python 2.2 era). Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: How can i create a random array of floats from 0 to 5 in python

2013-03-12 Thread Maarten
as np np.random.uniform(0, 5, 100) # note that the values are from the interval [0, 5) Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: advice, python for binary to xml

2013-01-31 Thread Maarten
the level of effort will be huge? I assume that you've looked into GPSBabel? http://www.gpsbabel.org/ Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: advice, python for binary to xml

2013-01-31 Thread Maarten
public description of the gdb file format. It is not trivial, but restricting yourself to the parts needed for the application may provide some shortcuts. Maarten - pay more, get less: way to go. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Offtopic] Line fitting [was Re: Numpy outlier removal]

2013-01-08 Thread Maarten
is the proper thing to do (assuming both variables are measured in the same units). In that case use an appropriate algorithm to perform the fit. ODR comes to mind. http://docs.scipy.org/doc/scipy/reference/odr.html Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: the meaning of rユ.......ï¾

2012-07-24 Thread Maarten
? Or do you Australians have the third day of the fourteenth month? You just missed it: 22/7 Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: Newby Python Programming Question

2012-05-14 Thread Maarten
menu, the directory is printed *twice* in the output window. Why is that? I'd say this is a bug or feature of the IDE. If I use ipython I get: In [1]: %run mypwd /nobackup/users/maarten/tmp/coyote I tried to use Eclipse, but I don't think I'll do that again. I otherwise never use an IDE, it makes

Re: newb __init__ inheritance

2012-03-08 Thread Maarten
figure out the parent class with a call to super: class C(A): def __init__(self): super(self.__class__, self).__init__() print(In C) a = A() (prints In A) b = B() (prints In A, In B on two lines) c = C() (prints In A, In C on two lines) Hope this helps. Maarten -- http

Re: Design principles: no bool arguments

2011-08-25 Thread Maarten
makes a world of difference. Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: Why the inconsistent of those two base64 methods?

2010-05-12 Thread Maarten
' base64.b64encode('aaa').decode('base64') 'aaa' (As far as I can see, both methods are completely consistent) Maarten -- http://mail.python.org/mailman/listinfo/python-list

[issue1711] socket functions that should return unsigned int return signed int

2008-01-01 Thread Maarten Thibaut
Maarten Thibaut added the comment: Guido, the problem is that my python foo is severely lacking - but I'll have a stab at it. Python believes that the number coming back from the C library is negative. We can fool it by packing the signed short into a system-native format, and then unpacking

[issue1711] socket functions that should return unsigned int return signed int

2007-12-30 Thread Maarten Thibaut
New submission from Maarten Thibaut: Socket library functions such as ntohs() return uint16_t, but inside Python these return values show up as negative numbers. One possible fix is to convert these return values using pack: struct.unpack('H', struct.pack('h', ntohs(number)))[0] 0x

[issue1711] socket functions that should return unsigned int return signed int

2007-12-30 Thread Maarten Thibaut
Maarten Thibaut added the comment: Numbers returned from ntohs() turn up as negative. But ntohs() is typed as uint16_t, so they shouldn't be. This is on solaris. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1711

[issue1711] socket functions that should return unsigned int return signed int

2007-12-30 Thread Maarten Thibaut
Maarten Thibaut added the comment: Try this on Linux and Solaris: --- from socket import ntohs, htons print ntohs(htons(55000)) --- On Linux: 55000 On Solaris: -10536 __ Tracker [EMAIL PROTECTED] http://bugs.python.org

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
Changes by Maarten Thibaut: -- components: Library (Lib) nosy: mthibaut severity: normal status: open title: func alloca inside ctypes lib needs #include alloca.h on solaris type: compile error versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
New submission from Maarten Thibaut: On Solaris, alloca() is a #define which is inside alloca.h. Ctypes fails to compile because the #define is missing. Please fix by adding the following at the front of these 2 files: #if defined (__SVR4) defined (__sun) # include alloca.h #endif

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
Changes by Maarten Thibaut: -- components: +Extension Modules -Library (Lib) __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1506 __ ___ Python-bugs-list mailing list

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
Maarten Thibaut added the comment: forgot to mention the files: Modules/_ctypes/callproc.c Modules/_ctypes/libffi/src/sparc/ffi.c __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1506

Re: Python good for data mining?

2007-11-05 Thread Maarten
). Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: DIAGNOSIS: Racism moves back to Denmark from South Africa

2007-10-19 Thread Maarten Bergvelt
Christianity : The Dutch went back to Denmark? Sure, Copenhagen is the capital of the Netherlands, any American school child knows that. -- Maarten Bergvelt -- http://mail.python.org/mailman/listinfo/python-list

Re: About alternatives to Matlab

2006-11-17 Thread Maarten van Reeuwijk
batteries included :-). BTW, I have the impression that MATLAB and SciPy have about the same performance. Cheers, Maarten -- === Maarten van Reeuwijkdept. of Multiscale Physics Phd student

cgi and popen

2006-06-07 Thread Maarten van Veen
embedded in page1.cgi, page 1 waits till the search is finished, resulting in a browser timeout when big queries are done. It was this problem in the first place why I split up the page in two and added Popen. Does anybody know how to get the page not waiting on Popen to finish? thnx Maarten

Re: cgi and popen

2006-06-07 Thread Maarten van Veen
In article [EMAIL PROTECTED], Thomas Guettler [EMAIL PROTECTED] wrote: Am Wed, 07 Jun 2006 14:54:41 +0200 schrieb Maarten van Veen: A long story made short, I've build a python/cgi website consisting of two pages. Page1 has a html form in which you can input a series of queries

Re: creating and naming objects

2006-06-07 Thread Maarten van Veen
but don't have to give them names. You could do something to all of them like this: for student in listWithStudent: student.doSomething() Or change just one student: listWithStudent[23].doSomething() # this is the 24th student though!!! Hope this is what you're looking for. Maarten -- http

Re: Filename case-insensitivity on OS X

2006-01-04 Thread Maarten
camera refused to work for me, as did Audacity. I didn't encounter any other problems, but that was enough for me. As to UFS: it is apparently way slower than HFS+, and only recommended in special cases, most of which are now advised to use Case-sensitive HFS+, I believe. Maarten -- http

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Maarten van Reeuwijk
); -- === Maarten van Reeuwijkdept. of Multiscale Physics Phd student Faculty of Applied Sciences maarten.ws.tn.tudelft.nl Delft University of Technology -- http://mail.python.org/mailman/listinfo/python-list

distutils, PyBison and Mac OS X

2005-04-18 Thread Maarten Sneep
, Maarten Links: [1] http://www.freenet.org.nz/python/pybison/ [2] http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble using \ to escape %

2005-04-15 Thread Maarten Sneep
In article [EMAIL PROTECTED], Lucas Machado [EMAIL PROTECTED] wrote: I'm writing a python script that modifies the smb.conf file, and i need to write the characters '%U' in the file. print %s = %%U % a yields a = %U for me. Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: regarding ignore case sensitive of a string using regular expressions

2005-03-22 Thread Maarten Sneep
regarding this Kindly mail me with example. RTFM: http://www.python.org/doc/2.3.4/lib/re-syntax.html (What you want is described under the (?iLmsux) heading) or http://www.python.org/doc/2.3.4/lib/node106.html Maarten -- http://mail.python.org/mailman/listinfo/python-list

Re: modifiable config files in compiled code?

2005-03-11 Thread Maarten Sneep
a pure python module for these: http://sarwat.net/opensource/ The advantage of the plist module is that the type of the variables is stored as well, and that you can store complex variables (lists, dictionaries) without mangling. Maarten -- http://mail.python.org/mailman/listinfo/python