Giter Site home page Giter Site logo

tkterminal's People

Contributors

saadmairaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tkterminal's Issues

chcp command not working

I'v got widows with ru lang and terminal cant encode it with utf-8 so I decided to change lang of terminal with chcp command but its not working.

Скриншот 26-03-2022 150129

FileNotFoundError: [Errno 2] No such file or directory: 'echo "hi"''

This project is awesome! As far as I am aware there is only one error:
When I try to run echo "hi" or any other [two word] command while not in shell mode, it returns

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/therealpenguin/.local/lib/python3.9/site-packages/tkterminal/utils.py", line 43, in wrapper
    kw['return'] = kw['function'](*args, **kwargs)
  File "/home/therealpenguin/.local/lib/python3.9/site-packages/tkterminal/ternimal.py", line 157, in _run_on_return
    with Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=stdin,
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'echo "hi"'

Tkterminal interprets output without newline as part of next command

Steps to Reproduce:

  1. Run printf Hello in a tkterminal instance (I'm using shell=True)
  2. The output is: Hellotkterminal$
  3. Now press Return

Expected Behavior:
The output should be empty because no command was typed.

Actual Behavior:
/bin/sh: Hellotkterminal$: command not found

Possible Solutions:
1- Distinguish the output of a command from subsequent commands

2- Avoid the problem altogether by adding a newline to the end of each output that doesn't contain it already, and preferably also a terminator character to indicate the lack of an original newline. Sample output from macOS Terminal.app:

Screenshot 1402-05-08 at 11 08 22 PM

ModuleNotFoundError

When I use in script, it says "ModuleNotFoundError: No module named 'tkterminal'"

get cwd of the terminal?

is there any feature to get the cwd of the terminal?
so that you can change the prompt text according to the cwd and make it better..

When i'm writing the letter "K" it clear the line.

I'm gonna show you an example of what I mean.

First of all, i'm writing anything in the terminal:

Capture

When i'm writing the letter K it clear my line:
image

Is that normal ? or is my configuration wrong ?

I'm sending you my configuration :
root = tk.Tk() terminal = Terminal( pady=5, padx=5, background=DARK_BACKGROUND_COLOR, borderwidth=4, foreground=LIGHT_GREEN) terminal.basename = "MyPrivacy$" terminal.linebar = True terminal.tag_config("basename", foreground=PRIMARY_COLOR) terminal.pack(expand=True, fill='both') b1 = tk.Button( root, text="Raccourci 1", fg="Blue", command=lambda: terminal.run_command('C:\\', 'y')) b1.pack() root.mainloop()

Python3 command asks for xcode tools

Sometimes when a user uses the command "Python3" it asks for them to download xcode toolchain or it might crash because it wants to get input

make the code wait

Is there any method to make my code wait until the terminal process is completed like the wait() function in the subprocess module?

Or is there anyway just to make the terminal widget get destroyed automatically after the terminal process is done?

Can't give input when user runs python script

I was hoping to use this for a personal IDE made in tkinter but when I try to run a python script that has an input command it gives the error:
"Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/init.py", line 1892, in call
return self.func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tkterminal/ternimal.py", line 203, in _on_keypress
or ((insert_idx.column <= self._limit_backspace or False)
TypeError: '<=' not supported between instances of 'int' and 'NoneType'"

Not only this, but when I use the command "python" it also gives that error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.