I would like to simply extend the rst2* scripts bundled with docutils
to include a code_block directive. I have found a number of sites
that discuss the topic, but I guess I am new enough to docutils to
still be wondering how to make it actually happen. I'm looking to
convert a single .rst file t
On Sep 23, 2:02 pm, [EMAIL PROTECTED] wrote:
> I have a simulation that runs many times with different parameters,
> and I want to aggregate the output into a single file with one rub: I
> want a header to be written only the first time. My program looks a
> bit like this:
>
> def main():
> fo
I have an xml document and simply need to add an xml-stylesheet to
it. I am using lxml to parse the xml document and then would like to
insert the xml-stylesheet tag using the etree api. Any suggestions?
Thanks,
Sean
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 10, 7:54 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Sep 11, 8:01 am, MRAB <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 10, 6:59 pm, Sean Davis <[EMAIL PROTECTED]> wrote:
>
> > > I have a large file that I would like to transform and t
I have a large file that I would like to transform and then feed to a
function (psycopg2 copy_from) that expects a file-like object (needs
read and readline methods).
I have a class like so:
class GeneInfo():
def __init__(self):
#urllib.urlretrieve('ftp://ftp.ncbi.nih.gov/gene/DATA/
g
On Sep 5, 5:55 pm, peyman <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a Natural Language Processing (NLP) code written in python that
> reads into memory a large training file and then given a sentence tags
> it, using the training data. I want to put this NLP code on a server
> which handles all in
What is the "best practice" for importing an arbitrary module given
that the name is stored in a variable? The context is a simple web
application with URL dispatching to a module and function. I know of
__import__(), the imp module, and exec. For each of these, is there a
way to make them work
On Jun 11, 12:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Jun 11, 9:17 am, Sean Davis <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a set of numpy arrays which I would like to save to a gzip
> > file. Here is an example without gzip
I have a set of numpy arrays which I would like to save to a gzip
file. Here is an example without gzip:
b=numpy.ones(100,dtype=numpy.uint8)
a=numpy.zeros(100,dtype=numpy.uint8)
fd = file('test.dat','wb')
a.tofile(fd)
b.tofile(fd)
fd.close()
This works fine. However, this does not:
fd
I am working with genomic data. Basically, it consists of many tuples
of (start,end) on a line. I would like to convert these tuples of
(start,end) to a string of bits where a bit is 1 if it is covered by
any of the regions described by the (start,end) tuples and 0 if it is
not. I then want to d
I have used command-line telnet to login to a host, paste into the
window a small XML file, and then ^] to leave the window, and quit.
This results in a page (described by the XML file) being printed on a
printer.
When I do an analogous process using telnetlib, I get no debug output,
and most impo
I have some very large XML files that are basically recordsets. I
would like to access each record, one-at-a-time, and I particularly
like the ElementTree library for accessing the data. Is there a way
to have ElementTree read only one record of the data at a time?
Alternatively, are there other
I would like to set up a server that takes XMLRPC requests and
processes them asynchronously. The XMLRPC server part is trivial in
python. The job processing part is the part that I am having trouble
with. I have been looking at how to use threadpool, but I can't see
how to get that working. I
I would like to parse some OWL files, but I haven't dealt with OWL in
python or any other language for that matter. Some quick google
searches do not turn up much in the way of possibilities for doing so
in python. Any suggestions of available code or using existing
libraries for doing so?
Thank
This should be a relatively simple problem, but I haven't quite got
the idea of how to go about it. I have a VERY large file that I would
like to load a line at a time, do some manipulations on it, and then
make it available to as a file-like object for use as input to a
database module (psycopg2)
On Aug 14, 6:16 am, Janto Dreijer <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I am looking for a Python implementation or bindings to a library that
> can quickly find k-Nearest Neighbors given an arbitrary distance
> metric between objects. Specifically, I have an "edit distance"
> between objects that i
I have read a couple of blogs suggesting that pyodbc is buildable
under linux. I am running suse 10.2 on a 64-bit intel machine with
unixODBC installed. Upon building, I get a slew of pretty horrid
looking errors that make me wonder if this is supposed to work. Can
anyone at least confirm that t
What are the alternatives for accessing an ODBC source from python
(linux 64-bit, python 2.5)? It looks like mxODBC is the only one
available?
Thanks,
Sean
--
http://mail.python.org/mailman/listinfo/python-list
In the past, I have put together web applications that process tasks
serially, either with short algorithms to manipulate user-submitted
data or to return database queries. However, now I am faced with the
task of having a long-running process being started by a web
submission. I want to process
On Feb 6, 7:57 am, Jan Danielsson <[EMAIL PROTECTED]> wrote:
> Hello all,
>
>I have some data in a postgresql table which I view through a web
> interface (the web interface is written in python -- using mod_python
> under apache 2.2). Now I would like to represent this data as graphs,
> bar ch
On Jan 11, 3:20 am, Laurent Pointal <[EMAIL PROTECTED]> wrote:
> Bjoern Schliessmann a écrit :
>
> > Sean Davis wrote:
>
> >> The author of one of the python database clients mentioned that
> >> using one thread to retrieve the data from the oracle datab
On Jan 10, 9:27 pm, johnf <[EMAIL PROTECTED]> wrote:
> Bjoern Schliessmann wrote:
> > Sean Davis wrote:
>
> >> The author of one of the python database clients mentioned that
> >> using one thread to retrieve the data from the oracle database and
> >&g
I am working on a simple script to read from one database (oracle) and
write to another (postgresql). I retrieve the data from oracle in
chunks and drop the data to postgresql continuously. The author of one
of the python database clients mentioned that using one thread to
retrieve the data from
I have just installed mxODBC on my x86_64 suse linux machine, where I
use unixODBC for connection. Running queries from isql or DataManager
works fine for the DSN that I am using. However, under mxODBC, I can
get a connection object and a cursor object, but all attempts to
execute even the simple
24 matches
Mail list logo