On Fri, Sep 19, 2008 at 4:49 AM, Paul McGuire <[EMAIL PROTECTED]> wrote:
> because validate, being a transitive verb, tells us we are going to do
> something to config, but since 'validate' is not a name that clearly
> asserts
> a truth or falsity, we aren't exactly sure what validate is going to
>>> the below doesn't work in python
>>> >>> if !(os.access(target_dir, os.F_OK)):
>>> SyntaxError: invalid syntax
What is that '!'? doing there? A left-handed factorial?
I'm just kidding, I know that '!' is a common 'not' operator in many other
programming languages. But this is Python, ma
On Thu, Sep 18, 2008 at 07:19:29PM -0400, [EMAIL PROTECTED] wrote:
> if not os.access(target_dir, os.F_OK):
> if os.access(target_dir, os.F_OK)==False:
> if os.access(target_dir, os.F_OK)!=True:
IMHO it's generally bad form to use numeric == or != operators to compare
values against True, False, a
[EMAIL PROTECTED] wrote on 09/18/2008 06:12:30 PM:
> i want to check if a dir does not exist. how do i change this statement
> to evaluate is NOT existing? ==False or ! operator. Also, is sys.exit
> appropriate to use to quit out of the program?
>
> if(os.access(target_dir, os.F_OK)):
>print
"jeremiah" <[EMAIL PROTECTED]> wrote
i want to check if a dir does not exist. how do i change this
statement
to evaluate is NOT existing? ==False or ! operator. Also, is
sys.exit
appropriate to use to quit out of the program?
if(os.access(target_dir, os.F_OK)):
print "File does not exist!"
s
i want to check if a dir does not exist. how do i change this statement
to evaluate is NOT existing? ==False or ! operator. Also, is sys.exit
appropriate to use to quit out of the program?
if(os.access(target_dir, os.F_OK)):
print "File does not exist!"
sys.exit
Disclai