open sentinel-2image python
Dear all , When I open the sentinel-2 image in Python, I get the following error: MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 How can I fix it? Thanks -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: > When I open the sentinel-2 image in Python, I get the following error: > > MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) > and data type float32 > > How can I fix it? You can install more RAM. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list
Re: Exploring terminfo
On 17/01/2021 00:02, Greg Ewing wrote: > On 17/01/21 12:40 pm, Chris Angelico wrote: >> This is true. However, at some point, the boundary is crossed from >> Python into the C library. Something, at that point, knows. It's very >> common to have a flush option available, so it should be used. > > I'm wondering whether the problem in this particular case stems > from trying to use parts of curses without initialising it > properly. The problem is terminfo is not really part of curses. Curses is built on top of terminfo. > I expect that initialising curses would put stdout > into some kind of unbuffered mode, You can choose the mode, but once in curses all the standard input/output options cease to be usable, you have to use the curses functions such as addstr(), getch() etc. Its precisely because curses is such an all or nothing option that I wanted to see if I could create some kind of text attribute control outside of curses - which it seems is what Cameron has been up to independently! For example, it is difficult to call a Python function that has print statements in it (bad practice though it may be!) from within curses. You need to temporarily turn cures off, call he function then reinstate curses. It's doable but messy! If you don't need to create windows and move the cursor around and respond to mouse clicks etc then curses is a bit of overkill to just turn some text bold or inverse. That's where the terminfo functions come in and, as you saw from the C code, are fairly trivial to use in C. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list
Re: count consecutive elements
On 17/01/2021 02:15, Dan Stromberg wrote: IMO a good set of tests is much more important than type annotations ;) def get_longest(string: str) -> typing.Tuple[int, typing.List[str]]: """Get the longest run of a single consecutive character.""" May I ask why you artificially limit the signature to str? If there were a signature, shouldn't it be something like Iterable[E] --> Tuple[int, List[E]] where E may be anything that has an equality operation? As someone who has not yet looked seriously into typing: is there a way to spell this? if not string: return (0, []) grouped = itertools.groupby(string) grouped_with_lengths = [(len(list(value)), key) for key, value in grouped] max_count_and_letter = max(grouped_with_lengths) max_count = max_count_and_letter[0] result = (max_count, sorted(list_ for count, list_ in grouped_with_lengths if count == max_count)) return result If you want to dabble some more here's a test case you might strive for your function to pass: """ >>> class A: ... def __init__(self, x): ... self.x = x ... def __eq__(self, other): ... return self.x == other.x ... def __repr__(self): ... return self.x >>> get_longest(map(A, "aaabbcccdaa")) (3, [a, c]) """ -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On 2021-01-17 13:57, Karsten Hilbert wrote: Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: When I open the sentinel-2 image in Python, I get the following error: MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 How can I fix it? You can install more RAM. Or maybe the OP is running 32-bit Python but the code needs >2GB. If that's the case then using 64-bit Python might fix it, assuming that it's a 64-bit machine. -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On Sunday, January 17, 2021 at 9:31:58 PM UTC+3:30, MRAB wrote: > On 2021-01-17 13:57, Karsten Hilbert wrote: > > Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: > > > >> When I open the sentinel-2 image in Python, I get the following error: > >> > >> MemoryError: Unable to allocate 115. MiB for an array with shape (5490, > >> 5490) and data type float32 > >> > >> How can I fix it? > > > > You can install more RAM. > > > Or maybe the OP is running 32-bit Python but the code needs >2GB. If > that's the case then using 64-bit Python might fix it, assuming that > it's a 64-bit machine. Yes, it is 64. Excuse me, can you explain how I can fix it? -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On 18/01/2021 08.12, omid mohammadi wrote: > On Sunday, January 17, 2021 at 9:31:58 PM UTC+3:30, MRAB wrote: >> On 2021-01-17 13:57, Karsten Hilbert wrote: >>> Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: >>> When I open the sentinel-2 image in Python, I get the following error: MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 How can I fix it? >>> >>> You can install more RAM. >>> >> Or maybe the OP is running 32-bit Python but the code needs >2GB. If >> that's the case then using 64-bit Python might fix it, assuming that >> it's a 64-bit machine. > > Yes, it is 64. > > Excuse me, can you explain how I can fix it? What is "64" - the machine or the Python package? >From where did you download Python? What is the code being used to read/load the image? What do you mean by "the sentinel-2 image" - most of the images (which I spotted in a *quick* survey) made available to the general public are of the order of tens of mega-bytes. (a URL might help people trying to replicate the problem!) Be advised that everyone 'here' is a volunteer. Please help us to help you! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On 2021-01-17 19:12, omid mohammadi wrote: On Sunday, January 17, 2021 at 9:31:58 PM UTC+3:30, MRAB wrote: On 2021-01-17 13:57, Karsten Hilbert wrote: > Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: > >> When I open the sentinel-2 image in Python, I get the following error: >> >> MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 >> >> How can I fix it? > > You can install more RAM. > Or maybe the OP is running 32-bit Python but the code needs >2GB. If that's the case then using 64-bit Python might fix it, assuming that it's a 64-bit machine. Yes, it is 64. Excuse me, can you explain how I can fix it? Are you using a 32-bit version of Python or a 64-bit version of Python? If you're not sure, try this from Python: >>> import sys >>> sys.maxsize.bit_length() I get 63 because I'm running a 64-bit version of Python 3. On Windows you can install multiple versions of Python side-by-side. I don't know the procedure for Linux or MacOS. If you're currently using 32-bit Python, you can install the 64-bit version in a folder next to the folder of the 32-bit version (I have C:\Python39 and C:\Python39-32, for example). Then install any other packages you need for the new version. -- https://mail.python.org/mailman/listinfo/python-list
advice on debugging a segfault
I have a segfault in the 3.10 alpha 4 when running the reportlab document generation; all the other tests seem to have worked. I would like to ask experts here how to approach getting the location of the problem. I run recent archlinux. Below is the output of a test run with -Xdev -Xtracemalloc; the main process is almost finished so the error appears to come from trying to free resources $ python -Xdev -Xtracemalloc genuserguide.py /home/robin/devel/reportlab/.py310/lib/python3.10/distutils/__init__.py:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp Built story contains 1843 flowables... Saved "/home/robin/devel/reportlab/REPOS/reportlab/docs/reportlab-userguide.pdf" [ Top 10 ] :630: size=10.5 MiB, count=105832, average=104 B /home/robin/devel/reportlab/reportlab/lib/abag.py:19: size=7161 KiB, count=27126, average=270 B /home/robin/devel/reportlab/reportlab/platypus/paraparser.py:3141: size=3364 KiB, count=5980, average=576 B /home/robin/devel/reportlab/.py310/lib/python3.10/site-packages/pyphen/__init__.py:160: size=2905 KiB, count=41797, average=71 B /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:776: size=1386 KiB, count=32208, average=44 B /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:92: size=1384 KiB, count=26248, average=54 B /home/robin/devel/reportlab/.py310/lib/python3.10/copy.py:280: size=1232 KiB, count=8827, average=143 B /home/robin/devel/reportlab/reportlab/platypus/frames.py:155: size=1101 KiB, count=1173, average=962 B :241: size=915 KiB, count=8146, average=115 B /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:773: size=881 KiB, count=16104, average=56 B sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='../images/replogo.gif'> sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='../images/testimg.gif'> Debug memory block at address p=0x5617c33effe0: API '' 0 bytes originally requested The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd): at p-7: 0x00 *** OUCH at p-6: 0x00 *** OUCH at p-5: 0x00 *** OUCH at p-4: 0x00 *** OUCH at p-3: 0x00 *** OUCH at p-2: 0x00 *** OUCH at p-1: 0x00 *** OUCH Because memory is corrupted at the start, the count of bytes requested may be bogus, and checking the trailing pad bytes may segfault. The 8 pad bytes at tail=0x5617c33effe0 are not all FORBIDDENBYTE (0xfd): at tail+0: 0x00 *** OUCH at tail+1: 0x00 *** OUCH at tail+2: 0x00 *** OUCH at tail+3: 0x00 *** OUCH at tail+4: 0x00 *** OUCH at tail+5: 0x00 *** OUCH at tail+6: 0x00 *** OUCH at tail+7: 0x00 *** OUCH Enable tracemalloc to get the memory block allocation traceback Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '', verified using API 'o' Python runtime state: finalizing (tstate=0x5617c53c8b30) Current thread 0x7fd5742b3740 (most recent call first): Aborted (core dumped) for comparison here is the 3.9.1 output> $ python -Xdev -Xtracemalloc genuserguide.py /home/robin/devel/reportlab/.py39/lib/python3.9/distutils/__init__.py:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /home/robin/devel/reportlab/.py39/lib/python3.9/site-packages/fontTools/misc/py23.py:11: DeprecationWarning: The py23 module has been deprecated and will be removed in the next release. Please update your code. warnings.warn( Built story contains 1843 flowables... Saved "/home/robin/devel/reportlab/REPOS/reportlab/docs/reportlab-userguide.pdf" [ Top 10 ] :587: size=12.4 MiB, count=128010, average=102 B /home/robin/devel/reportlab/reportlab/lib/abag.py:19: size=7132 KiB, count=26951, average=271 B /home/robin/devel/reportlab/reportlab/platypus/paraparser.py:3141: size=3364 KiB, count=5980, average=576 B /home/robin/devel/reportlab/.py39/lib/python3.9/site-packages/pyphen/__init__.py:160: size=2905 KiB, count=41797, average=71 B /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:776: size=1386 KiB, count=32208, average=44 B /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:92: size=1384 KiB, count=26248, average=54 B /home/robin/devel/reportlab/.py39/lib/python3.9/copy.py:279: size=1230 KiB, count=8827, average=143 B /home/robin/devel/reportlab/reportlab/platypus/frames.py:155: size=1039 KiB, count=957, average=1112 B :228: size=959 KiB, count=8503, average=116 B /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:773: size=881 KiB, count=16104, average=56 B sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='../images/replogo.gif'> sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='../images/testimg.gif'> -- https://mail.python.org/mailman/listinfo/python-list
Re: Exploring terminfo
On 2021-01-17, Greg Ewing wrote: > On 17/01/21 12:40 pm, Chris Angelico wrote: >> This is true. However, at some point, the boundary is crossed from >> Python into the C library. Something, at that point, knows. It's very >> common to have a flush option available, so it should be used. > > I'm wondering whether the problem in this particular case stems > from trying to use parts of curses without initialising it > properly. No. > I expect that initialising curses would put stdout into some kind of > unbuffered mode, and the rest of it assumes that this has been done. No. -- Grant -- https://mail.python.org/mailman/listinfo/python-list
Re: advice on debugging a segfault
Run python under gdb and when the segv happens use the gdb bt command to get a stack trace. Also if gdb says that it needs debug symbols install you will need to do that. Otherwise the not will not contain symbols. Barry > On 17 Jan 2021, at 19:58, Robin Becker wrote: > > I have a segfault in the 3.10 alpha 4 when running the reportlab document > generation; all the other tests seem to have worked. I would like to ask > experts here how to approach getting the location of the problem. I run > recent archlinux. > > Below is the output of a test run with -Xdev -Xtracemalloc; the main process > is almost finished so the error appears to come from trying to free resources > >> $ python -Xdev -Xtracemalloc genuserguide.py >> /home/robin/devel/reportlab/.py310/lib/python3.10/distutils/__init__.py:1: >> DeprecationWarning: the imp module is deprecated in favour of importlib; see >> the module's documentation for alternative uses >> import imp >> Built story contains 1843 flowables... >> Saved >> "/home/robin/devel/reportlab/REPOS/reportlab/docs/reportlab-userguide.pdf" >> [ Top 10 ] >> :630: size=10.5 MiB, count=105832, >> average=104 B >> /home/robin/devel/reportlab/reportlab/lib/abag.py:19: size=7161 KiB, >> count=27126, average=270 B >> /home/robin/devel/reportlab/reportlab/platypus/paraparser.py:3141: size=3364 >> KiB, count=5980, average=576 B >> /home/robin/devel/reportlab/.py310/lib/python3.10/site-packages/pyphen/__init__.py:160: >> size=2905 KiB, count=41797, average=71 B >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:776: size=1386 >> KiB, count=32208, average=44 B >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:92: size=1384 >> KiB, count=26248, average=54 B >> /home/robin/devel/reportlab/.py310/lib/python3.10/copy.py:280: size=1232 >> KiB, count=8827, average=143 B >> /home/robin/devel/reportlab/reportlab/platypus/frames.py:155: size=1101 KiB, >> count=1173, average=962 B >> :241: size=915 KiB, count=8146, average=115 B >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:773: size=881 >> KiB, count=16104, average=56 B >> sys:1: ResourceWarning: unclosed file <_io.BufferedReader >> name='../images/replogo.gif'> >> sys:1: ResourceWarning: unclosed file <_io.BufferedReader >> name='../images/testimg.gif'> >> Debug memory block at address p=0x5617c33effe0: API '' >>0 bytes originally requested >>The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd): >>at p-7: 0x00 *** OUCH >>at p-6: 0x00 *** OUCH >>at p-5: 0x00 *** OUCH >>at p-4: 0x00 *** OUCH >>at p-3: 0x00 *** OUCH >>at p-2: 0x00 *** OUCH >>at p-1: 0x00 *** OUCH >>Because memory is corrupted at the start, the count of bytes requested >> may be bogus, and checking the trailing pad bytes may segfault. >>The 8 pad bytes at tail=0x5617c33effe0 are not all FORBIDDENBYTE (0xfd): >>at tail+0: 0x00 *** OUCH >>at tail+1: 0x00 *** OUCH >>at tail+2: 0x00 *** OUCH >>at tail+3: 0x00 *** OUCH >>at tail+4: 0x00 *** OUCH >>at tail+5: 0x00 *** OUCH >>at tail+6: 0x00 *** OUCH >>at tail+7: 0x00 *** OUCH >> Enable tracemalloc to get the memory block allocation traceback >> Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '', >> verified using API 'o' >> Python runtime state: finalizing (tstate=0x5617c53c8b30) >> Current thread 0x7fd5742b3740 (most recent call first): >> >> Aborted (core dumped) > > > for comparison here is the 3.9.1 output> $ python -Xdev -Xtracemalloc > genuserguide.py >> /home/robin/devel/reportlab/.py39/lib/python3.9/distutils/__init__.py:1: >> DeprecationWarning: the imp module is deprecated in favour of importlib; see >> the module's documentation for alternative uses >> import imp >> /home/robin/devel/reportlab/.py39/lib/python3.9/site-packages/fontTools/misc/py23.py:11: >> DeprecationWarning: The py23 module has been deprecated and will be removed >> in the next release. Please update your code. >> warnings.warn( >> Built story contains 1843 flowables... >> Saved >> "/home/robin/devel/reportlab/REPOS/reportlab/docs/reportlab-userguide.pdf" >> [ Top 10 ] >> :587: size=12.4 MiB, count=128010, >> average=102 B >> /home/robin/devel/reportlab/reportlab/lib/abag.py:19: size=7132 KiB, >> count=26951, average=271 B >> /home/robin/devel/reportlab/reportlab/platypus/paraparser.py:3141: size=3364 >> KiB, count=5980, average=576 B >> /home/robin/devel/reportlab/.py39/lib/python3.9/site-packages/pyphen/__init__.py:160: >> size=2905 KiB, count=41797, average=71 B >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:776: size=1386 >> KiB, count=32208, average=44 B >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:92: size=1384 >> KiB, count=26248, average=54 B >> /home/robin/devel/reportlab/.py39/lib/python3.9/copy.py:279: size=1230 KiB, >> count=8827, average=143 B >> /home/robin/devel/
Re: Exploring terminfo
On 2021-01-17, Grant Edwards wrote: > On 2021-01-17, Greg Ewing wrote: >> On 17/01/21 12:40 pm, Chris Angelico wrote: >>> This is true. However, at some point, the boundary is crossed from >>> Python into the C library. Something, at that point, knows. It's very >>> common to have a flush option available, so it should be used. >> >> I'm wondering whether the problem in this particular case stems >> from trying to use parts of curses without initialising it >> properly. > > No. > >> I expect that initialising curses would put stdout into some kind of >> unbuffered mode, and the rest of it assumes that this has been done. > > No. I should clarify. The case in question isn't using curses. It's only using the terminfo calls, and the terminfo stuff is being properly initialized. As I previously explained, the problem with the OP's code is that ncurses.putp() is writing to libc's FILE *stdout (which does buffering). Python's stdout/stderr objects do not use FILE *stdout/*stderr, but instead do their own buffering before writing to the file descriptors. There are three ways to do what the OP is trying to do: 1. Use ctypes to call fflush(stdout) before doing a print() or sys.stdout.write(), and call sys.stdout.flush() before calling curses.putp(). 2. Don't use putp(). Use the terminfo calls to construct the escape sequences and then write them with print() or sys.stdout.write(). 3. Replace sys.stdout.buffer and sys.stderr.buffer with a custom objects that uses ctypes to call fwrite() instead of writing directly to the file descriptor. I've posted examples of #1 and #2, I'll try #3 when I have more spare time. I thought it might be possible to use curses.tputs() with a callback that writes to sys.stdout, but the curses module doesn't provide tput, it only provides putp (which is far less flexible). -- Grant -- https://mail.python.org/mailman/listinfo/python-list
Re: advice on debugging a segfault
I would normally agree, except... This is a refcount issue (I was able to reproduce the problem, gbd shows a free error ) And I wouldn't recommend DGBing a refcount issue as a beginner to debugging. The other mailing list identified a PIL bug that messes up the refcount for True, but this refcount issue is for some tuple object, so may possibly be a different problem. Steve On Sun, Jan 17, 2021 at 9:27 PM Barry wrote: > Run python under gdb and when the segv happens use > the gdb bt command to get a stack trace. > > Also if gdb says that it needs debug symbols install you will need to > do that. Otherwise the not will not contain symbols. > > Barry > > > On 17 Jan 2021, at 19:58, Robin Becker wrote: > > > > I have a segfault in the 3.10 alpha 4 when running the reportlab > document generation; all the other tests seem to have worked. I would like > to ask experts here how to approach getting the location of the problem. I > run recent archlinux. > > > > Below is the output of a test run with -Xdev -Xtracemalloc; the main > process is almost finished so the error appears to come from trying to free > resources > > > >> $ python -Xdev -Xtracemalloc genuserguide.py > /home/robin/devel/reportlab/.py310/lib/python3.10/distutils/__init__.py:1: > DeprecationWarning: the imp module is deprecated in favour of importlib; > see the module's documentation for alternative uses > >> import imp > >> Built story contains 1843 flowables... > >> Saved > "/home/robin/devel/reportlab/REPOS/reportlab/docs/reportlab-userguide.pdf" > >> [ Top 10 ] > >> :630: size=10.5 MiB, > count=105832, average=104 B > >> /home/robin/devel/reportlab/reportlab/lib/abag.py:19: size=7161 KiB, > count=27126, average=270 B > >> /home/robin/devel/reportlab/reportlab/platypus/paraparser.py:3141: > size=3364 KiB, count=5980, average=576 B > >> > /home/robin/devel/reportlab/.py310/lib/python3.10/site-packages/pyphen/__init__.py:160: > size=2905 KiB, count=41797, average=71 B > >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:776: > size=1386 KiB, count=32208, average=44 B > >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:92: > size=1384 KiB, count=26248, average=54 B > >> /home/robin/devel/reportlab/.py310/lib/python3.10/copy.py:280: > size=1232 KiB, count=8827, average=143 B > >> /home/robin/devel/reportlab/reportlab/platypus/frames.py:155: size=1101 > KiB, count=1173, average=962 B > >> :241: size=915 KiB, count=8146, > average=115 B > >> /home/robin/devel/reportlab/reportlab/platypus/paragraph.py:773: > size=881 KiB, count=16104, average=56 B > >> sys:1: ResourceWarning: unclosed file <_io.BufferedReader > name='../images/replogo.gif'> > >> sys:1: ResourceWarning: unclosed file <_io.BufferedReader > name='../images/testimg.gif'> > >> Debug memory block at address p=0x5617c33effe0: API '' > >>0 bytes originally requested > >>The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd): > >>at p-7: 0x00 *** OUCH > >>at p-6: 0x00 *** OUCH > >>at p-5: 0x00 *** OUCH > >>at p-4: 0x00 *** OUCH > >>at p-3: 0x00 *** OUCH > >>at p-2: 0x00 *** OUCH > >>at p-1: 0x00 *** OUCH > >>Because memory is corrupted at the start, the count of bytes > requested > >> may be bogus, and checking the trailing pad bytes may segfault. > >>The 8 pad bytes at tail=0x5617c33effe0 are not all FORBIDDENBYTE > (0xfd): > >>at tail+0: 0x00 *** OUCH > >>at tail+1: 0x00 *** OUCH > >>at tail+2: 0x00 *** OUCH > >>at tail+3: 0x00 *** OUCH > >>at tail+4: 0x00 *** OUCH > >>at tail+5: 0x00 *** OUCH > >>at tail+6: 0x00 *** OUCH > >>at tail+7: 0x00 *** OUCH > >> Enable tracemalloc to get the memory block allocation traceback > >> Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API > '', verified using API 'o' > >> Python runtime state: finalizing (tstate=0x5617c53c8b30) > >> Current thread 0x7fd5742b3740 (most recent call first): > >> > >> Aborted (core dumped) > > > > > > for comparison here is the 3.9.1 output> $ python -Xdev -Xtracemalloc > genuserguide.py > >> > /home/robin/devel/reportlab/.py39/lib/python3.9/distutils/__init__.py:1: > DeprecationWarning: the imp module is deprecated in favour of importlib; > see the module's documentation for alternative uses > >> import imp > >> > /home/robin/devel/reportlab/.py39/lib/python3.9/site-packages/fontTools/misc/py23.py:11: > DeprecationWarning: The py23 module has been deprecated and will be removed > in the next release. Please update your code. > >> warnings.warn( > >> Built story contains 1843 flowables... > >> Saved > "/home/robin/devel/reportlab/REPOS/reportlab/docs/reportlab-userguide.pdf" > >> [ Top 10 ] > >> :587: size=12.4 MiB, > count=128010, average=102 B > >> /home/robin/devel/reportlab/reportlab/lib/abag.py:19: size=7132 KiB, > count=26951, average=271 B > >> /home/robin/devel/reportlab/reportlab/platypus/paraparser.py:3141: > size=3
Re: Exploring terminfo
On 18/01/21 3:34 am, Alan Gauld wrote: The problem is terminfo is not really part of curses. Curses is built on top of terminfo. As far as I can tell from the man pages, terminfo itself is just a file format. The only programmatic interfaces I can find for it *are* part of curses: del_curterm(3x), mvcur(3x), putp(3x), restartterm(3x), set_curterm(3x), setterm(3x), setupterm(3x), tigetflag(3x), tigetnum(3x), tigetstr(3x), tparm(3x), tputs(3x), vid_attr(3x), vid_puts(3x), vidattr(3x), vidputs(3x) - curses interfaces to terminfo database tgetent(3x), tgetflag(3x), tgetnum(3x), tgetstr(3x), tgoto(3x), tputs(3x) - direct curses interface to the terminfo capability database -- Greg -- https://mail.python.org/mailman/listinfo/python-list