Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Simplifying multiple "or" conditions in if statement.
Post: RE: Simplifying multiple "or" conditions in if sta...

Be a little careful of the way you test an expression such as this. What could be happening is that it is just taking one of the values and using that. You probably should test if 'Bob' or 'Carol', 'A...
AussieSusan General Coding Help 8 102,153 Jul-21-2017, 03:25 AM
    Thread: Parse XML line by line
Post: RE: Parse XML line by line

Regex's have their place but parsing XML, HTML and similar text-based files is NOT one of them. It is problems like this that gave rise to the adage: "if you have a problem and think that REGEX is the...
AussieSusan Web Scraping & Web Development 5 11,282 Jun-07-2017, 05:52 AM
    Thread: How can I parse a text file?
Post: RE: How can I parse a text file?

If you have 3 lists with the related items in order, then why not just use zip to walk through the 3 lists together? Susan
AussieSusan General Coding Help 13 9,095 May-31-2017, 03:06 AM
    Thread: OS Independent way to get network mask
Post: RE: OS Independent way to get network mask

Larz60+ - Thanks for the suggestion. I looked at the same place when wavic suggested it but there are the issues I described earlier. Wavic - I was trying to get away form a dependency on another pack...
AussieSusan Networking 8 10,676 May-12-2017, 03:31 AM
    Thread: OS Independent way to get network mask
Post: RE: OS Independent way to get network mask

@wavic - the way I read that module documentation you start by accessing an interface (if_interface) or network (if_network) and passing it the IP subnet address that you want. In my case the code cou...
AussieSusan Networking 8 10,676 May-11-2017, 02:55 AM
    Thread: OS Independent way to get network mask
Post: OS Independent way to get network mask

I have an application that needs to send a broadcast message on the same network as my computer. Therefore I (think I) want to read the network mask from the interface so I know how to correctly set t...
AussieSusan Networking 8 10,676 May-10-2017, 02:55 AM
    Thread: Natural Logarithm in Python
Post: RE: Natural Logarithm in Python

So what do you get when compared to a manual calculation? If you get the same thing then what you have written could be OK (I'm not making any judgement on this - trying to show you how you can check ...
AussieSusan Homework 8 26,772 May-03-2017, 03:17 AM
    Thread: Distance between two points!
Post: RE: Distance between two points!

If you are dealing with latitude and longitude then you also need to know how far apart the two locations can be. If they are more that a few 10's of km then you may need to use formulae that take the...
AussieSusan Homework 14 33,787 Apr-28-2017, 02:49 AM

User Panel Messages

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