Pardon me if this is slightly off-topic but I need help.
I am trying to get my python script to to work in a linux terminal by
grabbing the output such that the output results 'overwrites' the copy
command (ctrl+c).
Currently while I am able to get this to work by opening a maya session but
as soon as I tried running `python run_script.py` in the terminal console,
I got the following error:
QApplication: Must construct a QApplication before accessing a QClipboard
Traceback (most recent call last):
File "get_pending_status_files_modi.py", line 10, in <module>
cb.clear(mode=cb.Clipboard )
AttributeError: 'NoneType' object has no attribute 'clear'
This is the code of my script:
def main():
data_list = ['this-is-a-test', 'for-learning', 'purposes-only']
connect_result = '|'.join(data_list)
output = '{0}{1}{2}'.format('(', connect_result, ')')
print output
cb.setText(output, mode=cb.Clipboard)
main()
Though this is a small example, but I am using this for large amount of
values in the data_list, and hence I want to know if there are any other
ways that I can make use of?
By the way, I am unable to install any other libraries as I am using my
office's computer while using linux environment, some of the methods
online, using of `xsel`, `xclip` or `pyperclip` does not work for me,
unfortunately..
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/ae3eacd7-3c8e-43b4-8d05-c49c3da31e22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.