This has never been found in the Linux block mobile editor.
Because the code you may copy on the internet is like this, you need to move the entire code four characters forward and write such a program to implement this function.
>>> from sqlalchemy import Column, Integer, String>>> class User(Base):... __tablename__ = 'users'...... id = Column(Integer, primary_key=True)... name = Column(String)... fullname = Column(String)... password = Column(String)
Step
1. Copy Clipboard data to file
2. read data from File
3. Block move
4. Save File
5. copy file data to clipboard
Description
Xclip is used.
Sudo apt-Get install xclip in Ubuntu
# Copy Clipboard data to from.txt
Xclip-o> from.txt
# Copy data to clipboard
Cmd = 'cat to.txt | xclip-selection clipboard'
OS. popen (CMD)
Block_move.py
#!/usr/bin/env pythonimport sysimport osdel_num = 3if len(sys.argv)>1: del_num = int(sys.argv[1])#copy clipboard data to from.txtcmd = 'xclip -o > from.txt'os.popen(cmd).read()to_data = []print "from.txt:"with open('from.txt') as fp: for line in fp: print line, to_line = line[del_num:] to_data.append(to_line)to_file = open('to.txt', 'w')data = ''.join(to_data)to_file.write(data)to_file.close()#copy data to clipboardcmd = 'cat to.txt | xclip -selection clipboard'os.popen(cmd)print ""print "to.txt:"print dataprint "del_num:", del_num print "ok."