Israel's Profile User Rating: -----

Reputation: 7 Worker
Active Posts:
824 (0.2 per day)
22-November 04
Profile Views:
Last Active:
User is offline Sep 19 2015 03:27 PM

Previous Fields

Who Cares
OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Dream Kudos:

Latest Visitors

Icon   Israel In /dev/null no one can hear you scream...

Posts I've Made

  1. In Topic: Trouble Passing Command-Line Arguement

    Posted 19 Sep 2015

    Omg... That just made me feel stupid:

    Nuber of total URLs: 20

    Switching from night to day shift does not help my logic capabilities. Thank you for your patience.
  2. In Topic: Trouble Passing Command-Line Arguement

    Posted 19 Sep 2015


    argv is a list (what made you think it was a single value?)

    I didn't know it was an actual list, but that makes sense. I changed this line to the following :

    httpResponse = urllib.urlopen(sys.argv[1])

    Now I'm suddenly being asked for a file or directory?

    $ ./
    Traceback (most recent call last):
      File "./", line 18, in <module>
        httpResponse = urllib.urlopen(sys.argv[1])
      File "/usr/lib/python2.7/", line 86, in urlopen
      File "/usr/lib/python2.7/", line 207, in open
        return getattr(self, name)(url)
      File "/usr/lib/python2.7/", line 462, in open_file
        return self.open_local_file(url)
      File "/usr/lib/python2.7/", line 476, in open_local_file
        raise IOError(e.errno, e.strerror, e.filename)
    IOError: [Errno 2] No such file or directory: ''

    I tried str(sys.argv[1]) with the same results. Maybe the library requires a file for this? Or maybe I'm still doing it wrong :P

    Thanks for the suggestion!
  3. In Topic: Regex Causing "list index out of range" Error

    Posted 28 Feb 2014

    That dawned on me while I was away for my computer a couple hours.

    Good call though. Derp!
  4. In Topic: Regex Causing "list index out of range" Error

    Posted 28 Feb 2014

    I see what you mean. I took out the [^] like so:

    import re
    import subprocess
    from subprocess import Popen, PIPE
    pattern = re.compile(r'inet.*\d+\.\d+\.\d+\.\d+')
    p1 = Popen(["/sbin/ifconfig"], stdout=subprocess.PIPE)
    output = p1.communicate()[0]
    result = re.findall(pattern, output)
    print result[0]

    And a line with is all I get:

    # ./ 
    inet addr:  Mask:

    Would you happen to know why its finding, but missing listed on my other interface?

    wlan2     Link encap:Ethernet  HWaddr 00:1f:1f:7e:a3:de  
              inet addr:  Bcast:  Mask:
              inet6 addr: fe80::21f:1fff:fe7e:a3de/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:19712 errors:0 dropped:0 overruns:0 frame:0
              TX packets:17179 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:14323745 (13.6 MiB)  TX bytes:3351821 (3.1 MiB)

    Thanks for getting me this far.
  5. In Topic: Code adding a new line when it shouldn't...

    Posted 22 Feb 2014

    Nice! Guess I have a lot more to learn about debugging with Python. The "from array import *" was something I found searching for arrays, but it seems to work fine without it. Thank you both!

My Information

Member Title:
D.I.C Addict
Age Unknown
Birthday Unknown
Years Programming:
Programming Languages:
C, Python, Perl, Ruby, Bash HTML, CSS, PHP, MySQL

Contact Information

Click here to e-mail me


Israel has no profile comments yet. Why not say hello?