请您参考如下方法:
由于阿拉伯文字是从右到左,您可以使用库:https://github.com/mpcabd/python-arabic-reshaper和 https://github.com/MeirKriheli/python-bidi
像这样的东西可以工作:
# !/usr/bin/python3
from tkinter import *
import arabic_reshaper
from tkinter import messagebox
from bidi.algorithm import get_display
text_to_be_reshaped = "ﺏﺎﻃﻭ"
reshaped_text = arabic_reshaper.reshape(text_to_be_reshaped)
bidi_text = get_display(reshaped_text)
top = Tk()
top.geometry("70x30")
B = Button(top, text = bidi_text)
B.place(x=0,y=0)
top.mainloop()
