Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Suggestions for a simple data analysis program
Post: Suggestions for a simple data analysis program

Hi guys, I'm starting a new project and would like to know what some of you more seasoned python coders might think of my plans. I need to create a program with the purpose to cross-reference perso...
t4keheart General Coding Help 0 1,790 Mar-08-2021, 03:45 PM
    Thread: Creating list of lists from generator object
Post: Creating list of lists from generator object

I have a generator object 'results', which when looping through returns a list of dictionaries. I'm trying to convert this into a list of lists, so I can easily loop through and reference each value t...
t4keheart General Coding Help 1 2,210 Nov-13-2020, 04:12 AM
    Thread: Count number of occurrences of list items in list of tuples
Post: Count number of occurrences of list items in list ...

Having a hard time with this one guys- I need to write a function that takes 3 arguments: data, year_start, year_end. The data is a list of tuples. year_start and year_end are input by user. The fu...
t4keheart General Coding Help 1 2,386 Nov-03-2020, 04:23 AM
    Thread: Need help improving function that reads file into list of tuples
Post: RE: Need help improving function that reads file i...

This is what ended up working for me: if damages: try: damages = float(damages) except: damages = int('0') else: da...
t4keheart General Coding Help 6 3,061 Nov-02-2020, 11:50 PM
    Thread: Need help improving function that reads file into list of tuples
Post: RE: Need help improving function that reads file i...

So, perhaps something like this?: if isinstance(damages, float) == True: damages = float(damages) else: damages = int('0')But that still leaves my utah tuple w...
t4keheart General Coding Help 6 3,061 Nov-02-2020, 11:45 PM
    Thread: Need help improving function that reads file into list of tuples
Post: RE: Need help improving function that reads file i...

And I don't understand why that last float (utah tuple), is coming out as "0", when the cell contains 48.5.
t4keheart General Coding Help 6 3,061 Nov-02-2020, 11:39 PM
    Thread: Need help improving function that reads file into list of tuples
Post: RE: Need help improving function that reads file i...

(Nov-02-2020, 11:11 PM)bowlofred Wrote: I don't understand the logic you're doing in the final section. At line 53, you run the section only if damages is already a float. I would imagine if it's...
t4keheart General Coding Help 6 3,061 Nov-02-2020, 11:38 PM
    Thread: Need help improving function that reads file into list of tuples
Post: Need help improving function that reads file into ...

Hi everyone, I'm having some slight difficulty getting this function to do exactly what I need it to do. Essentially it reads in a file.csv, and needs to store various columns into a "master_list" ...
t4keheart General Coding Help 6 3,061 Nov-02-2020, 10:49 PM
    Thread: Help with a regular expression
Post: RE: Help with a regular expression

(Oct-13-2020, 03:55 PM)bowlofred Wrote: First of all, if your input is as regular as you show, I would not use the regex and just split() it. uid = messageUID.split()[-1]But if it's useful for othe...
t4keheart General Coding Help 2 2,001 Oct-13-2020, 04:05 PM
    Thread: Help with a regular expression
Post: Help with a regular expression

Hi guys,  Hoping somebody can help me here. I have a list of email messages and their UID's. I need to use re.findall() to select just the UID from the list.  The format of the input is: b' +OK 1 19 ...
t4keheart General Coding Help 2 2,001 Oct-13-2020, 03:42 PM
    Thread: poplib - parsing message body, could somebody please help explain this code
Post: RE: poplib - parsing message body, could somebody ...

Thank you for the response...  This all happened after we migrated the mailbox from one service provider to another, so I'm guessing the format in which the UID string is passed changed.  When I prin...
t4keheart General Coding Help 2 2,304 Oct-12-2020, 01:59 PM
    Thread: poplib - parsing message body, could somebody please help explain this code
Post: poplib - parsing message body, could somebody plea...

Hi all,  We have a python program that works with the ibm watson transcriber to transcribe voicemail and send to appropriate staff.  It stopped working on 9/22, for seemingly no reason.  I've tracked...
t4keheart General Coding Help 2 2,304 Oct-12-2020, 07:23 AM
    Thread: Using python within an html form
Post: RE: Using python within an html form

(Aug-15-2020, 05:40 AM)ndc85430 Wrote: (Aug-14-2020, 07:57 PM)t4keheart Wrote: Say I have an html form, with a field and submit button. On click, I would like to take the value input by user, quer...
t4keheart Web Scraping & Web Development 5 5,458 Aug-17-2020, 12:28 PM
    Thread: Using python within an html form
Post: Using python within an html form

Hi everyone, I'm wondering if what I'm trying to do is possible. Something that would normally be done with jquery, but I'm wondering if I can simplify using python. Say I have an html form, with a...
t4keheart Web Scraping & Web Development 5 5,458 Aug-14-2020, 07:57 PM
    Thread: Best module for creating a web based form?
Post: RE: Best module for creating a web based form?

Well, I'm looking to replace this monster of a php/js/ajax/jquery form running on iis that's been around for probably 10 years now. It's been around for so long, and has been modified by so many diff...
t4keheart Web Scraping & Web Development 12 4,910 Aug-06-2020, 04:31 AM
    Thread: Reading txt files in ssh server.
Post: RE: Reading txt files in ssh server.

Of course you can parse the contents of a text file... simplest example: file1 = open("MyFile.txt","r") file1.readlines() file1.close()you can do all sorts of stuff reading and writing to text files...
t4keheart General Coding Help 6 4,152 Aug-06-2020, 04:22 AM
    Thread: Quotes vs. no quotes around numbers
Post: RE: Quotes vs. no quotes around numbers

simplest answer... as stated by many already. quotes around the number make it a string of that number. no quotes and the number is an int. so print('11') is the same as print(str(11)) There's no w...
t4keheart General Coding Help 6 3,159 Aug-06-2020, 04:13 AM
    Thread: Help with getting a led to flash.
Post: RE: Help with getting a led to flash.

The project you posted doesn't even look like it has anything to do with a blinking LED....... What exactly are you trying to do?
t4keheart General Coding Help 10 4,131 Aug-06-2020, 04:09 AM
    Thread: Best module for creating a web based form?
Post: RE: Best module for creating a web based form?

(Aug-05-2020, 07:58 PM)ndc85430 Wrote: Pretty much correct, as browsers only run JavaScript. There may be tools and libraries that let you write Python that can be transpiled to JavaScript for a bro...
t4keheart Web Scraping & Web Development 12 4,910 Aug-05-2020, 08:04 PM
    Thread: Best module for creating a web based form?
Post: RE: Best module for creating a web based form?

(Aug-05-2020, 04:29 PM)ndc85430 Wrote: Obviously, you'll need to write some JavaScript for anything done client-side. You mean to tell me i won't be able to do anything client side with python inste...
t4keheart Web Scraping & Web Development 12 4,910 Aug-05-2020, 07:49 PM

User Panel Messages

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