Thanks everyone, the invRegexInf is perfect.
Thanks again,
Nathan
On 1 April 2010 10:17, Gabriel Genellina wrote:
> En Wed, 31 Mar 2010 12:23:48 -0300, Paul McGuire
> escribió:
>>
>> On Mar 31, 5:49 am, Nathan Harmston
>> wrote:
>>>
>>> I have a
Hi everyone,
I have a slightly complicated/medium sized regular expression and I
want to generate all possible words that it can match (to compare
performance of regex against an acora based matcher). Using the
regular expression as a grammar to generate all words in its language.
I was wondering
Hi,
So I m trying to use a very large regular expression, basically I have
a list of items I want to find in text, its kind of a conjunction of
two regular expressions and a big list..not pretty. However
everytime I try to run my code I get this exception:
OverflowError: regular expression co
Hi,
Just as a follow up to this...I ve discovered that its an issue with
building shared libraries on mac os and it works fine on a Linux box :S.
Thanks
Nathan
On 25/03/2008, Nathan Harmston <[EMAIL PROTECTED]> wrote:
>
>
>
> On 25/03/2008, Gabriel Genellina <[EM
On 25/03/2008, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>
> En Mon, 24 Mar 2008 19:56:08 -0300, Nathan Harmston
> <[EMAIL PROTECTED]> escribió:
>
>
> > import ctypes
> > t = ctypes.CDLL('./Simulation.so')
> > this works fine, I have a
Hi,
I know this is a pretty simple question but I've spent a while on this and
can't see whats wrong. I'm trying to access a shared library which I've
created called Simulation.so, its created as such (snip from makefile):
all: simulation
simulation: Simulation.so
Simulation.so: Simulation.o St
Did I just help someone with their homework? Hope not :S
On 27/09/2007, Nathan Harmston <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I m not sure what your trying to do, but this is where your problem is:
>
> string1 is not a string it is actually a dict because of your eval.
>
Hi,
I m not sure what your trying to do, but this is where your problem is:
string1 is not a string it is actually a dict because of your eval.
When you call
string1["param"] inside the string.split()
it is returning a dictionary and not a string
'param': {'key': 'SP<136>=', 'value': ['SD:<0
ood way of
accomplishing this, so if there anyway of doing this without using a
metaclass..or by using a decorator or notany help would be
greatly appreciated.
Many Thanks in advance
Nathan
On 17/09/2007, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Nathan Harmston a é
HI,
I m trying to start an api in a similar way to the djangic way of
Class.objects.all(). Ie objects is a "Manager" class.
So:
class Foo(object):
def __init__(self):
self.test = "NEE"
class Manager(object):
def __init__(self):
pass
def all(self):
return "COCONU
Theres a few python ebooks listed on the wiki
http://wiki.python.org/moin/PythonBooks
Hope this helps,
Nathan
On 16/09/2007, Marco <[EMAIL PROTECTED]> wrote:
> Hi George,
>
> > Please tell me from which website I will get the free Python Ebook.
> which one do you mean?
>
> I o
Hi,
Sorry if the subject line of post is wrong, but I think that is what
this is called. I want to create objects with
class Coconuts(object):
def __init__(self, a, b, *args, **kwargs):
self.a = a
self.b = b
def spam( l )
return Coconuts( l.a, l.b, l.attributes )
l in a parse
Hi,
>From your description I think something like PyParsing might be useful to you.
http://pyparsing.wikispaces.com/
If not then I guess I m not understanding your question right.
Hope this helps
Nathan
On 21/08/07, Robert Dailey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am looking for a sort of
Hi,
I know this isnt the pyparsing list, but it doesnt seem like there is
one. I m trying to use pyparsing to parse a file however I cant get
the Optional keyword to work. My file generally looks like this:
ALIGNMENT 1020 YS2-10a02.q1k chr09 1295 42141045
142297 C1254 95.06
Hi,
I was wondering if anyone knew of any resources, where I might be able
to find information about the complexity of certain python functions
or little tips on how to reduce complexity. I mean like the "".join(),
kind of thing?
I want to see if there are any improvements I can add to my coding
Hi,
I have being thinking about this and was wondering with built in types
you can do things like
float(1) or str(200)
is there way I can define conversion functions like this:
say i have a class A and a class B
bobj = B()
aobj = a(bobj)
in a neater way than just defining a set of methods
de
Hi,
I m thinking about writing some code which logs the input and output
of a function/script and stores it in a database using sqlalchemy
(although I havent started on this yet). I want to do this via a
decorator ( I think this is the best way ).
def log(fn):
def newfn(*args):
print
> "Clipper-derived unreadable drivel"
>
> I'm intrigued, what language are you working in?
>
> Clipper v5 was a pretty impressive development language for 1990 - with
> code blocks, a flexible pre-processor, garbage collection, exception
> handling, decent speed and an API to allow easy integration
> > Using a module global for this kind of data is usually a bad idea
> > (except eventually for run-once throw-away scripts, and even then...)
> >
> > Why is this a bad idea?
>
> Don't you have any idea ?
> --
Not really.problem with access, using unneeded memory... I
grasping at straws here.
HI,
Thanks to everyone for your comments ( i never knew "with" existed,
but to quote Borat "I like", unfortunately I cant apply for the job as
i m in the UK and dont have the experience but hey 10 minutes of
programming python beats 12 hours of programming in Clipper-derived
unreadable drivel (you
Hi,
I m sorry but I m bored at work (and no ones looking so I can write
some Python) and following a job advertisement post,I decided to write
the code to do its for the one entitled Ninjas or something like that.
I was wondering what could be done to my following code to make it
more idiomatic...
Hi,
I m playing around with extended euclids algorithm from Knuth. I m
trying to build a function with a function inside it.
def exteuclid(m,n):
a,a1,b,b1,c,d = 0,1,1,0,m,n
def euclid(c,d):
q = c /d
r = c % d
if r == 0:
print a,b
return d
Hi, you could try this:
def parse(self, ifile):
id=""
seq=""
for line in open(ifile, 'r'):
if '>'==line[0]:
if id!="" and len(seq)>0:
yield id,seq
seq = ""
id=line[1:].strip("\n")
HI,
I posted this to sqlalchemy but didnt get a response, so I was
wondering if anyone on python-list could help me.
I m currently trying to build an api for a database and I really like
the way that Djangos manager ( Class_name.objects ) is set up. This
seems very intuitive for me. After reading
Hi,
I m trying to implement an object which contains lazy" variables. My
idea is to alter the getattr and the setattr methods. However I keep
on getting a recursion error.
My idea is that the lazy variable can be stored in a variety of
places, Database, PyTables etc. The lazy variable is a large
I have had very few problems with eclipse on ubuntu with pydev
installed. Is it still running under the gnu jvm, not the sun one? It
was crashing on me until I changed them around, detials about changing
it around on ubuntu anyway
http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_install_Java_Integra
SV module not as useful as it might be -
> due to the restrictions you describe.
>
> Why not write a simple parser class ?
>
> On Mi, 9.05.2007, 10:40, Nathan Harmston wrote:
> > Hi,
> >
> > I ve been playing with the CSV module for parsing a few files. A row
> &
Hi,
I ve been playing with the CSV module for parsing a few files. A row
in a file looks like this:
some_id\t|\tsome_data\t|t\some_more_data\t|\tlast_data\t\n
so the lineterminator is \t\n and the delimiter is \t|\t, however when
I subclass Dialect and try to set delimiter is "\t|\t" it says
del
Thanks,
I might just move my trinary string (if I get that far) to be encoded
as 0, 1, 2, thanks for your help.
On 30 Apr 2007 11:14:10 -0700, John Machin <[EMAIL PROTECTED]> wrote:
> On Apr 30, 9:53 pm, "Nathan Harmston" <[EMAIL PROTECTED]>
> wrote:
> > Hi,
Hi,
I ve being thinking about playing around with bit strings but use in
some encoding problems I m considering and was trying to decide how to
implement a bit string class. Is there a library out there for doing
basic things with bit strings already is my first question?
I know that I can extend
You could look at sage.its all python!
http://sage.scipy.org/sage/
I wish Xah Lee would stop trolling.oh well
Cheers
Nathan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Recently I posted a question about the factory pattern in python. I ve
implemented this following one of the ideas posted. After some reading
I ve seem a lot of Aspect Oriented Programming mentioned but I m not
really sure what it is.
Can anyone help me understand how metaclasses can improve
Hi,
Im trying to find the best way to do a certain task and my so far I
have found that using something similar to factory pattern might be
the best bet.
I m parsing a file to be stored as a graph (using NetworkX). Each row
in the file corresponds to a node in the graph. However rows have
differ
Hi,
It seems that by just going through the problem writing out a better
explanation for the reply I have figured out a solution and the
problem isnt as difficult as I thought it would be.
What is a wontok?
Thanks
Nathan
PS --> the start of my reply:
class Interval(object):
_id = "gene1"
Hi,
The idea is that I m going to use it to build graphs for sequence
alignment (at the moment), I read a discussion on the corebio
(reimplementation of biopython) group about using intervals to
represent sequence slices. The idea being that, my graph may contain
millions of alignments and storing
> > https://networkx.lanl.gov/
This was working for me earlier, I managed to get everything from
there earlier. It seems a very good package. It seems theres more out
there than what I had thought, which unfortunately makes it harder for
me to decide what to use (pynetwork and bgl look useful aswe
Hi All,
I ve got a single module which I m using to contain a lot of
dictionaries, constants, general information, which are used by
various other modules. However I can't seem to access them:
in data.py
_SEQTYPE_DNA = 0
_SEQTYPE_RNA = 1
_SEQTYPE_PROT = 2
_seqType = { "DNA":_SEQTYPE_DNA, "RNA":_S
Hi All,
Currently I am working on a generic graph library so I can do various
graph based analysis for various projects I have ideas for. Currently
I am implementing Graph as a wrapper around a dictionary. Currently my
implementation works like this:
t = Graph()
n1 = Node("Node1"
Hi, Currently I m writing an XML parser that processes an xml file using sax, and I have it working, however I want to make the code of my parser less cluttered and more readable by other people (including myself). However it is quite messy at the moment. The main reason is that Python doesnt have
39 matches
Mail list logo