How can move terminal cursor in Python? [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
Improve this question
I'm making Tetris game with Python in Linux, but I can't move terminal cursor to what I want to position
How can move cursor position?? in Python

This seems like a duplicate, however referring to this answer, it appears that you should be using the colorama module to make this task easier and after doing so you should be able to move your cursor around by simply using
def move (y, x):
print("\033[%d;%dH" % (y, x))

Related

how can i create a delete button just as same as notepad? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I know it might be a essay question but I am new in python adn really need your help.
I wanna make delete in Edit menue using Qt textEdit. but working with these type of Data chaing it into Qt text cursor or Qtstring it's a bit difficult. in fact, I wanna select aome text and delet them in my app.
def delet(self):
print('Run delet')
cursor = self.connector.ui.textEdit.textCursor()
textSelected = cursor.selectedText()
str_text = str(textSelected)
I know its not working and didnt gave me a hand.

how can I observe a change in a python var [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Hi I'm trying to catch the change in the paperclip of my computer with the library pyperclip something same as
url=pyperclip.paste()
I want to create a thread which can append all the urls into a list my script, but I don't know how to could I do it
Thanks for your time and help c:
Did you check the documentation or the source code at all? That's all I did. pyperclip supports waitForPaste and waitForNewPaste methods that can do this.

Printing out spreadsheet data [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I want to print some data from spreadsheet. I decided to use python. How can I call out a "Print preview"? For example like this:
I tried something like this:
os.startfile('test.txt', 'print')
but it doesn't make a print preview.
I am using Python 3.9.
Use this (tested on Windows 10):
import subprocess
subprocess.call(['notepad', '/p', "test.txt"])
On Linux use:
import os
os.system("lp text.txt")
As to previewing the file on screen, just use print function. If you want graphics use tkinter or any other graphics library (PyQt, etc)

Drawing Text On Applications [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I really want to draw onto an application window.
For example, I want it to display 'Hello World' on the discord window at the top left. Is this possible?
In order to do that, you will need to download themes from internet for discord, maybe with BetterDiscord or something, then in the css file you will need some simple css knowledge about the coordinates/placement, and the text you want to display.

wxPython. How to open a folder with wxWidget (python) hyperlink? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to create a hyperlink in my wx widget which opens linked folder on clicking. Please help me how to build that.
Thanks.
os.system("start C:")
will launch a file window (on windows at least) ... it has nothing to do with wx
unless you are talking about opening a FilePickerDialog?
I have also been informed that
os.system("explorer C:")
would also work

Categories