Re: Issues with running python in Command prompt

2021-01-19 Thread Mladen Gogala via Python-list
On Sat, 16 Jan 2021 19:00:06 +0330, mohsen shooshtari wrote: > hello, > Thanks in advance for your consideration. I install python3.8 and then > install Pycharm but when I call python in Command prompt, followed by ( > 'python' > is not recognized as an internal or external command, operable progr

Re: open sentinel-2image python

2021-01-19 Thread Mladen Gogala via Python-list
On Sun, 17 Jan 2021 18:01:26 +, 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 a

Force Python ast to emit lines no longer than $length

2021-01-19 Thread Samuel Marks
I've written a library that works at the ast level. Sometimes the generated output goes over the linter line length limit. "foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz_foo_bar_can_haz" How do I generate this kind of code instead? "foo_bar_can_haz_foo_bar_can_h

[ANN] PyYAML-5.4 Released

2021-01-19 Thread Matt Davis
= Announcing PyYAML-5.4 = A new release of PyYAML is now available: https://github.com/yaml/pyyaml/releases/tag/5.4 This release contains a security fix for CVE-2020-14343. It removes the python/module, python/object, and python/object/new tags from the Ful

Re: Exploring terminfo

2021-01-19 Thread Grant Edwards
On 2021-01-19, Grant Edwards wrote: >> >> int tgetent(char *bp, const char *name); >> int tgetflag(char *id); >> int tgetnum(char *id); >> char *tgetstr(char *id, char **area); >> char *tgoto(const char *cap, int col, int row); >> int tputs(const char *str, int affcnt, int

Re: Exploring terminfo

2021-01-19 Thread Grant Edwards
On 2021-01-19, Eli the Bearded <*@eli.users.panix.com> wrote: > Putting my Unix hat on, curses is a "friendly" library around creating > text-windowed applications. Programs like mutt use curses rather than > raw terminal operations, programs like vi use raw terminal operations. > Either curses or

Re: Exploring terminfo

2021-01-19 Thread Eli the Bearded
In comp.lang.python, Greg Ewing wrote: > 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 >

Re: Exploring terminfo

2021-01-19 Thread Grant Edwards
On 2021-01-19, Alan Gauld via Python-list wrote: > On 18/01/2021 22:14, Random832 wrote: >> On Fri, Jan 15, 2021, at 13:36, Alan Gauld via Python-list wrote: >>> That could make a big difference, the putp() function specifically >>> states that it writes to stdout. >> >> I think there is a reason

PyConBY (Belarus) 2021 Online. Call for Proposals

2021-01-19 Thread Mikalai Saskavets
Hi All! I am on a program committee of the PyCon Belarus team. Our team is happy to announce that PyCon Belarus 2021 https://by.pycon.org/ will be held on March 13. We made it online and free for everyone. 500+ Python developers of all levels will join us remotely. Call for Proposals is now open

Re: Exploring terminfo

2021-01-19 Thread Grant Edwards
On 2021-01-19, Greg Ewing wrote: > On 19/01/21 2:34 pm, Alan Gauld wrote: >> To be fair that's a limitation of the C curses library. putp() is a >> wrapper around tputs() even there, and you can't change what it does. >> The gap in the curses module is that it doesn't offer the tputs() >> option a

Re: Python not Running

2021-01-19 Thread MRAB
On 2021-01-19 03:26, Mladen Gogala via Python-list wrote: [snip] Since you're most probably using Winduhs, use regedit and modify your PATH variable. Your python will be in c:\Program Files if you installed 64 bit version, which you should have done. Otherwise, it will be in C:\Program Files(x86

Re: count consecutive elements

2021-01-19 Thread Peter Otten
On 19/01/2021 10:42, Bischoop wrote: On 2021-01-19, Peter Otten <__pete...@web.de> wrote: On 19/01/2021 04:45, Bischoop wrote: I sat to it again and solved it. Congratulations! lil = tuple(set(s)) # list of characters in s li=[0,0,0,0,0,0] # list for counted repeats I see a minor probl

Re: count consecutive elements

2021-01-19 Thread Bischoop
On 2021-01-19, Peter Otten <__pete...@web.de> wrote: > On 19/01/2021 04:45, Bischoop wrote: > >> I sat to it again and solved it. > > Congratulations! > > > lil = tuple(set(s)) # list of characters in s > > > > li=[0,0,0,0,0,0] # list for counted repeats > > I see a minor problem here. What happen

Re: count consecutive elements

2021-01-19 Thread Peter Otten
On 19/01/2021 04:45, Bischoop wrote: I sat to it again and solved it. Congratulations! > lil = tuple(set(s)) # list of characters in s > > li=[0,0,0,0,0,0] # list for counted repeats I see a minor problem here. What happens if s contains more than len(li) characters? import timeit Since