Python Editor for mobile

2019-08-30 Thread CrazyVideoGamez
Are there any good editors on Apple that don't cost money and already has matplotlib, numpy, and other modules already installed? -- https://mail.python.org/mailman/listinfo/python-list

Re: if STREAM.isatty():

2019-08-30 Thread Hongyi Zhao
On Sat, 31 Aug 2019 09:11:22 +1000, Cameron Simpson wrote: > '\r' + progress_status > > which backs up to the start of the line, writes the status, and leaves > the cursor at the end. > > The latter has the advantage that any subsequent output (egthe shell > prompt after the programmke exits)

Re: if STREAM.isatty():

2019-08-30 Thread Hongyi Zhao
On Fri, 30 Aug 2019 10:25:10 -0600, Michael Torrie wrote: > No it is not. What kind of terminal are you using? I use Debian 9 with gnome desktop and the default gnome terminal. -- https://mail.python.org/mailman/listinfo/python-list

Re: if STREAM.isatty():

2019-08-30 Thread Cameron Simpson
On 31Aug2019 08:57, Cameron Simpson wrote: On 30Aug2019 10:25, Michael Torrie wrote: On Fri, Aug 30, 2019, 05:02 Hongyi Zhao On Fri, 30 Aug 2019 17:53:02 +1000, Chris Angelico wrote: (Also, why the sleep? Seems unnecessary.) Because without using sleep, the stuff on screen will display ver

Re: if STREAM.isatty():

2019-08-30 Thread Chris Angelico
On Sat, Aug 31, 2019 at 8:58 AM Eryk Sun wrote: > > On 8/30/19, Chris Angelico wrote: > > On Sat, Aug 31, 2019 at 7:42 AM Eryk Sun wrote: > > > >> In Windows 8+, a process attaches to a console by opening > >> "\Device\ConDrv\Connect" as a connection to an instance of the console > >> host proce

Re: if STREAM.isatty():

2019-08-30 Thread Cameron Simpson
On 30Aug2019 10:25, Michael Torrie wrote: On Fri, Aug 30, 2019, 05:02 Hongyi Zhao On Fri, 30 Aug 2019 17:53:02 +1000, Chris Angelico wrote: > (Also, why the sleep? Seems unnecessary.) Because without using sleep, the stuff on screen will display very shortly and then disappear. Is this not yo

Re: if STREAM.isatty():

2019-08-30 Thread Eryk Sun
On 8/30/19, Chris Angelico wrote: > On Sat, Aug 31, 2019 at 7:42 AM Eryk Sun wrote: > >> In Windows 8+, a process attaches to a console by opening >> "\Device\ConDrv\Connect" as a connection to an instance of the console >> host process, conhost.exe. This handle is stored internally as >> "Consol

Re: pandas loc on str lower for column comparison

2019-08-30 Thread Piet van Oostrum
Sayth Renshaw writes: > > I have tried both > > df1 = df.loc[:, ('UID','Name','New Leader','Current Team', 'New Team')] > df1['Difference'] = df1.loc['Current Team'].str.lower().str.strip() == > df1.loc['New Team'].str.lower().str.strip() > > and > > df1 = df[['UID','Name','New Leader','Current

Re: if STREAM.isatty():

2019-08-30 Thread Chris Angelico
On Sat, Aug 31, 2019 at 7:42 AM Eryk Sun wrote: > > On 8/30/19, Chris Angelico wrote: > > On Sat, Aug 31, 2019 at 5:40 AM Eryk Sun wrote: > > > >> Or simply run python.exe from another console process that keeps the > >> console alive (it's reference counted), which is typically cmd.exe or > >>

Re: if STREAM.isatty():

2019-08-30 Thread Eryk Sun
On 8/30/19, Chris Angelico wrote: > On Sat, Aug 31, 2019 at 5:40 AM Eryk Sun wrote: > >> Or simply run python.exe from another console process that keeps the >> console alive (it's reference counted), which is typically cmd.exe or >> powershell.exe. > > Not sure what you mean by "reference counte

Re: multiple lines in one line

2019-08-30 Thread DL Neil
On 31/08/19 8:26 AM, tascioglu.ta...@gmail.com wrote: Hello,I working on some file operations with python.I have 2 text file which is consist of lines such as apple_pie 0.3434 0.6767 0.2312 and other text file has apple 0.2334 0.3412 0.123 pie 0.976 0.75654 0.2312 I want to append lines like ap

multiple lines in one line

2019-08-30 Thread tascioglu . tansu
Hello,I working on some file operations with python.I have 2 text file which is consist of lines such as apple_pie 0.3434 0.6767 0.2312 and other text file has apple 0.2334 0.3412 0.123 pie 0.976 0.75654 0.2312 I want to append lines like apple_pie 0.3434 0.6767 0.2312 0.2334 0.3412 0.123(values

Re: if STREAM.isatty():

2019-08-30 Thread Chris Angelico
On Sat, Aug 31, 2019 at 5:40 AM Eryk Sun wrote: > > On 8/30/19, Chris Angelico wrote: > > On Sat, Aug 31, 2019 at 2:26 AM Michael Torrie wrote: > >> On Fri, Aug 30, 2019, 05:02 Hongyi Zhao >> > >>> Because without using sleep, the stuff on screen will display very > >>> shortly and then disappe

Re: if STREAM.isatty():

2019-08-30 Thread Eryk Sun
On 8/30/19, Chris Angelico wrote: > On Sat, Aug 31, 2019 at 2:26 AM Michael Torrie wrote: >> On Fri, Aug 30, 2019, 05:02 Hongyi Zhao > >>> Because without using sleep, the stuff on screen will display very >>> shortly and then disappear. Is this not your testing result? >> >> No it is not. What

Re: if STREAM.isatty():

2019-08-30 Thread Terry Reedy
Eric, thank you for the detailed answer. I stashed it away for future review ;-). On 8/30/2019 3:10 AM, Eryk Sun wrote: On 8/29/19, Terry Reedy wrote: On 8/29/2019 10:16 AM, Eryk Sun wrote: In Windows, isatty() is true for any character-type file. Does that mean one that can either send

Re: if STREAM.isatty():

2019-08-30 Thread Chris Angelico
On Sat, Aug 31, 2019 at 2:26 AM Michael Torrie wrote: > > On Fri, Aug 30, 2019, 05:02 Hongyi Zhao > > On Fri, 30 Aug 2019 17:53:02 +1000, Chris Angelico wrote: > > > (Also, why the sleep? Seems unnecessary.) > > > > Because without using sleep, the stuff on screen will display very > > shortly an

Re: An "Object" class?

2019-08-30 Thread Chris Angelico
On Sat, Aug 31, 2019 at 2:19 AM Cristian Cocos wrote: > > Thank you! Will give the "types" module a whirl. > > Otherwise, the whole idea behind building a rigorous taxonomical hierarchy > ("taxonomy") is to provide a simpler management of the wealth of features > objects have. And that is because

Re: if STREAM.isatty():

2019-08-30 Thread Michael Torrie
On Fri, Aug 30, 2019, 05:02 Hongyi Zhao On Fri, 30 Aug 2019 17:53:02 +1000, Chris Angelico wrote: > > (Also, why the sleep? Seems unnecessary.) > > Because without using sleep, the stuff on screen will display very > shortly and then disappear. Is this not your testing result? No it is not. Wha

Re: An "Object" class?

2019-08-30 Thread Cristian Cocos
Thank you! Will give the "types" module a whirl. Otherwise, the whole idea behind building a rigorous taxonomical hierarchy ("taxonomy") is to provide a simpler management of the wealth of features objects have. And that is because entities belonging to the same taxonomical class ("clade") have co

Re: if STREAM.isatty():

2019-08-30 Thread Hongyi Zhao
On Fri, 30 Aug 2019 18:42:51 +1000, Chris Angelico wrote: > There is no magic here. It is simply asking a question, and then making > a decision based on the answer. What's your mean by saying this? Sorry for my poor English. -- https://mail.python.org/mailman/listinfo/python-list

Re: if STREAM.isatty():

2019-08-30 Thread Hongyi Zhao
On Fri, 30 Aug 2019 17:53:02 +1000, Chris Angelico wrote: > That's because sys.stderr is never changing in your example here. Try > checking whether sys.stdout is a TTY instead. OMG, thanks a lot, this does the trick. > > (Also, why the sleep? Seems unnecessary.) Because without using sleep, t

[RELEASE] ACTION REQUIRED: Python 3.8.0b4 now available for testing

2019-08-30 Thread Ɓukasz Langa
It's time for the last beta release of Python 3.8. Go find it at: https://www.python.org/downloads/release/python-380b4/ This release is the last of four planned beta release previews. Beta release previews are intended to give the wider

Re: if STREAM.isatty():

2019-08-30 Thread Chris Angelico
On Fri, Aug 30, 2019 at 6:36 PM Hongyi Zhao wrote: > > On Thu, 29 Aug 2019 16:42:44 +0100, Rhodri James wrote: > > > I don't understand what's to not to understand. > > > >if condition: > > do_something_because_condition_is_true() > >else: > > do_something_because_condition_is_fa

Re: if STREAM.isatty():

2019-08-30 Thread Hongyi Zhao
On Thu, 29 Aug 2019 16:42:44 +0100, Rhodri James wrote: > I don't understand what's to not to understand. > >if condition: > do_something_because_condition_is_true() >else: > do_something_because_condition_is_false() > > is a perfectly normal construction. If you mean somethin

Re: if STREAM.isatty():

2019-08-30 Thread Chris Angelico
On Fri, Aug 30, 2019 at 5:51 PM Hongyi Zhao wrote: > > On Fri, 30 Aug 2019 01:29:48 +0200, Peter Otten wrote: > > > Perhaps a simple example can help? > > > > $ cat checktty.py import sys > > > > stream = sys.stdout > > > > if stream.isatty(): > > message = "tty" > > else: > > message = "n

Re: if STREAM.isatty():

2019-08-30 Thread Hongyi Zhao
On Fri, 30 Aug 2019 01:29:48 +0200, Peter Otten wrote: > Perhaps a simple example can help? > > $ cat checktty.py import sys > > stream = sys.stdout > > if stream.isatty(): > message = "tty" > else: > message = "no tty" > print(message, file=stream) > > When you run the script it print

Re: An "Object" class?

2019-08-30 Thread Gregory Ewing
Cristian Cocos wrote: type(print) isinstance(print, builtin_function_or_method) Traceback (most recent call last): File "", line 1, in NameError: name 'builtin_function_or_method' is not defined Just curious why builtin_function_or_method doesn't work as an argument of isinstance().

Re: if STREAM.isatty():

2019-08-30 Thread Eryk Sun
On 8/30/19, Eryk Sun wrote: > > GetFileType classifies files for all of the following NT device types > as FILE_TYPE_DISK (akin to Unix S_IFBLK): To clarify, file-system files and directories in a mounted file system on such as device are akin to Unix S_IFREG and S_IFDIR. Their file type is FILE_

Re: if STREAM.isatty():

2019-08-30 Thread Eryk Sun
On 8/29/19, Terry Reedy wrote: > On 8/29/2019 10:16 AM, Eryk Sun wrote: > >> In Windows, isatty() is true for any character-type file. > > Does that mean one that can either send or receive data a character at a > time, as opposed to a block at a time? Yes, any number of bytes can be written to a