Here is a snippet of my code:
which gives my list of urls. So now I use a regex to search for the relevant urls which I want in a list:
which prints the results as:
What I am trying to do is create a list from these results. When I attempt to do this, I always run into a brickwall:
This is the closest thing I could come up with:
But as you can see, it didnt create the list???? What am I doing wrong and how can this be accomplished ?
---------- Post updated at 05:01 PM ---------- Previous update was at 04:34 PM ----------
so it turned out to be the +=, which is the increment operator
Thanks to dslackw for providing this insane resolution. I still cant believe it.
Hello
I have a big excel file for Ticket Data Analysis. The idea is to make meaningful insight from Resolution Field. Now as people write whatever they feel like while resolving the ticket it makes quite a task.
1. They may or may not tag it with something like below within the resolution... (1 Reply)
Is there anything i can do about this code? I need to sort it by folder creation, the newest will be first ... thx :)
for dirname in postme:
dirname = os.path.abspath(dirname)
if dirname:
... (2 Replies)
Hi,
I have a list file which has script names in them. Some scripts take lists as parameters which inturn have script names. This is basically for sequencing the job run.
Eg: List1:
test1.ksh
test2.ksh test2.lst
test3.ksh test3.lst
test4.ksh
test2.lst:
test21.ksh
test23.ksh... (7 Replies)
Well, I'm a python noob and my last post here I was introduced to Regex. I thought this would be easy since I knew Regex with Bash. However, I've been banging my head a while to extract an ip address from ifconfig with this:
#!/usr/bin/python
import re
import subprocess
from subprocess... (5 Replies)
As a newbie to Python, I am trying to write a script in which is will add all the log files (*.log) from within a directory to a list, open the files and search for an ip using a regex and single it out (appending the ip's to the list). So far, I have:
import re, os
def list_files()
content = ... (4 Replies)
I starting teaching myself python and am stuck on trying to understand why I am not getting the output that I want. Long story short, I am using PDB for debugging and here my function in which I am having my issue:
import re
...
...
...
def find_all_flvs(url):
soup =... (1 Reply)
I am attempting to create a script that would allow me to list all the instances associated with a DB2 and then prompt the user to choose which one to issue the db2profile command against. I use the db2 command db2ilist to get a list of the instances for a particular server, but the number of... (7 Replies)
I am attempting to create a script that would allow me to list all the instances associated with a DB2 and then prompt the user to choose which one to issue the db2profile command against. I use the db2 command db2ilist to get a list of the instances for a particular server, but the number of... (1 Reply)
It is for HP-Unix B.11.31.
Requirement:
1. List the directories, which directories name has given particular string.
Example: Directories with name "Build"
2. On the output of 1. list the directories by creation date as sort order.
I tried with; find . -type d -name "Build*"
... (3 Replies)
I have the below string and regex. However I cant understand why it works the way it does. IP has been changed for safety ;)
String = NowSMS Error Report. Error initializing SMSC Interface 'SMPP - 10.15.8.10:17600'. Interface is not available.
Regex = (.+\.)\s(.+)
I get two... (1 Reply)