How I read anything from clipboard not only text? - python-3.x

I hope to make a program to manage my clipboard. but I know some ways to read text from clipboard but I want to get images, audio files and all file types from clipboard. I am using python 3.7 on windows 10

Related

Which text editor can be able to properly display the storage files created by the CodenameOne Netbeans plugin in linux?

Which Linux text editor can be used to view the hidden files created by the CodenameOne simulator? I have tried the default Gedit and Notepadqq but the text appears gibberish while on Windows it is legible even with the default note.exe app in a human-readable way. I am running Netbeans 10 on Ubuntu 18.10.
This highly depends on the file you are editing but if you are editing the preferences file then you would break it. It's a binary file that shouldn't be edited with text editing software. Some characters that are visible on the Linux editors might be hidden on notepad. But they would still be there.

Copy text to clipboard, Linux, make it permanent

I use Lazarus 1.7. Ubuntu 14. I copy text to clipboard,
Clipboard.AsText:='some txt';
When my app exits, clipboard cleared by OS: how to copy text permanent? So after exit of app, the clipboard still has this text?
You can't, since X has no "clipboard" per se. A process must remain open to respond to the SelectionRequest event that actually requests the contents of the clipboard.

How can I decode this text file?

I started playing Call of Duty 4 on my computer(Mac).
The game keeps your multiplayer data/stats in a text file named "mpdata". I have complete access to do and can change the data.
The only issue is that it's encoded in MacRoman. I can change the type of encoding in a program called Hex Fiend. Basically, what I'm confused on is how I can decode it.
Help?
go to applications. go to utilities. click on terminal. from terminal enter:
python
copy and paste your text you just had up into your_mac_roman_text, and then paste it into terminal.
'your_mac_roman_text'.decode('mac-roman')

Viewing source code for a .rb file on a Mac

I'm learning how to computer program. I have a Mac running Ruby 1.8.7. When I double click the .rb file to open it and view the source code in Text Wrangler, it looks like gibberish. How do I view the source code?
Ruby is not a compiled language, so your .rb file should be source code which can be viewed from the command line or with any plain text editor. You can open it with the system's TextEdit, with TextWrangler, Sublime Text, Textmate, emacs, vi, pico, nano,... If you open a Terminal.app (from /Applications/Utilities) and change to the directory containing your source, let's call it foo.rb, you should be able to view it by typing more foo.rb and pressing the space bar to scroll through it a screen at a time.
If these attempts fail, there are a few possibilities that immediately leap to mind. 1) You got the source from somebody else, and it a) got mangled in transmission; or b) was created on Windows and has DOS line-endings, in which case do a web search for dos2unix. Or 2) you created it with a word processor, such as MS Word or TextEdit in formatted mode, and the program text is interspersed with all of the formatting and layout binary codes. If you composed it in TextEdit, select Format -> Make Plain Text from the menu and then save it. Anything else, copy and paste to a plain text editor and save it.

Vim in OSX: How to paste text from open window into a open file in vim?

In linux, I used Shift + Insert to paste anything in the system clipboard into the terminal. In Mac, there isn't an insert key - so, I'm left wondering how to do that ?
The standard Mac paste shortcut, Command-v, should paste the contents of the clipboard into vim, running in a terminal window, assuming vim is in insert mode. I just pasted the previous sentence into vim on my Mac, by that method. If you are new to Macs, and you have an Apple keyboard, the Command keys have an apple and a strange symbol resembling an octothorpe, with a loop at each corner. On my 3rd party keyboard, they are labeled with a diamond-shaped symbol.
This works with Macvim. The copied text is placed in the + register then in the macvim buffer hit "+p and the text will be pasted into the buffer. I find this quicker than using command-v,comand-c.
If you're using console vim then it is placed in the . register. Hit ".p to paste the text from the clipboard.
In Ubuntu, Shift+Insert is used to paste highlighted text, not to paste text copied in the buffer that was copied using Ctrl+C.
In macOS this functionality of pasting highlighted text can be done with ⇧Shift+⌘Command+V.
I hope this helps any users that are coming from Ubuntu.

Resources