Beispiel #1
0
def popd():
    """
    >> popd

    Change back to the last directory on the directory stack.  The global
    variable __dir__ is set to the cwd.
    """
    from twill import commands

    where = _dirstack.pop()
    os.chdir(where)
    print >> commands.OUT, 'popped back to directory "%s"' % (where, )

    commands.setglobal('__dir__', where)
Beispiel #2
0
def popd():
    """
    >> popd

    Change back to the last directory on the directory stack.  The global
    variable __dir__ is set to the cwd.
    """
    from twill import commands
    
    where = _dirstack.pop()
    os.chdir(where)
    print>>commands.OUT, 'popped back to directory "%s"' % (where,)

    commands.setglobal('__dir__', where)
Beispiel #3
0
def chdir(where):
    """
    >> chdir <where>

    Change to the new location, after saving the current directory onto
    the directory stack.  The global variable __dir__ is set to the cwd.
    """
    from twill import commands

    cwd = os.getcwd()
    _dirstack.append(cwd)
    print cwd

    os.chdir(where)
    print >> commands.OUT, 'changed directory to "%s"' % (where, )

    commands.setglobal('__dir__', where)
Beispiel #4
0
def chdir(where):
    """
    >> chdir <where>

    Change to the new location, after saving the current directory onto
    the directory stack.  The global variable __dir__ is set to the cwd.
    """
    from twill import commands
    
    cwd = os.getcwd()
    _dirstack.append(cwd)
    print cwd

    os.chdir(where)
    print>>commands.OUT, 'changed directory to "%s"' % (where,)

    commands.setglobal('__dir__', where)