George Pantazes added the comment:
Also happens when I plug in a conventional mouse and use the mouse scrollwheel
(so it's not just the touchpad scrolling!).
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from George Pantazes :
IDLE crashes if the user scrolls with the Mac mousepad (using two fingers,
either up or down).
```$ python -m idlelib # Then I use the mousepad to scroll in the IDLE window
Traceback (most recent call last):
File
"/usr/local/Cellar/python/
Change by George Xie :
--
keywords: +patch
Added file:
https://bugs.python.org/file48424/0001-fix-bound-method-__reduce__-bug.patch
___
Python tracker
<https://bugs.python.org/issue37
New submission from George Xie :
if we create a bound method object `f` with function object `A.f` and instance
object `B()`,
when pickling this bound method object:
import pickle
class A():
def f(self):
pass
class B():
def f
George Sakkis added the comment:
> I think the best thing to do is write another decorator that adds this
> method. I've often thought that having a dataclasses_tools third-party module
> would be a good idea.
I'd be happy with a separate decorator in the standard library f
New submission from George Sakkis :
I'd like to propose two new optional boolean parameters to the @dataclass()
decorator, `asdict` and `astuple`, that if true, the respective methods are
generated as equivalent to the module-level namesake functions.
In addition to saving an extra imported
New submission from George King :
I was browsing the Blake2b module implementation in master and noticed two
subtle issues in blake2b_impl.c. There are two places where the GIL gets
released; both of them appear flawed.
py_blake2b_new_impl, line 221. The ALLOW_THREADS block fails to acquire
New submission from George Shuklin :
ZFC (https://en.wikipedia.org/wiki/Zermelo%E2%80%93Fraenkel_set_theory) defines
numbers as nested empty sets.
0 is {}
1 is {{}}
2 is {{{}}}
Sets can not be nested in python (as they are mutable), so next best type is
frozen set. Unfortunately, nested
t; I know I am missing something, which is where I need some help :)
>
> Thanks.
>
> --
>
>
>
> UG, CSE,
> RVCE, Bengaluru.
> --
> https://mail.python.org/mailman/listinfo/python-list
Hi Kumar,
I saw that there was no answer.
Perhaps you should check PyTest
I don't know whether this is a toy example, having grid of this size is not
uncommon. True, it would make more sense to do distribute more work on each
box, if there was any. One has to find a proper balance, as with many other
things in life. I simply responded to a question by the OP.
George
ience, it is implemented
with a for loop. IMO vectorization would have to be done on C level.
Greetings from Anchorage
George
--
https://mail.python.org/mailman/listinfo/python-list
Feștilă George Cătălin added the comment:
I delete two folders of traits
Using the pip-review --auto this is the output of traits:
copying traits\util\tests\__init__.py -> build\lib.win-amd64-3.6\traits\util\t
ests
running build_ext
building 'traits.ctraits' extension
creating bu
New submission from Feștilă George Cătălin :
The pip install module crash with this error:
Could not install packages due to an EnvironmentError: [Errno 2] No such file or
directory: 'c:\\python364\\lib\\site-packages\\traits-4.6.0.dist-info\\METADATA
'
You are using pip version 18.1, however
George King added the comment:
I agree that regardless of the underlying issue, the docs should match the
behavior. Additionally, I hope the docs will note the exact release at which
the behavior changed.
@serhiy-storchaka do you have any opinion on this? I took a brief look at your
commit
New submission from George Fischhof :
Winreg's documentation lacks mentioning required permission at some points
Hi there,
on page
https://docs.python.org/3/library/winreg.html
it is not mentioned in the description of the following functions:
winreg.DeleteKey
winreg.DeleteKeyEx
Bobby ezt írta (időpont: 2018. szept. 14., P
0:16):
>
> I have a very simple System Verilog (SV) adder as my DUT (device under
> test). I would like to generate a test bench for this DUT based on the
> 'requirements'. I wrote its (DUT) functions in simple text as
> 'requirements' while
HI,
CSV has no cells, but you can use csv module from standard lib
https://docs.python.org/3/library/csv.html
and you can get 7th data from the first row (as A means the first row)
__george__
ezt írta (időpont: 2018. szept. 1., Szo, 20:24):
> how to get a value from CSV specific cell (A7)
From: Paul St George
Understanding and having an interest in Python does not imply knowledge of
Usenet, mailing lists, NNTP, gateways, gmane, bottom-posting, vanilla-flopping,
/et al/.
But, knowledge of these seems to be needed (or is at least useful) in order to
fully benefit from the Python
Understanding and having an interest in Python does not imply knowledge
of Usenet, mailing lists, NNTP, gateways, gmane, bottom-posting,
vanilla-flopping, /et al/.
But, knowledge of these seems to be needed (or is at least useful) in
order to fully benefit from the Python list.
Would it be
On 21/06/2018 10:05, Anssi Saari wrote:
D'Arcy Cain writes:
One of these days I will have to figure out how to block replies to the
trolls as well.
Benefit of reading the mailing list via nntp (i.e. gmane): can easily
score down follow-ups to annoying people in addition to their
posts.
And if you are able to identify the encoding codepage, then you should
follow what the codepage says
Another help can be if know the possible value range of the numbers (maybe
it should be asked ...)
George
--
https://mail.python.org/mailman/listinfo/python-list
>, choices=None,
> help=None, metavar=None)
> >>> parser.parse_args(["-o", "a=b", "-o", "c=d"])
> Namespace(o=[['a', 'b'], ['c', 'd']])
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
Hi,
You can also try click library from pypi, that is a very good command line
stuff.
George
>
>
--
https://mail.python.org/mailman/listinfo/python-list
George King added the comment:
OK, thanks. I agree that this is best pursued with the developers of the
relevant modules. I appreciate your quick and detailed responses!
--
___
Python tracker
<https://bugs.python.org/issue33
George King added the comment:
Thanks Barry. My question then is, what relationship does cpython have with
pip, setuptools, distutils and pkg_resources? Since pip comes bundled with
Python now it seems a little bit closer than "3rd party&quo
New submission from George King :
On my newish macOS laptop using Python 3.6 or 3.7, a no-op script takes 3 times
as long to invoke using the entry_points machinery as it does to invoke
directly. Here are some exemplary times (best times after several tries).
$ time python3.6 entrypoint.py
On 15/06/2018 17:33, T Berger wrote:
On Friday, June 15, 2018 at 12:14:30 PM UTC-4, Mark Lawrence wrote:
On 15/06/18 16:47, T Berger wrote:
On Friday, June 15, 2018 at 11:31:47 AM UTC-4, Alister wrote:
it certainly seems to be the source of most SPAM
as such some users of this list/newsgroup
Dennis Lee Bieber wrote:
Both may be dependent upon the actual hardware graphics board and
the
drivers for said board.
On 11/06/2018 01:47, Gregory Ewing wrote:
My guess is that if your surface is not fullscreen or is not
a hardware surface, then you're always drawing into an ofscreen
Paul St George wrote:
So...
print pygame.display.get_surface()
gives
and
print screen.get_flags()
gives
-2147483648
To recap: this thread started with a question. How do I know whether
DOUBLEBUF has been set with:
screen = pygame.display.set_mode((720,480), pygame.DOUBLEBUF
To recap: this thread started with a question. How do I know whether
DOUBLEBUF has been set with:
screen = pygame.display.set_mode((720,480), pygame.DOUBLEBUF |
pygame.FULLSCREEN)
On 09/06/2018 22:04, Mark Lawrence wrote:
On 09/06/18 20:31, Paul St George wrote:
print
On 08/06/18 09:00, Paul St George wrote:
Excellent. Now I know what to do in this instance and I understand
the principle.
I hesitantly tried this:
screen = pygame.display.set_mode((720,480), pygame.FULLSCREEN |
pygame.DOUBLEBUF)
Hesitantly because I expected the *bitwise
or DOUBLEBUF.
No errors were reported, but how would I check that DOUBLEBUF had been
set? Is there a general rule, such as replace 'set_something' with
'get_something'?
Paul St George
On 07/06/2018 19:56, Chris Angelico wrote:
On Fri, Jun 8, 2018 at 3:12 AM, Paul St George wrote
Or, I can use
screen =
pygame.display.set_mode((screen_width,screen_height),pygame.DOUBLEBUF)
to set DOUBLEBUF
But how do I set both FULLSCREEN and DOUBLEBUF?
And, how can I test or check that DOUBLEBUF is set?
--
Paul St George
http://www.paulstgeorge.com
http://www.devices-of-wonder.com
--
https
That's what I wanted! But, I didn't know the question because I didn't
know the answer.
On 30/05/2018 23:09, Karsten Hilbert wrote:
On Wed, May 30, 2018 at 11:01:17PM +0200, Peter J. Holzer wrote:
On 2018-05-30 22:08:45 +0200, Paul St George wrote:
Ha! No, my question was clumsy.
If I
h the name of my favourite viewer (for
example: ‘ImageMagick’).
On 30/05/2018 02:31, Steven D'Aprano wrote:
On Tue, 29 May 2018 20:02:22 +0200, Paul St George wrote:
Is there, somewhere, a list of viewers and their names (for the purposes
of this script)?
Do you mean a list of programs capable
tml#frequently-used-arguments>.
Is this equivalent?
p = subprocess.Popen('display', + imagepath)
so
p = subprocess.Popen('display', 'test.png')
On 30/05/2018 03:04, Ian Kelly wrote:
On Sat, May 26, 2018 at 9:17 AM, Paul St George wrote:
Thank you.
You are very right. The show()
quotes
- it can be used as a dashboard for system administrators
- etc
There are example plugins to help developing your own plugins.
Please note:
The full feature set requires Python 3.4 and later.
Have fun using pluggable-info-monitor
George
--
https://mail.python.org/mailman/listinfo
Is there, somewhere, a list of viewers and their names (for the purposes
of this script)?
I am assuming that if I want to ImageMagick (for example), there would
be some shorter name - such as 'magick' - and it would be lower case .
On 29/05/2018 08:58, Peter Otten wrote:
Paul St George
I tried this anyway. The error was:
non-keyword arg after keyword arg
On 27/05/2018 21:51, Dennis Lee Bieber wrote:
On Sun, 27 May 2018 19:59:41 +0200, Paul St George
declaimed the following:
So, on Unix I would use
Image.show(title=None, nameofdisplayutilty), or Image.show(title
Thank you. For the advice, and for the new word 'monkeypatch'.
On 27/05/2018 23:58, Cameron Simpson wrote:
On 27May2018 20:15, Paul St George wrote:
This is very helpful indeed, thank you. Awe-inspiring.
It occurred to me that I could edit the PIL/ImageShow.py, replacing
‘xv’ (in five
Should the PIL code be corrected?
On 28/05/2018 06:34, Christian Gollwitzer wrote:
Am 27.05.18 um 23:58 schrieb Cameron Simpson:
On 27May2018 20:15, Paul St George wrote:
This is very helpful indeed, thank you. Awe-inspiring.
It occurred to me that I could edit the PIL/ImageShow.py
George wrote:
Thank you.
You are very right. The show() method is intended for debugging purposes
and is useful for that, but what method should I be using and is PIL the
best imaging library for my purposes? I do not want to manipulate
images, I only want to show images (full screen
George <em...@paulstgeorge.com>
declaimed the following:
And, out of curiosity, as I will probably use a different method - how
do I find out what commands can be used as parameters for show()? I read
the docs at
<https://pillow.readthedocs.io/en/5.1.x/reference/Image.html#PIL.Image.I
tml#PIL.Image.Image.show>,
but I am none the wiser.
On 26/05/2018 01:02, boB Stepp wrote:
On Fri, May 25, 2018 at 6:04 AM, Paul St George <em...@paulstgeorge.com> wrote:
I am using the Python Imaging Library (PIL), Python 2 and Raspberry Pi 3 B+
My code is simply:
from PIL import Image
im
I am using the Python Imaging Library (PIL), Python 2 and Raspberry Pi 3 B+
My code is simply:
from PIL import Image
im = Image.open(‘somepic.jpg’)
im.show() # display image
But the show() method looks for the default viewer (probably xv). How do
I change this (in the code, or
e to answer; I don't know whether
TestSuite is a replaceable class. I'm not sure what the mechanics are
for test randomization, but it is most definitely a thing.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
If you want to use more asserts in a test case, you should use
pytest-assume plugin.
George
--
https://mail.python.org/mailman/listinfo/python-list
_test, self, template
>
>
> if __name__ == '__main__':
> nose.run(defaultTest=__name__, argv=[sys.argv[0], '__main__',
> '--verbosity=2'])
> --
> https://mail.python.org/mailman/listinfo/python-list
>
Hi,
maybe you should check PyTest
https://docs.pytest.org/en/latest/
and Flas testing turorial:
http://flask.pocoo.org/docs/1.0/testing/
BR,
George
--
https://mail.python.org/mailman/listinfo/python-list
g in pytest:
https://docs.pytest.org/en/latest/logging.html
BR,
George
--
https://mail.python.org/mailman/listinfo/python-list
Hi Sumana,
> I've been trying to reach out to the Debian Python community via IRC,
> personal connections, tickets, and mailing lists to ensure a smooth
> transition; I see now that a post I tried to get onto the debian-python
> list a few weeks ago did not get posted there, so I've re-sent it.
rce downlaod?),
and how do I find out whether an upload is signed?
I am asking mainly as a Debian developer relying on upstream signatures.
-nik
--
PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296
Dominik George · Hundeshagenstr. 26 · 53225 Bonn
Phone: +49 228 92934581 · ht
= string_next.strip('.')
Please see the JPG.
Sorry if this has been filed before, if I have filed this incorrectly could
you please provide me a better avenue for future reference.
Regards,
-George J Shen
--
https://mail.python.org/mailman/listinfo/python-list
When I am running IDLE return to me Missing python36.dll error
Στάλθηκε από την Αλληλογραφία για Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
Change by George King <george.w.k...@gmail.com>:
--
keywords: +patch
pull_requests: +4017
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Change by George King <george.w.k...@gmail.com>:
--
pull_requests: +4016
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31681>
___
George King <george.w.k...@gmail.com> added the comment:
Nick's implementation of f_trace_lines/f_trace_opcodes serves the same purpose
as my proposal, and is a simpler solution so I'm abandoning this patch and
working with that feature instead.
--
stage: test needed ->
George King <george.w.k...@gmail.com> added the comment:
The feature was was implemented in bpo-31344. See bpo-29400 for my parallel
effort, which has been abandoned.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from George King <george.w.k...@gmail.com>:
This patch moves the new opcode tracing added in commit 5a85167 to happen after
frame->f_lineno is updated. With this patch, when both f_trace_lines and
f_trace_opcodes are enabled the trace function will see the same li
Changes by George King <george.w.k...@gmail.com>:
--
pull_requests: +3278
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29400>
___
George King added the comment:
Attached updated demo script.
--
Added file: http://bugs.python.org/file47107/settracestate-demo.py
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by George King <george.w.k...@gmail.com>:
--
pull_requests: +3277
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24900>
___
George Lane added the comment:
Hi, ¿can you tell me about Diameter protocol implemented by Python?, ¿where
can I found documentation and package for downloading?
Best regards
2017-08-21 14:36 GMT-03:00 Serhiy Storchaka <rep...@bugs.python.org>:
>
> Serhiy Storchaka added
New submission from George Lane:
Diameter protocol in Python
--
components: Library (Lib)
messages: 300643
nosy: George Lane
priority: normal
severity: normal
status: open
title: Diameter protocol in Python
type: resource usage
versions: Python 3.7
George Collins added the comment:
Makes sense. I'll update the PR in a bit, and if anyone is hitting this
repeatedly and thinks it should be added to 3.6 they can advocate for a policy
change in the maintaining-consistency-with-previous-new-features corner case.
Thanks, all
George Collins added the comment:
Hm--either/both? I encountered it as a bug ("dis works on my generator object
and my async generator function, why does it break on my async generator
object?") but strictly speaking it's a new feature (just as issue21947 was). To
my mind, adding
Changes by George Collins <g...@syncosmic.io>:
--
pull_requests: +3114
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31183>
___
_
New submission from George Collins:
Issue 21947 informed the `dis` module about the `gi_code` attribute, which
stores code objects for generator objects. This allows inspection of generator
objects, not just functions which return them. However, asynchronous generator
objects use `ag_code
George King added the comment:
(Also I did prototype instruction filtering but it had mild performance
implications when tracing so I have shelved it for the moment.)
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
George King added the comment:
I've updated the patch and I think it's ready for a more serious review. A few
notes:
* settracestate now takes a flag `trace_instructions`. This describes slightly
better the behavior, which is that line events take precedence over
instructions.
* the old
New submission from George K:
The documentation for round states "The return value is an integer if called
with one argument, otherwise of the same type as number." This is not the case
if the second argument is None.
--
assignee: docs@python
components: Documentation
messag
George King added the comment:
After reviewing the thread, I'm reminded that the main design problem concerns
preserving behavior of this idiom:
"old=sys.gettrace(); ...; sys.settrace(old)"
If we add more state, i.e. the `trace_instructions` bool, then the above idiom
no longer
George King added the comment:
@matrixise, I'm the author of the alternative in issue29400, and I'm finally
finding the time to get back into it. I'm going to make a push this week to
clean it up; your feedback would be much appreciated!
--
nosy: +gwk
New submission from George Gillan:
Python 3.6.1 String Literal Error Not Going to sys.stderr
Using Windows 7 and Python 3.6.1. Attempting to redirect sys.stderr to a file.
The application will be deployed via .pyw file instead of .py so the GUI
application runs without a console window
George Shuklin added the comment:
Unfixed crash of code interpreter? This is sad.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from George Shuklin:
If there is too many indexes python crashes:
a[0][0][0][0]
segfault at 7ffd25fe6ff8 ip 564528c8cfe6 sp 7ffd25fe7000 error 6 in
python2.7[564528b6a000+324000]
code to generate code:
>>> i="[0]"*20
>>> file('/t
New submission from Damien George:
The behaviour of the "async with" statement in CPython does not match the
description of it in PEP492, nor the language documentation. The
implementation uses a try/except/finally block, while the PEP and documentation
describe the behaviour u
Changes by Damien George <damien.p.geo...@gmail.com>:
--
assignee: docs@python
components: Documentation
nosy: Damien George, docs@python
priority: normal
severity: normal
status: open
title: Incorrect description of "async with" in PEP492 and documentation
type: b
George King added the comment:
I think it is a mistake not to support None values. Please consider:
The existing message clearly suggests that the intent is to support the same
set of values as the start/stop parameters of the slice type. str, bytes, and
bytearray all support None for `index
Changes by George King <george.w.k...@gmail.com>:
--
type: -> enhancement
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29935>
___
_
New submission from George King:
As of python3.6, passing None to the start/end parameters of `list.index` and
`tuple.index` raises the following exception:
"slice indices must be integers or None or have an __index__ method"
This suggests that the intent is to support None as a v
New submission from George Shuklin:
I found that Python provides 'find()' and 'in' methods for strings, but lacking
same functionality for lists.
Because strings and lists are very similar, it's reasonable to expect same
function available for both.
Here long and rather ugly hack list
George King added the comment:
I'm not sure exactly, but the way I see it (for code coverage), we want to
trace transitions between basic blocks. So I would define it as: each entry
into a BB is traced, with a tuple of (previous_offset, current_offset). This
way when a function call starts
George King added the comment:
Attached is a new patch, which does not settrace/gettrace and instead offers
new settraceinst/gettraceinst per Victor's recommendation.
I did not implement the proposed behavior of raising an exception if the old
APIs are used when the inst_tracing flag is set
George King added the comment:
Thanks to both of you for your feedback. I will take a stab at updating the
patch with Victor's suggestions as soon as I can.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
George King added the comment:
Attached is a demo of using the feature as a fancy replacement for __ltrace__.
It demonstrates using a closure for the local trace function to track the
previous offset, and prints the offset transitions as src -> dst pairs. This
helped me learn a lot about
George King added the comment:
Xavier, this is a misunderstanding; sorry for not being more clear. When I said
"remove the `else`", I was proposing this:
+ if (tstate->inst_tracing) {
+ result = call_trace(func, obj, tstate, frame, PyTrace_INSTRUCTION, Py_None);
+ }
Line-ori
George King added the comment:
Here is the patch from git; if you need a patch for hg I can work on that
tomorrow!
--
keywords: +patch
Added file: http://bugs.python.org/file46475/inst-tracing.diff
___
Python tracker <rep...@bugs.python.org>
On 2017-01-31 18:02, MRAB wrote:
On 2017-01-31 22:34, Christian Gollwitzer wrote:
> >* Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal:
> *>>* Selection of button 'A' also selects button 'C'. Same goes for 'B' and
> 'D'.
> *>>* I noticed that widget names
208
.140182648425776.140182647841848
.140182648424152.140182648282080
.140182648424152.140182648282136
> /usr/local/Python-3.6.0/bin/python3 foo.py
.!frame.!checkbutton
.!frame.!checkbutton2
.!frame2.!checkbutton
.!frame2.!checkbutton2
Is this a known issue?
George
--
https://mail.python.org/mailman/li
New submission from George King:
I have recently put some effort into developing a code coverage tool that shows
correct results for intraline branches. In order to get intraline trace data, I
patched CPython, adding an optional "trace instructions" flag to sys.settrace.
The patch
George King added the comment:
I reinstalled the command line tools by downloading from
developer.apple.com/download/more and the problem went away. No idea how they
broke; I had previously installed the same version. In any case, sorry for the
noise
George King added the comment:
This is using the latest apple toolchain on latest macOS 10.12.2:
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64
George King added the comment:
Still seeing this problem. Here was my exact process:
$ git clone g...@github.com:python/cpython.git
$ cd cpython
$ git checkout 2.7
$ mkdir build
$ cd build
$ ../configure
$ make
In file included from ../Python/random.c:7:
/usr/include/sys/random.h:37:32: error
New submission from George Fischhof:
Hi There,
OS related file operations (copy, move, delete, rename...) should be placed
into one module...
As it quite confusing that they are in two moduls (os and shutil).
I have read that one is higher level than other, but actually to use them I
have
New submission from George Fischhof:
Hi There,
Settable defaulting to decimal instead of float
It would be good to be able to use decimal automatically instead of float if
there is a setting. For example an environment variable or a flag file.
Where and when accuracy is more important than
George King added the comment:
(I meant the github mirror: github.com/python/cpython)
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
George King added the comment:
I am encountering this problem on macOS 10.12.2, with Xcode 8.2.1 (latest).
I have tried building from the following cpython branches today (using the
github fork):
2.7: 13a39142c047
In file included from ../../Python/random.c:7:
/usr/include/sys/random.h:37:32
New submission from Carl George:
While attempting to build a Python 3.6 RPM for RHEL/CentOS 6, I noticed the
following warning.
*** WARNING: renaming "_sqlite3" since importing it failed:
build/lib.linux-i686-3.6-pydebug/_sqlite3.cpython-36dm-i386-linux-gnu.so:
undefi
Carl George added the comment:
While attempting to build a Python 3.6 RPM for RHEL/CentOS 6, I noticed the
following warning.
*** WARNING: renaming "_sqlite3" since importing it failed:
build/lib.linux-i686-3.6-pydebug/_sqlite3.cpython-36dm-i386-linux-gnu.so:
undefi
lines.txt", "r", newline="").read().replace("\r", *
> "").splitlines()
> ['alpha', 'beta', 'gamma', 'delta']
Thanks Peter. That's what I needed.
George
--
https://mail.python.org/mailman/listinfo/python-list
te "real" empty lines.
I was hoping there is a way to prevent read() from making hidden changes to
the file content.
George
--
https://mail.python.org/mailman/listinfo/python-list
15G25KT P6SM BKN050 WS015/18040KT=\n'
but Python 3.x replaces '\r\r\n' by '\n\n' on read().
Ideally I'd like to have code that handles both '\r\r\n' and '\n' as the
split character.
George
--
https://mail.python.org/mailman/listinfo/python-list
101 - 200 of 1782 matches
Mail list logo