[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] Best way of making proposals for Fabric?
From: |
Daniel Pope |
Subject: |
Re: [Fab-user] Best way of making proposals for Fabric? |
Date: |
Thu, 3 Mar 2011 10:07:43 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Mar 02, 2011 at 07:41:58PM +0000, Rory Campbell-Lange wrote:
> 2. put file mode permissions
> I stupidly didn't provide a number. I guess a number starting with 0
> isn't really a number? Is a better error catcher better here?
> In [8]: 0644 & 0700
> Out[8]: 384
Integer literals beginning with 0 are considered octal in Python 2.x. Octal is
desirable because there are three permissions bits per role.
>>> oct(0644 & 0700)
'0600'
There is a better "error catcher" which is the Python 3.x behaviour:
>>> oct(0644 & 0700)
File "<stdin>", line 1
oct(0644 & 0700)
^
SyntaxError: invalid token
>>> oct(0o644 & 0o700)
'0o600'
> I have to run an ssh command to connect to the gateway and setup lots of
> portforwarded connections to my localhost. I then read in a local ssh config
> file designed to connect to 127.0.0.1:9001, 127.0.0.1:9002, etc.
Have you considered a VPN?
Dan