Re: Proper shebang for python3

2019-07-25 Thread Dan Sommers
On 7/24/19 10:24 PM, Michael Torrie wrote: > ... In more recent times, binaries that are mostly applicable to the > super user go there. I don't see why you would want to merge those. > A normal user rarely has need of much in /sbin. Already /bin has way > too much stuff in it (although I don't

Re: Proper shebang for python3

2019-07-25 Thread MRAB
On 2019-07-25 03:57, Dan Sommers wrote: On 7/24/19 10:24 PM, Michael Torrie wrote: > ... In more recent times, binaries that are mostly applicable to the > super user go there. I don't see why you would want to merge those. > A normal user rarely has need of much in /sbin. Already /bin h

Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
Hi all! It is expected that: ``` >>> import os >>> from pathlib import Path >>> dummy = " " # or "" or " " >>> os.path.isdir(dummy) False >>> Path(dummy).is_dir() True ``` or was it overlooked? with kind regards, -gdg -- https://mail.python.org/mailman/listinfo/python-list

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov wrote: > > Hi all! It is expected that: > ``` > >>> import os > >>> from pathlib import Path > >>> dummy = " " # or "" or " " > >>> os.path.isdir(dummy) > False > >>> Path(dummy).is_dir() > True > ``` > > or was it overlooked? > Was not aware

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Kirill Balunov wrote: > import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) > False Path(dummy).is_dir() > True I can't reproduce the above result in either Linux or Windows. The results should only be different for an empt

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: > > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in e

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Chris Angelico wrote: > On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: >> >> On 7/25/19, Kirill Balunov wrote: >> > >> import os >> from pathlib import Path >> dummy = " " # or "" or " " >> os.path.isdir(dummy) >> > False >> Path(dummy).is_dir() >> > T

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 3:54 AM eryk sun wrote: > > On 7/25/19, Chris Angelico wrote: > > On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: > >> > >> On 7/25/19, Kirill Balunov wrote: > >> > > >> import os > >> from pathlib import Path > >> dummy = " " # or "" or " " > >> >>>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Chris Angelico wrote: > On Fri, Jul 26, 2019 at 3:54 AM eryk sun wrote: > >> That's what I said. But the OP shows os.path.isdir(" ") == False and >> Path(" ").is_dir() == True, which is what I cannot reproduce and >> really should not be able to reproduce, unless there's a bug >> some

Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Maksim Fomin via Python-list
‐‐‐ Original Message ‐‐‐ On Thursday, July 25, 2019 3:27 PM, Kirill Balunov wrote: > Hi all! It is expected that: > > >>> import os > >>> from pathlib import Path > >>> dummy = " " # or "" or " " > >>> os.path.isdir(dummy) > > False > >>> Path(dummy).is_dir

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in either Linu

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 19:16, Chris Angelico : > On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov > wrote: > > > > Hi all! It is expected that: > > ``` > > >>> import os > > >>> from pathlib import Path > > >>> dummy = " " # or "" or " " > > >>> os.path.isdir(dummy) > > False > > >>> Path(dum

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov wrote: > > > > чт, 25 июл. 2019 г. в 19:16, Chris Angelico : >> >> On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov >> wrote: >> > >> > Hi all! It is expected that: >> > ``` >> > >>> import os >> > >>> from pathlib import Path >> > >>> dummy = " "

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 22:58, Chris Angelico : > On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov > wrote: > [...] > > No, it's not just because of curiosity. I will try to tell the > background, and maybe I went the wrong way initially. There is a very cool > project https://github.com/3b1b/manim,

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 6:13 AM Kirill Balunov wrote: > > > > чт, 25 июл. 2019 г. в 22:58, Chris Angelico : >> >> On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov >> wrote: >> [...] >> > No, it's not just because of curiosity. I will try to tell the background, >> > and maybe I went the wrong way

book on modern Python

2019-07-25 Thread beliavsky--- via Python-list
I did some basic programming in Python 2 and now use Python 3. All I know about Python 3 is that print is a function requiring parentheses. What is a good book on modern Python that covers topics such as type annotations? I know of Fluent Python: Clear, Concise, and Effective Programming by Luc

Re: Proper shebang for python3

2019-07-25 Thread Cameron Simpson
On 24Jul2019 22:57, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> wrote: On 7/24/19 10:24 PM, Michael Torrie wrote: ... In more recent times, binaries that are mostly applicable to the super user go there. I don't see why you would want to merge those. A normal user rarely has need of much i

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Cameron Simpson
On 25Jul2019 13:40, eryk sun wrote: Windows trims trailing spaces and dots from the final component of a path, unless we use a non-normalized \\?\ path. Hoo! Well, that explains some extremely weird NAS behaviour I encountered the other month with some paths ending in spaces. (My machine and

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Cameron Simpson
On 26Jul2019 03:43, Chris Angelico wrote: On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: On 7/25/19, Kirill Balunov wrote: import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) > False Path(dummy).is_dir() > True I can't reproduce

Can not execute options trade

2019-07-25 Thread spawnaga
The placeOrder command does not send the order for options trades. I tried to submit the order for stocks and it went through but not options # -*- coding: utf-8 -*- """ Created on Wed Jul 24 21:58:32 2019 @author: Alex Oraibi """ import time from time import localtime, strftime from ib.ext.Con

Why am I getting duplicate values in my output?

2019-07-25 Thread DT
With the following code: import csv class AccessPoint(object): def __init__(self, name, ipv4, model, location): self.name = name self.ipv4 = ipv4 self.model = model self.location = location print('{0} born'.format(self.name)) def __del__(self):

Re: Why am I getting duplicate values in my output?

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 12:46 PM DT wrote: > def main(): > ap_list = [] > ap_dict = {} > > for row in csv_reader: > ap_dict['ap_name'] = ap.name > ap_dict['ap_ipv4'] = ap.ipv4 > ap_dict['ap_model'] = ap.model > ap_dict['ap_location']

Python 3.7 - Reading text from Terminal window

2019-07-25 Thread nir . zairi
Hi, I want it to wait for a specific text on the terminal window that it opens (putty.exe), how can i do it? from pywinauto.application import Application from pynput.keyboard import Key, Controller print('Configuring') app = Application().start(cmd_line=u'"C:\\...putty.exe" ') puttyconfigb

Re: Proper shebang for python3

2019-07-25 Thread Eli the Bearded
In comp.lang.python, Thomas 'PointedEars' Lahn wrote: > Michael Torrie wrote: >> On 7/24/19 4:20 PM, Cameron Simpson wrote: >>> That is some progress, hooray. Then there's just sbin -> bin to go. >> I suppose in the olden days sbin was for static binaries, […] > No, “sbin” is short for “*system*