I have a script that parses an html page for all the links within it. I am getting all of them fine, but I have a list of domains I want to compare it against. So a sample list contains
list=['www.domain.com', 'sub.domain.com']
But I may have a list of links that look like
http://domain.com
http://sub.domain.com/some/other/page
I c...
I've tried using the following commands to download the ctrl alt del comics.
$ for filename in $(seq 20021023 20100503); do wget http://www.ctrlaltdel-online.com/comics/"$filename".jpg; done
I get the following error code, "bash: syntax error near unexpected token 'do'"
I've also tried using cURL, using this command,
curl http://ctr...
I need to split a string like this, on semicolons. But I don't what to split on semicolons that are inside of a string (' or "). I'm not parsing a file; just a simple string with no line breaks.
part 1;"this is ; part 2;";'this is ; part 3';part 4;this "is ; part" 5
Result should be:
part 1
"this is ; part 2"
'this is ; part 3'
part ...
I need to wait in a script until a certain number of conditions become true?
I know I can roll my own eventing using condition variables and friends, but I don't want to go through all the trouble of implementing it, since some object property changes come from external thread in a wrapped C++ library (Boost.Python), so I can't just hij...
Suppose I have a given Object (a string "a", a number - let's say 0, or a list ['x','y'] )
I'd like to create list containing many copies of this object, but without using a for loop:
L = ["a", "a", ... , "a", "a"]
or
L = [0, 0, ... , 0, 0]
or
L = [['x','y'],['x','y'], ... ,['x','y'],['x','y']]
I'm especially interested in the th...
First of all, I have some time reading this page and I find very interesting, the content also has many questions and are very entertaining.
My question is about handling my incoming mail server, no matter if you use PHP, Perl, or Python.
I do not care, what if I want is the result which should be as close to:
I send an email to update...
Poking around options for integrating an online app with Quickbooks, I've made a lot of headway with QBWC, but it's fairly ugly. From an end user perspective the usability of QBWC is pretty low.
Intuit is now pushing Intuit Partner Platform (IPP) and Intuit Data Services (IDS). I can't quite figure out what these are about:
Is IPP lim...
Hi All,
I want to write server/client chat protocol using python-2.5 .
I want to make protocol similar to yahoo messenger or google-talk.
Please suggest me how to start.
Thanks
Reetesh Nigam
...
hi
how do I return the entity ID using python in GAE?
Assuming I have following
class Names(db.Model):
name = db.StringProperty()
...
Hello all,
I am trying to import NLTK in my python code and I get this error:
Traceback (most recent call last):
File "/home/afs/NetBeansProjects/NER/getNE_followers.py", line 7, in
import nltk
ImportError: No module named nltk
I am using NetBeans: 6.7.1, Python 2.6 NLTK.
My NLTK module is installed in /usr/local/lib/python2.6/d...
First of all, I get the name of the current window
win32gui.GetWindowText(win32gui.GetForegroundWindow())
k, no problem with that...
But now, how can I make an if with the result for having an specific string on it...
For example, the result gave me
C:/Python26/
How can I make an True of False for the result containing the word,...
I'm writing a Pylons app, and am trying to create a simple backup system where every table is serialized and tarred up into a single file for an administrator to download, and use to restore the app should something bad happen.
I can serialize my table data just fine using the SqlAlchemy serializer, and I can deserialize it fine as well...
Hello,
I would like to know if is there any way to convert a plain unicode string to HTML in Genshi, so, for example, it renders newlines as <br/>.
I want this to render some text entered in a textarea.
Thanks in advance!
...
We have a TurboGears 2.1 application where we have added several renderers, but I'm having trouble getting them to set the correct MIME type.
In config/app_cfg.py we enable the renderers:
class LITSAdminConfig(AppConfig):
def setup_csv_renderer(self):
self.render_functions.csv = render.render_csv
def setup_pdf_renderer(...
If I'm using a canvas to display data and I want the user to be able to click on various items on the canvas in order to get more information or interact with it in some way, whats the best way of going about this?
Searching online I can find information about how to bind events to tags but that seems to be more indirect then what I wa...
i want to see the all method in
how to get it
thanks
...
Hello everyone.
I have a log file containing some Whois entries with relative IP addresses which I want to censor like:
81.190.123.123 in 81.190.xxx.xxx.
Is there a way to make such a conversion and rewrite the file contents without modifying the rest?
Thank you for the help!
...
I need to display multiple forms (up to 10) of a model on a page. This is the code I use for to accomplish this.
TheFormSet = formset_factory(SomeForm, extra=10)
...
formset = TheFormSet(prefix='party')
return render_to_response('template.html', {
'formset' : formset,
})
The problem is, that it seems to me that Django queries...
Hi, I am in a situation where multiple threads reading the same huge file with mutliple file pointers to same file. The file will have atleast 1 million lines. Eachline's length varies from 500 characters to 1500 characters. There won't "write" operations on the file. Each thread will start reading the same file from different lines. Whi...
if I've string like
"{ partner_name = test_partner}" OR " { partner_name : test_partner }
its an example string will be very complex with several special characters included like =, [ , ] , { , }
what will be the best way to convert it into a python object - so I can process it
I tried with eval but it requires " ' " for string, but...