Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: if line edit is empty put in a string
Post: RE: if line edit is empty put in a string

thanks to all of you
birdieman General Coding Help 5 4,938 Mar-16-2017, 01:52 PM
    Thread: if line edit is empty put in a string
Post: RE: if line edit is empty put in a string

sorry, I am using PyQt5 -- but I think I just need to know if (1) is the IF statement the correct way to see if a line edit is empty? and (2) the syntax of putting the word Other into a line edit. Fo...
birdieman General Coding Help 5 4,938 Mar-15-2017, 11:52 PM
    Thread: if line edit is empty put in a string
Post: if line edit is empty put in a string

I am trying to see if a line edit is empty, and if so, put the word Other in it.  What I have so far crashes if len(self.ui.carlabel) == 0: self.ui.carlabel.setText(str('Other'))b...
birdieman General Coding Help 5 4,938 Mar-15-2017, 11:01 PM
    Thread: syntax for endswith a digit
Post: RE: syntax for endswith a digit

thank you
birdieman General Coding Help 2 5,633 Mar-04-2017, 07:21 PM
    Thread: syntax for endswith a digit
Post: syntax for endswith a digit

in a small loop, I am trying to sum all of the lineEdits (in a PyQt5 GUI) whose objectName endswith a number in a particular frame.  So far, I have the following code, but it has an AtributeError. ...
birdieman General Coding Help 2 5,633 Mar-04-2017, 05:49 PM
    Thread: Where locate code to load combobox
Post: Where locate code to load combobox

I am a beginner and would like to know where and how to code the loading of two comboboxes.  The GUI was created in QT designer.  First, I have the code to show the form: import sys from PyQt5.QtWidge...
birdieman GUI 1 3,087 Feb-19-2017, 12:48 AM
    Thread: Best software for creating printed reports?
Post: RE: Best software for creating printed reports?

Thanks to all of you -- will check all of them out
birdieman General Coding Help 5 4,421 Feb-02-2017, 02:39 AM
    Thread: Best software for creating printed reports?
Post: RE: Best software for creating printed reports?

Well, what I meant was is there some import that formats (easier/better/etc) a report to be printed? or, just use the normal print format commands in python?
birdieman General Coding Help 5 4,421 Feb-02-2017, 01:51 AM
    Thread: Best software for creating printed reports?
Post: Best software for creating printed reports?

Is there a common/most used/easiest way to create printed reports -- some import, or within Python itself?  As a beginner, I really do not yet know what type report to use (PDF, etc) -- just whatever ...
birdieman General Coding Help 5 4,421 Feb-01-2017, 10:59 PM
    Thread: Installing PyQt5 Designer
Post: RE: Installing PyQt5 Designer

To make sure I understand: I already have 64 bit PyQt5 (and python 3.6 64 bit) installed. Do I still do everything in your install instructions -- but substitute the 64 bit version line above?? Last...
birdieman GUI 6 53,430 Jan-31-2017, 02:35 AM
    Thread: Installing PyQt5 Designer
Post: RE: Installing PyQt5 Designer

Snippsat -- thanks for responding. I will take a look at your installation, but before I do, does that fact that I have Windows 64 bit (and I think I installed PyQT 64 bit) make it necessary for me t...
birdieman GUI 6 53,430 Jan-31-2017, 12:31 AM
    Thread: Installing PyQt5 Designer
Post: Installing PyQt5 Designer

I am very new (to Python, Designer, etc) and having a problem installing PyQt DESIGNER. I installed Python 3.6  I also installed PyQt5 using Windows command window and pip3.  Everything worked fine (i...
birdieman GUI 6 53,430 Jan-30-2017, 11:21 PM
    Thread: "Statement has no effect"
Post: RE: "Statement has no effect"

I learned how to program 40 years ago (Fortran, cobol, etc -- you probably never heard of them), when the languages were not as powerful as python and others -- so my experience was with using many va...
birdieman General Coding Help 21 17,076 Jan-27-2017, 01:29 AM
    Thread: "Statement has no effect"
Post: RE: "Statement has no effect"

I will look up Named Tuples -- sounds interesting Metulburr -- what did you mean by "if it didn't have control over how the file was structured"? Also, what is OP?
birdieman General Coding Help 21 17,076 Jan-27-2017, 12:56 AM
    Thread: "Statement has no effect"
Post: RE: "Statement has no effect"

Metulburr I have played around with your code and have three questions 1. Why do you create/change a directory called "save" (at lease I think that is what the code does)? It changed the directory ...
birdieman General Coding Help 21 17,076 Jan-26-2017, 12:57 AM
    Thread: "Statement has no effect"
Post: RE: "Statement has no effect"

yes, i can change the format. After reading Metulburr, and if I understand dictionaries correctly, I would have to refer to my variables like xyz["StartYear"] and I do not want to do that -- too long...
birdieman General Coding Help 21 17,076 Jan-25-2017, 08:38 PM
    Thread: "Statement has no effect"
Post: RE: "Statement has no effect"

Thanks to all for responding. Metalburr- I still have a lot to learn regarding your example. When it says "entry1:1" I assume the "entry1" (the key) is my variable name, and I assume the "1" is...
birdieman General Coding Help 21 17,076 Jan-25-2017, 01:35 PM
    Thread: "Statement has no effect"
Post: RE: "Statement has no effect"

Thanks for your response, but I am still too new to python to know what your answer means. I had no other idea how to read and write variables to a file.
birdieman General Coding Help 21 17,076 Jan-25-2017, 02:59 AM
    Thread: "Statement has no effect"
Post: "Statement has no effect"

I am still a beginner, but I want to read a file once, do processing, then write to the file.  the read code is: f = open("test3.txt", "w") with open("test3.txt", "r") as opened_file:    for line in ...
birdieman General Coding Help 21 17,076 Jan-25-2017, 02:36 AM
    Thread: Streamline this format code
Post: RE: Streamline this format code

I fixed it. This is what I used (in the above example): nums2 = tuple('${:,.0f}'.format(num).rjust(12, ' ') for num in nums) print(hdr62.format(*nums2))Is that solution efficient? Another solution, ...
birdieman General Coding Help 11 7,458 Jan-19-2017, 02:28 PM

User Panel Messages

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