Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Odd interpreter behavior
Post: RE: Odd interpreter behavior

yes. Thank you. I played around last night and found that, yes, the print should be outside of the existing block.
sumncguy Homework 4 2,317 Jan-09-2020, 02:11 PM
    Thread: Odd interpreter behavior
Post: RE: Odd interpreter behavior

Thanks .. it is actually .. for some reason the forum interface doesnt like the paste of the resulting error.
sumncguy Homework 4 2,317 Jan-08-2020, 06:59 PM
    Thread: Odd interpreter behavior
Post: Odd interpreter behavior

Im posting this in Homework as I am taking a self paced course. Im on a Centos 6 vm. There is both python 2.7.5 and 3.7 loaded. I am not sure why I am getting the error given below. Post preview ...
sumncguy Homework 4 2,317 Jan-08-2020, 06:24 PM
    Thread: Self Paced Web course - split ip and print each piece in binary and hex
Post: Self Paced Web course - split ip and print each pi...

Hi folks Im taking a free self paced web class .. the following code meets the exercise requirement. ip = input("Enter an ip address : ") octets = ip.split(".") print("\n\n{:^15}{:^15}{:^15}{:^15}"....
sumncguy Homework 2 2,310 Dec-04-2019, 12:19 AM
    Thread: Grab and Parse a chunkc of text
Post: RE: Grab and Parse a chunkc of text

(Oct-07-2019, 02:16 PM)Gribouillis Wrote: Can you explain what the sed command does exactly here? searches for a line that starts with Switch Quote:sed /^Switch/ through an empty line Quote:sed /...
sumncguy General Coding Help 4 2,403 Oct-07-2019, 03:39 PM
    Thread: Grab and Parse a chunkc of text
Post: Grab and Parse a chunkc of text

I mentioned a few times before that I am trying to learn/get better at python. I am unable to load non standard modules. I am using either python 2.6.6 or 2.7 (mostly 2.6.6) To get a better handle ...
sumncguy General Coding Help 4 2,403 Oct-07-2019, 01:08 PM
    Thread: Morning Removing last character
Post: RE: Morning Removing last character

**angry** I found that a few VMs are using 2.6.6.. Seems that format wasnt introduced until 2.7 .. so the print solution doesnt work in some cases. Can anyone point me to a place where I can fin...
sumncguy General Coding Help 8 3,335 Sep-16-2019, 03:40 PM
    Thread: Morning Removing last character
Post: RE: Morning Removing last character

list comprehension .. thank you I dont like to just copy and paste solutions given that I don't understand. Main reason, if I did, next month when I look at the code again ... I'd be thinking 'What ...
sumncguy General Coding Help 8 3,335 Sep-06-2019, 05:36 PM
    Thread: Morning Removing last character
Post: RE: Morning Removing last character

(Sep-06-2019, 03:17 PM)DeaD_EyE Wrote: Use str.join My output: Output:deadeye@nexus ~ $ python2.7 parse_ips.py ...
sumncguy General Coding Help 8 3,335 Sep-06-2019, 04:59 PM
    Thread: Morning Removing last character
Post: Morning Removing last character

I have the need to change a list of ips into a regular expression, then copy / paste the results else where The starting list Quote:10.10.10.10 host1 10.10.10.11 host2 10.10.10.12 host3 10.10.10.13...
sumncguy General Coding Help 8 3,335 Sep-06-2019, 01:53 PM
    Thread: Self
Post: Self

Im putting this in homework ... because I am taking a second python class and am still confused with why we use self. I guess I have a block on this. Can anyone help me with a layman explaination of ...
sumncguy Homework 3 2,503 Aug-22-2019, 04:55 PM
    Thread: Is there a more effecient way to do this ? File Names
Post: Is there a more effecient way to do this ? File Na...

I often need to loop through a list of logs and parse them. I like to use, for instance, an ip and hostname as designations for files creation. Its just easy to look at the file and know what / who ...
sumncguy General Coding Help 2 2,097 Jul-11-2019, 11:35 AM
    Thread: Importing -
Post: Importing -

Im not sure that I will be able to get this question answered. I am trying to pick apart a home group module they are using at work and I have run into a block. I understand I might not know enough ye...
sumncguy General Coding Help 2 14,389 Jun-27-2019, 05:52 PM
    Thread: Removing extra space
Post: RE: Removing extra space

Thanks ....
sumncguy Homework 4 2,844 Jun-07-2019, 09:16 PM
    Thread: Removing extra space
Post: Removing extra space

The print output annoys me. **biggrin** My question is how do I get rid of the space betwen the the dollar sign and value. I did try to search the web, but couldnt find a solution. I am running t...
sumncguy Homework 4 2,844 Jun-07-2019, 05:06 PM
    Thread: Trying to convert my Expect/bash to Python
Post: RE: Trying to convert my Expect/bash to Python

Yes. I do have root .. but the admin gods dont want anything loaded on the VM. Will get spanked if I do it and they find out.
sumncguy General Coding Help 4 4,052 Jun-06-2019, 07:55 PM
    Thread: Trying to convert my Expect/bash to Python
Post: Trying to convert my Expect/bash to Python

Good Morning, I am trying to gain some python knowledge and convert scripts Ive written in expect and bash. I do not have permission to load modules so Netmiko/paramiko and Pexpect/pxxsh is not ava...
sumncguy General Coding Help 4 4,052 Jun-06-2019, 01:37 PM
    Thread: New guy looking at lists
Post: RE: New guy looking at lists

Ummm .. so how do I work around this in actual execution. This is just something I found in a tutor. But if it were real world .. how would I realize that what, lets say, I'm using for a conditiona...
sumncguy General Coding Help 5 108,736 Jan-24-2019, 10:34 PM
    Thread: New guy looking at lists
Post: New guy looking at lists

Hello folks : Version/system stats: Quote:@localhost ~]$ python -V Python 2.6.6 @localhost ~]$ cat /etc/*release | tail -1 CentOS release 6.10 (Final) My cheap g code ... #!/usr/bin/pytho...
sumncguy General Coding Help 5 108,736 Jan-24-2019, 08:19 PM
    Thread: Delete multiple files using file extention
Post: Delete multiple files using file extention

I script in bash and some expect and I am trying to make the move to python. I have taken a beginner class at a local community college and am now trying to put "it" to use. The best way for me to d...
sumncguy General Coding Help 2 2,743 Jan-22-2019, 12:28 PM

User Panel Messages

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