Re: Is sys.executable not supposed to follow symlinks?

2020-07-26 Thread Eryk Sun
On 7/26/20, Bolun Thompson wrote: > In the sys.executable documentation ( > https://docs.python.org/3/library/sys.html#sys.executable), they don't > specify if it follows symlinks. From my limited testing, it does not. Is > this behavior guaranteed? In Unix, the interpreter resolves the target of

Re: Is sys.executable not supposed to follow symlinks?

2020-07-26 Thread Chris Angelico
On Mon, Jul 27, 2020 at 8:04 AM Bolun Thompson wrote: > > In the sys.executable documentation ( > https://docs.python.org/3/library/sys.html#sys.executable), they don't > specify if it follows symlinks. From my limited testing, it does not. Is > this behavior guaranteed? I don't know about guaran

Is sys.executable not supposed to follow symlinks?

2020-07-26 Thread Bolun Thompson
In the sys.executable documentation ( https://docs.python.org/3/library/sys.html#sys.executable), they don't specify if it follows symlinks. From my limited testing, it does not. Is this behavior guaranteed? -- https://mail.python.org/mailman/listinfo/python-list

Re: Symlinks already present

2020-07-26 Thread dn via Python-list
On 27/07/2020 00:56, Termoregolato wrote: There is any way to check if  a directory is already symlinked, without controlling every symlink viewing the link? That is a bit time consuming, due I've two or three directory that can have a new symlink, but I've to check on a list of 20-3 symlin

RE: Dowloading package dependencies from locked down machine

2020-07-26 Thread Mike Dewhirst
I think your best bet is to make a formal business case to your IT people and explain what's in it for them. If they hold all the cards you defeat them at your peril.Mike -- https://mail.python.org/mailman/listinfo/python-list

How to cast to a type WAS: How to limit *length* of PrettyPrinter

2020-07-26 Thread Stavros Macrakis
I was a bit unhappy with my convert function: def convert(typ,obj): newobj = typ.__new__(typ,obj) newobj.__init__(obj) return newobj because it called __xxx__ functions, which are supposed to be internal. It was also a surprise that __new__ ignores t

Support both asyncio and synchronous callers

2020-07-26 Thread Damian Johnson
Hi. I'm the author of Stem, Tor's python library [1]. Recently we migrated to asyncio, but desire to still be usable by synchronous callers. We wrote a mixin [2][3] that transparently makes any class usable by both asyncio and synchronous callers... ===

Re: Symlinks already present

2020-07-26 Thread Termoregolato
Il 26/07/20 15:19, Barry ha scritto: No. None. Sob :-) But thanks for confirm. Don’t you have control of the code that is adding the symlinks? No, so I must traverse the directories where symlinks are, to deduplicate them. There are some modes to minimize the work, but that way could be

Re: Symlinks already present

2020-07-26 Thread Barry
> On 26 Jul 2020, at 14:03, Termoregolato wrote: > > There is any way to check if a directory is already symlinked, No. None. > without controlling every symlink viewing the link? That is a bit time > consuming, due I've two or three directory that can have a new symlink, but > I've to ch

Symlinks already present

2020-07-26 Thread Termoregolato
There is any way to check if a directory is already symlinked, without controlling every symlink viewing the link? That is a bit time consuming, due I've two or three directory that can have a new symlink, but I've to check on a list of 20-3 symlinks to delete it and avoid duplicates... -

Dowloading package dependencies from locked down machine

2020-07-26 Thread Andrew McLean
At work my only Internet access is via a locked-down PC. The IT department are not willing to install Python on it [1]. Ideally I would download packages and their dependencies from PyPi using "pip download" at the command line. Any better solutions than downloading the package in a browser, fi