I am trying to use the function cmpfile of the cmp module which returns true or false if filepaths passed are same or not...
But the interpreter flashes an error "undefined global name false"...
Also it doesnt accept true or false in other functions also..
what might be the problem???
please help...

also can somebody tell me a way to find askii value of a character...
the ascii function in curses module is not working...
In the curses module there is a call to _curses module which the interpreter cant find and neither can i....

I am using recently released python25....
Can someone help...
Please....

Hello,
The keywords are True and False

I dont remember why, but I use comparisons on begginnings of strings got with os.path.normpath, something like in:

def select_project(self):
        LOG.debug(self.__class__.__name__)
        ldpath = self.iniframe.entries['localdir'].get()
        path = tkFileDialog.askdirectory(initialdir=ldpath, title='Choisir le dossier du projet...')
        if os.path.normpath(path[:len(ldpath)]) == os.path.normpath(ldpath):
            self.iniframe.set_entry_text('projdir', '/' + path[len(ldpath):].strip('/'))
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.