In compat, one could run a script starting in a wiki for which he/she didn't have an account specified in user-config.py. The starting wiki just wouldn't be updated, but others would.
In core, it seems you immediately get an error if you didn't specify the user name for it:
> pwb.py interwiki -lang:ru -recentchanges
Traceback (most recent call last):
File "pwb.py", line 239, in <module>
if not main():
File "pwb.py", line 233, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "pwb.py", line 111, in run_python_file
main_mod.__dict__)
File ".\scripts\interwiki.py", line 2641, in <module>
main()
File ".\scripts\interwiki.py", line 2591, in main
site.login()
File "D:\Work\pywikipedia-core\pywikibot\site.py", line 1826, in login
user=self._username[sysop])
File "D:\Work\pywikipedia-core\pywikibot\tools\__init__.py", line 1248, in wrapper
return obj(*__args, **__kw)
File "D:\Work\pywikipedia-core\pywikibot\login.py", line 104, in __init__
'wiki_code': self.site.code})
**pywikibot.exceptions.NoUsername: ERROR: Username for wiktionary:ru is undefined.**
If you have an account for that site, please add a line to user-config.py:
usernames['wiktionary']['ru'] = 'myUsername'
<class 'pywikibot.exceptions.NoUsername'>