Do as Thirdspace suggests and take the keys (save them in a file somewhere or something) and then import them into
electrum while still offline and then, once deleting the file (text file) with the keys in them and setting a password on your electrum wallet, reconnect your internet...
There is no advantage in keeping your PC offline while importing the private keys into electrum, even with a plain text file of your private keys.
Either your PC is infected (which will compromise your private keys once they are accessabe + transfer them once internet is available) or it is clean.
Keeping your every-day-pc offline for a few minutes doesn't change anything. To properly import them offline, you'll need a linux live OS which will wipe anything from memory afterwards.
But since OP is using a desktop wallet anyway, this doesn't matter since he PC has to be clean anyway.
I am also getting the error:
"File "", line 1 Syntax error invalid syntax
Can someone help me with regards to installing pywallet.py??
That's not an installation issue.
You are trying to execute it the false way. Can you post the complete command you are entering ?
It seems like you are running the whole file within the python interpreter.
You have to run it from outside using:
python yourfile.py -argument1 -argument2
in the command line.