Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to use the LIKE clause in Python
Post: RE: How to use the LIKE clause in Python

Yes, I realize that it is SQLite that interprets the query but how you code it in Python seems to be different than what I am used to. For example, I initially coded a search query like this: c.exec...
Columbo General Coding Help 9 1,628 Oct-09-2022, 03:18 AM
    Thread: How to use the LIKE clause in Python
Post: How to use the LIKE clause in Python

In my app I have a database of dinosaurs. The user types in the name of the dinosaur that they are looking for and it displays information about that particular dinosaur. The problem is that the use...
Columbo General Coding Help 9 1,628 Oct-08-2022, 04:15 PM
    Thread: Image in Frame in Tabbed Widget
Post: RE: Image in Frame in Tabbed Widget

@deanhystad When I post code I clicked on the menu button that says "Insert code". I assumed that was what was required. I know other forums use the but given there was a button I thought that w...
Columbo GUI 4 2,150 Sep-28-2022, 12:05 AM
    Thread: Image in Frame in Tabbed Widget
Post: Image in Frame in Tabbed Widget

I have created a tabbed widget with 2 tabs and I put a frame in each tab. I want to place 2 images, one in each frame, but the image is not being displayed. I can get text into each frame but not an...
Columbo GUI 4 2,150 Sep-27-2022, 08:59 PM
    Thread: Need help with Return statement
Post: RE: Need help with Return statement

Thanks deanhystad for your time and patience. Cheers!
Columbo General Coding Help 13 2,283 Sep-17-2022, 04:03 PM
    Thread: Need help with Return statement
Post: RE: Need help with Return statement

Thanks deanhystad. I copied and pasted your code and ran it to see how it worked and I get an error that says: Error:TypeError: can only concatenate tuple (not "List") to tuple
Columbo General Coding Help 13 2,283 Sep-16-2022, 04:12 AM
    Thread: Need help with Return statement
Post: RE: Need help with Return statement

I tried your suggestion but I am getting an SQLite3 operational error. Here is the code I tried. import sqlite3 # Connect to the database conn = sqlite3.connect('dinobase.db') c = conn.cursor() de...
Columbo General Coding Help 13 2,283 Sep-16-2022, 01:26 AM
    Thread: Need help with Return statement
Post: RE: Need help with Return statement

Thanks deanhystad. recNo holds the value of the first column of the database which is the record number of the record found using a search. The code that I used has print statements because I was jus...
Columbo General Coding Help 13 2,283 Sep-15-2022, 08:03 PM
    Thread: Need help with Return statement
Post: RE: Need help with Return statement

Thanks Yoriz. That works great! Thanks again. Cheers.
Columbo General Coding Help 13 2,283 Sep-15-2022, 07:40 PM
    Thread: Need help with Return statement
Post: RE: Need help with Return statement

I must still be doing it wrong because recNo is still displaying as 0. Here is the code I tried. def getRecord(srchName, recNo): # Execute the query c.execute('SELECT * FROM dino WHERE name = :sr...
Columbo General Coding Help 13 2,283 Sep-15-2022, 05:05 PM
    Thread: Need help with Return statement
Post: Need help with Return statement

I’m trying to learn Python so I am trying to recreate an app that I did previously with Filemaker as well as with Purebasic. The app uses SQLite3 to get data from a database. The first column in the...
Columbo General Coding Help 13 2,283 Sep-15-2022, 04:19 PM
    Thread: Global variable does not seem to be global.
Post: RE: Global variable does not seem to be global.

I didn't quite understand your example in that I saw that you incremented recNo and then returned it. At first look I was under the impression that it was returned right after it was incremented and ...
Columbo General Coding Help 6 3,694 Jul-15-2019, 11:00 PM
    Thread: Global variable does not seem to be global.
Post: RE: Global variable does not seem to be global.

Thank you very much. Since my last post I was playing with it and I now have it working within the function as I needed it for my Next Record button. What I did was to get the current record number t...
Columbo General Coding Help 6 3,694 Jul-15-2019, 09:34 PM
    Thread: Global variable does not seem to be global.
Post: RE: Global variable does not seem to be global.

Thanks. I need to increment the value of recNo and use it in that function to get the record. That is why I tried incrementing recNo within that function. I tried passing recNo as a parameter and the...
Columbo General Coding Help 6 3,694 Jul-15-2019, 07:41 PM
    Thread: Global variable does not seem to be global.
Post: Global variable does not seem to be global.

I am trying to use a global variable which is then incremented in a function but I am getting this error: File "E:\Python 3\Prehistoric Life\prehistoricLife.py", line 169, in fetchRecord recNo += 1 U...
Columbo General Coding Help 6 3,694 Jul-15-2019, 05:04 PM
    Thread: Database search
Post: RE: Database search

Thank you for your response. Being new to Python, and looking at the code in their example, it is still not clear to me how it works when searching a database based upon the user's input which may not...
Columbo General Coding Help 2 1,966 Jul-15-2019, 03:54 PM
    Thread: Database search
Post: Database search

I would like to have a search function in my app where the user types in a name and the database is searched for the record that matches that name however, the user may not know the correct spelling o...
Columbo General Coding Help 2 1,966 Jul-15-2019, 02:07 AM
    Thread: Adding space between Notebook tabs
Post: RE: Adding space between Notebook tabs

Here is my code for the Notebook and tabs. tab_control = ttk.Notebook(root) tab1 = ttk.Frame(tab_control) tab2 = ttk.Frame(tab_control) tab_control.add(tab1, text='Dinosaur Picture') tab_control.add(...
Columbo GUI 4 4,532 Jul-10-2019, 10:46 PM
    Thread: Adding space between Notebook tabs
Post: RE: Adding space between Notebook tabs

When I add tabs to Notebook they are laid out end to end with no separation between the tabs. What I want to do is have a small space between each tab so that you can clearly see each individual tab....
Columbo GUI 4 4,532 Jul-09-2019, 04:35 PM
    Thread: Adding space between Notebook tabs
Post: Adding space between Notebook tabs

Is there any way to add space between the tabs that are added to Tkinter Notebook? Thanks
Columbo GUI 4 4,532 Jul-09-2019, 05:30 AM

User Panel Messages

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