Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to print data to the printer
Post: RE: How to print data to the printer

I ordered a printer cable and when it gets here, I will try again with a usb printer cable instead of wireless.
scratchmyhead GUI 11 2,045 May-29-2020, 06:07 PM
    Thread: How to print data to the printer
Post: RE: How to print data to the printer

Yes the printer goes through a router.
scratchmyhead GUI 11 2,045 May-28-2020, 12:07 PM
    Thread: How to print data to the printer
Post: RE: How to print data to the printer

I'm getting closer but still not working. I went to that link and installed all components. But when I try running the following code, I get this error: ConnectionRefusedError: [WinError 10061] No co...
scratchmyhead GUI 11 2,045 May-28-2020, 01:28 AM
    Thread: How to print data to the printer
Post: RE: How to print data to the printer

I get the following error code: NameError: name 'tempfile' is not defined printText =Label(root, text="hello") print(printText) filename = tempfile.mktemp(".txt") open(filename, "w").write(printTex...
scratchmyhead GUI 11 2,045 May-27-2020, 04:58 PM
    Thread: How to print data to the printer
Post: RE: How to print data to the printer

That didn't work.
scratchmyhead GUI 11 2,045 May-26-2020, 12:56 PM
    Thread: How to print data to the printer
Post: RE: How to print data to the printer

OK. I'll try thanks.
scratchmyhead GUI 11 2,045 May-23-2020, 09:50 PM
    Thread: How to print data to the printer
Post: How to print data to the printer

Does anyone know how to make your program print data from my program to the printer?
scratchmyhead GUI 11 2,045 May-23-2020, 06:56 PM
    Thread: How to get first two characters in a string
Post: RE: How to get first two characters in a string

Ok, that worked. Thank you very much!
scratchmyhead General Coding Help 2 540 May-19-2020, 11:00 AM
    Thread: How to get first two characters in a string
Post: How to get first two characters in a string

I have a tuple that I converted the first part of the tuple into a string and I want to get the first two characters of that variable. For example def searchfinmonth(): conn = sqlite3.connect('fi...
scratchmyhead General Coding Help 2 540 May-19-2020, 10:33 AM
    Thread: How to place scroll bar correctly
Post: RE: How to place scroll bar correctly

I figured it out. When packing the Listbox, I added the following parameters: roomlb = Listbox(lbframe, height=25, width=65, font="courier") roomlb.pack(side="left", fill="y")
scratchmyhead GUI 1 843 May-18-2020, 04:17 PM
    Thread: How to place scroll bar correctly
Post: How to place scroll bar correctly

I have a listbox that is inside of a frame and when I put a scrollbar with the listbox, I want it to be to the right of the listbox but instead is located at the bottom just to the right. How can I pl...
scratchmyhead GUI 1 843 May-18-2020, 03:07 PM
    Thread: Problem with sqlite bindings
Post: RE: Problem with sqlite bindings

I figured it out. The code should have a ',' after the t like the follwoing: c.execute("UPDATE totals SET rent = ? ", (t,))
scratchmyhead General Coding Help 4 690 May-18-2020, 03:55 AM
    Thread: Problem with sqlite bindings
Post: RE: Problem with sqlite bindings

No. It shouldn't have ""
scratchmyhead General Coding Help 4 690 May-18-2020, 03:29 AM
    Thread: Problem with sqlite bindings
Post: Problem with sqlite bindings

I'm trying to update a sqlite database and I get the following error: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 4 supplied. I don't...
scratchmyhead General Coding Help 4 690 May-18-2020, 03:17 AM
    Thread: How to close all windows when exit program
Post: RE: How to close all windows when exit program

But I have a self.root window that is still open when I close the main program. class App(): def __init__(self): self.root = tk.Tk() self.label = Label(text="") self.label...
scratchmyhead GUI 3 1,602 May-17-2020, 07:48 AM
    Thread: How to close all windows when exit program
Post: How to close all windows when exit program

I was just wondering if there is a way to close all open windows upon program exit?
scratchmyhead GUI 3 1,602 May-17-2020, 07:19 AM
    Thread: CookBook Project on github
Post: RE: CookBook Project on github

Interesting. I will try that.
scratchmyhead Code sharing 4 1,180 May-16-2020, 07:20 AM
    Thread: How to implement the if then else statement properly.
Post: RE: How to implement the if then else statement pr...

Hmmmm. Let me look at it again.... That's another problem. How to enter data into an empty record of the data base.
scratchmyhead GUI 5 643 May-16-2020, 06:59 AM
    Thread: How to implement the if then else statement properly.
Post: RE: How to implement the if then else statement pr...

Thanks but that didn't work.
scratchmyhead GUI 5 643 May-16-2020, 06:30 AM
    Thread: How to implement the if then else statement properly.
Post: How to implement the if then else statement proper...

I have a small program that enters room numbers of a motel. Basically what I want to achieve is to not re-enter the room twice into the database. It's not working. I have the if then else statements b...
scratchmyhead GUI 5 643 May-16-2020, 05:46 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020