On May 5, 2011, at 07:16, James Mills wrote:
> On Thu, May 5, 2011 at 1:52 PM, Modulok wrote:
>> You might look into the third party module, 'BeautifulSoup'. It's designed to
>> help you interrogate markup (even poor markup), extracting nuggets of data
>> based
>> on various criteria.
>
> lxml
On Thu, May 5, 2011 at 1:52 PM, Modulok wrote:
> You might look into the third party module, 'BeautifulSoup'. It's designed to
> help you interrogate markup (even poor markup), extracting nuggets of data
> based
> on various criteria.
lxml is also work looking into which provides similar functio
You might look into the third party module, 'BeautifulSoup'. It's designed to
help you interrogate markup (even poor markup), extracting nuggets of data based
on various criteria.
-Modulok-
On 5/4/11, louis leichtnam wrote:
> Hello Everyone,
>
> I'm trying to write a program that looks in a webp
Hello Everyone,
I'm trying to write a program that looks in a webpage in find the titles of
a subsection of the page:
For example you have the list of the title of stories in a newspaper under
the section "World" and you you click on it you have the entire story.
I want a program that print the
Hello,
I tried it and it works, though if I change the web site from
http://finance.blog.lemonde.fr to http://www. ...something else it doesn't
work.
DO I have to change the '([\S]+)'
in x=re.findall(r"
> Observing the page source i think :
>
> page=urllib.urlopen('http://finance.blog.lemon
CC'd to list
> Thanks for your suggestions. I now see I was using far too much unnecessary
> code plus data structures (lists) that were useless. I modified the entire
> program to the following lines based on suggestions from yourself and
> other people on the mailing list:
> import os, st
"Jeff Peery" wrote
Import sting
Its lower case import and I've no idea what sting is! :-)
If its meant to be string you don't need it.
delimiter = ‘.’
f = open('words.txt', "r")
lines = f.readlines()
for line in lines:
line_items = string.split(line,delimiter)
You don't need th
"Spyros Charonis" wrote
motif_file = open('myfolder/pythonfiles/final motifs_11SGLOBULIN',
'r')
align_file = open('myfolder/pythonfiles/11sglobulin.seqs', 'a+')
finalmotif_seqs = []
finalmotif_length = [] # store length of each motif
finalmotif_annot = []
finalmotifs = motif_file.readlin
"Patrick P." wrote
I hope this is the right way to ask my question, if not,
sorry to bother you. Maybe you can tell me who to ask.
The way you ask the question is fine but the place is maybe
not so good. This is a list for people learning Python but you
are really asking about numpy so you
Hello,
I hope this is the right way to ask my question, if not, sorry to bother you.
Maybe you can tell me who to ask.
Ok so here is my code
import numpy as np
nH = 2.2
nL = 1.7
welle = 0.5
wurzel = (8.85*10**(-12) *
On 5/4/2011 2:31 PM, Spyros Charonis wrote:
Hello everyone,
I have written a program, as part of a bioinformatics project, that
extracts motif sequences (programmatically just strings of letters)
from a database and writes them to a file.
I have written another script to annotate the database
Your problem is most likely here.
for line in seqalign:
for i in len(finalmotif_seqs): # for item in finalmotif_seqs:
for i in len(finalmotif_annot): # for item in finalmotif_annot:
instead of
for line in seqalign:
for i in xrange(len(finalmotif_seqs)): # for item in
Use of string module directly seems to be deprecated; you can access any member
functions from the string directly. See below.
delimiter = ‘.’
f = open('words.txt', "r")
lines = f.readlines()
for line in lines:
line_items = line.split(delimiter)
Also, you can read a single line at a
Greg,
You might try…
Import sting
delimiter = ‘.’
f = open('words.txt', "r")
lines = f.readlines()
for line in lines:
line_items = string.split(line,delimiter)
From: tutor-bounces+jeffpeery=seametrics@python.org
[mailto:tutor-bounces+jeffpeery=seametrics@python.org] On Behal
On 04-May-11 11:40, Greg Christian wrote:
Python version = 2.7.1
Platform = win32
I am kind of stuck on what is probably a simple thing:
If we have a file of words like this:
“first”,”word”,”in”,”that”,”another”,”part”,”of”,”this”
It depends on exactly how "just like" that example the file is.
On Wed, May 4, 2011 at 13:31, Spyros Charonis wrote:
> Hello everyone,
>
> I have written a program, as part of a bioinformatics project, that
> extracts motif sequences (programmatically just strings of letters) from a
> database and writes them to a file.
> I have written another script to anno
Python version = 2.7.1
Platform = win32
I am kind of stuck on what is probably a simple thing:
If we have a file of words like this:
“first”,”word”,”in”,”that”,”another”,”part”,”of”,”this”
f = open('words.txt', "r")
words = f.read()
will read the whole file, is there a way to read just the
I am kind of stuck on what is probably a simple thing:
If we have a file of words like this:
“first”,”word”,”in”,”that”,”another”,”part”,”of”,”this”
f = open('words.txt', "r")
words = f.read()
will read the whole file, is there a way to read just the words: first word in
that another part
Hello everyone,
I have written a program, as part of a bioinformatics project, that extracts
motif sequences (programmatically just strings of letters) from a database
and writes them to a file.
I have written another script to annotate the database file (in plaintext
ASCII format) by replacing ev
Hello,
I'm using the code pasted below to print a document. The code worked great on
my XP machine. I moved it to my W7 machine and it gives the error below. The
weird thing is that it works great if printing a html doc from the web (such as
www.google.com), but it errors when printing a html do
On May 4, 2011, at 0:57, Tim Golden wrote:
> On 04/05/2011 00:18, Alan Gauld wrote:
>> Since its more a Windows question than a Python one I suggest you try a
>> Windows forum. comp.python.windows might be worth a try? Or even the
>> ctypes group?
>>
>> While we do have some Windows users here
Spyros Charonis wrote:
Dear All,
I have built a list with multiple occurrences of a string after some text
processing that goes something like this:
[cat, dog, cat, cat, cat, dog, dog, tree, tree, tree, bird, bird, woods,
woods]
I am wondering how to truncate this list so that I only print out
Kushal Kumaran wrote:
> On Tue, May 3, 2011 at 5:31 PM, Peter Otten <__pete...@web.de> wrote:
>>
>>
>> Also you should make the try...except as narrow as possible
>>
>> try:
>> centimeters = float(centimeters)
>> except ValueError as e:
>> print e
>>
>> is likely to catch the float conversion whi
"Kushal Kumaran" wrote
Also you should make the try...except as narrow as possible
try:
centimeters = float(centimeters)
except ValueError as e:
print e
...
I would have expected it to be the other way. If you cannot
reasonable expect to continue after an exception, then the try block
shou
On 04/05/2011 00:18, Alan Gauld wrote:
Since its more a Windows question than a Python one I suggest you try a
Windows forum. comp.python.windows might be worth a try? Or even the
ctypes group?
While we do have some Windows users here its not really a python nwewbie
type question.
True enough.
25 matches
Mail list logo