Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Trying to search excel for a value in row then format row
Post: RE: Trying to search excel for a value in row then...

I found this with a quick search on Stack Overflow. Are you familiar with the Stack Exchanges? They're a great resource too. https://stackoverflow.com/questions/4298...w-openpyxl
burningkrome General Coding Help 5 13,490 Oct-04-2019, 01:53 PM
    Thread: creating a variable in a method and using in another method
Post: RE: creating a variable in a method and using in a...

Well, the first observarion is, these appear to be methods within a class (thus the use of "self" in the "def open(self):" and "def close(self):". The "self" refers to the object of that class, after ...
burningkrome General Coding Help 5 2,989 Oct-04-2019, 08:02 AM
    Thread: Trying to search excel for a value in row then format row
Post: RE: Trying to search excel for a value in row then...

Instead of printing the output, you could just store them in a list object. I.e. valueList = [] for row in ws.iter_rows("L"): for cell in row: if cell.value == 'Integration Live': ...
burningkrome General Coding Help 5 13,490 Oct-04-2019, 07:38 AM
    Thread: Comapring two files
Post: RE: Comapring two files

(Oct-03-2019, 01:58 PM)usman88 Wrote: Hi thanks for reply. I used panda and numpy. IT works fine with small data but when i use my full file it does not work. There are some column issues there but...
burningkrome General Coding Help 7 3,015 Oct-03-2019, 04:29 PM
    Thread: To correct inline or not to correct inline
Post: RE: To correct inline or not to correct inline

Thanks for the code review and the example code (I'll offer an upvote tomorrow when my points reset :D ) What are your thoughts on the stringCharParam = ''.join(c for c in str(stringCharParam) if re...
burningkrome General Coding Help 3 2,120 Oct-03-2019, 12:49 PM
    Thread: May i ask how i can stop my coding running
Post: RE: May i ask how i can stop my coding running

You can use the "exit" method from the "sys" module... import sys try: # Remember, a "try:" must always include an "except:" statement A = "111111" if A == "123456": print('OK') ...
burningkrome General Coding Help 4 2,575 Oct-03-2019, 12:08 PM
    Thread: Comapring two files
Post: RE: Comapring two files

As a suggestion, look into Python's "re" module (regex). Then you could match line by line from both files. See here for more suggestions. Also here for how to iterate through a file. import re s...
burningkrome General Coding Help 7 3,015 Oct-03-2019, 11:41 AM
    Thread: How i can judge my code
Post: RE: How i can judge my code

Hi Christing, I think we're all still a bit confused about your goal. So, I've just recreated the code with some comments that will help. Your code wouldn't run as shown above, so I've made enough c...
burningkrome General Coding Help 16 5,908 Oct-03-2019, 11:19 AM
    Thread: To correct inline or not to correct inline
Post: To correct inline or not to correct inline

This is an opinion question. When I code, I generally use assert statements, @property, or casting to check, error out, and/or correct improper parameters passed in. However, some feel this is bloat...
burningkrome General Coding Help 3 2,120 Oct-03-2019, 10:32 AM

User Panel Messages

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