Hey, sorry for delay.


We need to go in one of two directions here, I think. You want `path` to behave
like for `read` method. This means we can accept either one or two positional
arguments to make the users code look like this::


    # without path
    envdir.write({
        'DJANGO_SETTINGS_MODULE': 'myproject.settings',
    })

    # or:

    # with path
    envdir.write('/path/to/envdir', {
        'DJANGO_SETTINGS_MODULE': 'myproject.settings',
    })



I think we have two options here::


    # 1) this allows us to use it exactly like above
    def write(self, *args):
        args_len = len(args_len)

        if args_len == 0 or args_len > 2:
            raise ValueError("%s.write accepts either one or two positional arguments" % self.__class__)

        if args_len == 1:
            # it means path is not provided
            path = self._default_envdir_path(sys._getframe())
            envvars = args[0]
        else:
            # means both path and variables as dict are provided
            path = args[0]
            envvars = args[1]

        # ... existing Runner.write code goes here


    # 2)
    def write(self, path=None, envvars=None):
        if not path:
            path = self._default_envdir_path(sys._getframe())

        # ... existing Runner.write code goes here


The `2)` options however forces the following usages::


    # without path
    envdir.write(envvars={  # named parameter is required
        'DJANGO_SETTINGS_MODULE': 'myproject.settings',
    })

    # or:

    # with path
    envdir.write('/path/to/envdir', {
        'DJANGO_SETTINGS_MODULE': 'myproject.settings',
    })


Which direction do we want to go?


--------------------------------
Above examples assumes `_default_envdir_path` method looks like this::

    def _default_envdir_path(self, frame):
        callerdir = os.path.dirname(frame.f_back.f_code.co_filename)
        return os.path.join(callerdir, 'envdir')