No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
legal , extrovertido , levemente maluco e não querendo me gabar mas musicalmente talentoso
from socket import * from time import time, ctime import thread import Queue import os class ThreadSafeConsole(Text): def __init__(self, master, **options): Text.__init__(self, master, **options) self.queue = Queue.Queue() self.update_me() def write(self, line): self.queue.put(line) def clear(self): self.queue.put(None) def update_me(self): try: while 1: line = self.queue.get_nowait() if line is None: self.delete(1.0, END) else: … |
|
Re:
Hello, I am fairly new to Python. I have only skimmed the surface in an introductory class I just finished in college. As my first program in Python, I am attempting to make a text editor. I am wondering if there is a universal command to bring up a Save … |
|
[CODE]from time import sleep import win32com.client as win32 RANGE = range(3, 8) def word(): word = win32.gencache.EnsureDispatch('Word.Application') doc = word.Documents.Add() word.Visible = True sleep(1) rng = doc.Range(0,0) rng.InsertAfter('Hacking Word with Python\r\n\r\n') sleep(1) for i in RANGE: rng.InsertAfter('Line %d\r\n' % i) sleep(1) rng.InsertAfter("\r\nPython rules!\r\n") doc.Close(False) word.Application.Quit() if __name__ == '__main__': word() … |
|
[CODE]# a very simple Tkinter editor to show file read/write dialog from tkinter import * from tkinter.filedialog import * class App(object): def __init__(self, master): frame = Frame(master) frame.pack() self.text = Text() self.text.pack() menu = Menu(master) root.config(menu=menu) # file menu filemenu = Menu(menu, tearoff=0) menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New") filemenu.add_command(label="Open", command=self.file_open) filemenu.add_command(label="Save", command=self.file_save) … |
|
i need a example or sample code about text.dump (???) input values -> automatic text ---> automatic tags --> save (.doc , .txt) but when i save the text, the file dont get the tags.... like this example: input in text widget: I [B]love[/B] you [U]girl[/U] the output in (.doc … |
|
[code] # -*- coding: utf-8 -*- #diretorios de imagens alldir = ("C:\\Users\juridico.anoreg\Desktop\OFICIOS-ANOREG\imagem\\") # from tkinter import * from tkinter.filedialog import * import sys import tkinter import time import math import datetime import os import subprocess import tkinter.messagebox import calendar as cd from tkinter import * import webbrowser import tkinter.font class … |