# eric7.VirtualEnv.VirtualenvUpgradeExecDialog

Module implementing the virtualenv upgrade execution dialog.

### Global Attributes

None

### Classes

VirtualenvUpgradeExecDialog | Class implementing the virtualenv upgrade execution dialog.

### Functions

None

## VirtualenvUpgradeExecDialog

Class implementing the virtualenv upgrade execution dialog.

### Derived from

QDialog, Ui_VirtualenvExecDialog

### Class Attributes

None

### Class Methods

None

### Methods

VirtualenvUpgradeExecDialog | Constructor
__changeVirtualEnvironmentInterpreter | Private method to change the interpreter of the upgraded virtual environment.
__finish | Private slot called when the process finished.
__logError | Private method to log an error.
__logOutput | Private method to log some output.
__nextAttempt | Private method to start another attempt.
__readStderr | Private slot to handle the readyReadStandardError signal.
__readStdout | Private slot to handle the readyReadStandardOutput signal.
__writeLogFile | Private method to write a log file to the virtualenv directory.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
start | Public slot to start the virtualenv command.

### Static Methods

None

#### VirtualenvUpgradeExecDialog (Constructor)

VirtualenvUpgradeExecDialog(venvName, interpreter, createLog, venvManager, parent=None)

Constructor

venvName (str)
  name of the virtual environment to be upgraded
interpreter (str)
  interpreter to be used for the upgrade
createLog (bool)
  flag indicating to create a log file for the upgrade
venvManager (VirtualenvManager)
  reference to the virtual environment manager
parent (QWidget)
  reference to the parent widget

#### VirtualenvUpgradeExecDialog.__changeVirtualEnvironmentInterpreter

__changeVirtualEnvironmentInterpreter()

Private method to change the interpreter of the upgraded virtual environment.

#### VirtualenvUpgradeExecDialog.__finish

__finish(exitCode, _exitStatus, giveUp=False)

Private slot called when the process finished.

It is called when the process finished or the user pressed the button.

exitCode (int)
  exit code of the process
_exitStatus (QProcess.ExitStatus)
  exit status of the process (unused)
giveUp (bool)
  flag indicating to not start another attempt

#### VirtualenvUpgradeExecDialog.__logError

__logError(s)

Private method to log an error.

s (str)
  error string to log

#### VirtualenvUpgradeExecDialog.__logOutput

__logOutput(s)

Private method to log some output.

s (str)
  output string to log

#### VirtualenvUpgradeExecDialog.__nextAttempt

__nextAttempt()

Private method to start another attempt.

#### VirtualenvUpgradeExecDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

It reads the error output of the process and inserts it into the error pane.

#### VirtualenvUpgradeExecDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal.

It reads the output of the process, formats it and inserts it into the contents pane.

#### VirtualenvUpgradeExecDialog.__writeLogFile

__writeLogFile()

Private method to write a log file to the virtualenv directory.

#### VirtualenvUpgradeExecDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button (QAbstractButton)
  button that was clicked

#### VirtualenvUpgradeExecDialog.start

start(arguments)

Public slot to start the virtualenv command.

arguments (list of str)
  commandline arguments for virtualenv/pyvenv program

Up