Hi,
Brad M schrieb am 04.05.2018 um 11:30:
> I want to create a C-based memory scanner for Python, and so far this is
> how I do it:
>
> Python:
>
> from ctypes import cdll
> mydll = cdll.LoadLibrary('hello.dll')
> print(mydll.say_something())
>
> and hello.dll:
>
> #include
> __declspec(dlle
Glen schrieb am 16.04.2018 um 13:10:
> I'm writing a save-game editor for a game I play (just a project to learn).
> But I am struggling on how to structure the code, how to store the xml data
> in data structure etc,
>
> Can anyone recommend some source I can review that reads and writes data
> f
leam hall schrieb am 16.04.2018 um 14:54:
> On Mon, Apr 16, 2018 at 7:10 AM, Glen wrote:
>> I'm writing a save-game editor for a game I play (just a project to learn).
>> But I am struggling on how to structure the code, how to store the xml data
>> in data structure etc,
>>
>> Can anyone recommend
Neil Cerutti schrieb am 30.03.2018 um 15:50:
> On 2018-03-30, Stefan Behnel wrote:
>> I admit that I'm being a bit strict here, there are certainly
>> cases where parsing the namespace from a tag is a sensible
>> thing to do. I'm really just saying that most of the
Asif Iqbal schrieb am 30.03.2018 um 03:40:
> On Thu, Mar 29, 2018 at 3:41 PM, Peter Otten wrote:
>> Asif Iqbal wrote:
>>> On Thu, Mar 29, 2018 at 3:56 AM, Peter Otten wrote:
Asif Iqbal wrote:
> Here is a sample xml file
>
> http://tail-f.com/ns/rest";>
> http://networks.com/n
Ben Finney schrieb am 31.07.2017 um 04:24:
> You might be looking for a different compiler, maybe one which compiles
> not to Python byte code but instead to CPU machine code. There isn't
> such a thing;
The Python wiki lists several compilers for Python, although with varying
levels of language c
Sebastian Cheung via Tutor schrieb am 30.09.2015 um 10:55:
> How to read a jpg or png file into python and extract text thanks. I
> would imagine getting small symbols like ; or , to be difficult?
That depends entirely on the OCR engine. And you won't normally get in
touch with that very deeply.
Anthony Papillion schrieb am 23.08.2015 um 01:16:
> from lxml import html
> import requests
>
> page = requests.get("http://joplin.craigslist.org/search/w4m";)
> tree = html.fromstring(page.text)
While requests has its merits, this can be simplified to
tree = html.parse("http://joplin.craigs
Mirage Web Studio schrieb am 29.05.2015 um 17:28:
> Below is a sample code i created.
> Can i better it any way?
Absolutely. Prime number generation is a very well researched and fun to
implement topic. Thus many people have done it before.
See this for algorithmic improvements:
https://pypi.pyt
Alex Kleider schrieb am 09.04.2015 um 21:49:
> On 2015-04-09 09:11, Stefan Behnel wrote:
>> All you need to do is install the "-dev" package that goes with your Python
>> installation, e.g. "python3-dev" should match Python 3.4 in current Ubuntu
>> releases
Alex Kleider schrieb am 09.04.2015 um 17:29:
> On 2015-04-09 07:08, Brandon McCaig wrote:
>> I'm a python newbie, but it looks to me like your compiler cannot
>> find your header files, and in particular pyconfig.h.
>>
>> I tried searching my system and found a file with that name at
>> these locat
Bo Morris schrieb am 24.10.2014 um 14:03:
> May I please get a little instructional criticism. The code below works. It
> logs into 9 different Linux computers, runs a couple commands, and then
> transfers a file back to the server. I want to become a better Python
> coder; therefore, I was hoping
Alan Gauld schrieb am 24.10.2014 um 13:03:
> Not all library modules are C based however so it doesn't
> always apply. But they are usually optimised and thoroughly
> debugged so it is still worth using them rather than building
> your own.
It's worth stressing this point a bit more. Lots of peopl
Raúl Cumplido, 27.06.2014 12:10:
> I would recommend you to migrate your Python version for a newer one where
> you can use fabric, paramiko or other ssh tools. It would be easier.
+1
Even compiling it yourself shouldn't be too difficult on Linux.
> I would recommend also instead of doing an "l
Mario Py, 04.06.2014 07:47:
> I'm writing one small simple program that will use Tkinter.
> Once finished, will I be able to run it on android tablet?
Have a look at kivy, it supports different systems, including various
mobile devices.
http://kivy.org/
Stefan
_
Stefan Behnel, 10.05.2014 10:57:
> Danny Yoo, 07.05.2014 22:39:
>> If you don't want to deal with a event-driven approach that SAX
>> emphasizes, you may still be able to do this problem with an XML-Pull
>> parser. You mention that your input is hundreds of megabytes
Danny Yoo, 07.05.2014 22:39:
> If you don't want to deal with a event-driven approach that SAX
> emphasizes, you may still be able to do this problem with an XML-Pull
> parser. You mention that your input is hundreds of megabytes long, in
> which case you probably really do need to be careful abou
Martin A. Brown, 09.05.2014 00:54:
> : I¹m new to python but not so much to programming. I need to
> : construct a set or programs to test a forms poster that has been
> : enhanced (it is in php). I mostly need http get and post. This
> : is a hands on set of tests and does not have to be
Neil D. Cerutti, 07.05.2014 20:04:
> On 5/7/2014 1:39 PM, Alan Gauld wrote:
>> On 07/05/14 17:56, Stefan Behnel wrote:
>>> Alan Gauld, 07.05.2014 18:11:
>>>> and ElementTree (aka etree). The documenation gives examples of both.
>>>> sax is easie
Alan Gauld, 07.05.2014 18:11:
> Python comes with several XML parsers. The simplest to use are probably sax
> and ElementTree (aka etree). The documenation gives examples of both. sax
> is easiest and fastest for simple XML in big files while etree is probably
> better for more complex XML structur
Ian D, 01.05.2014 16:38:
> I have this part of code and am unsure as to the effect of the array('c')
> part.
The argument that you pass into the constructor is a type identifier.
https://docs.python.org/2/library/array.html#array.array
The different types are defined at the top of that page.
I
Peter Otten, 13.04.2014 10:56:
> from xml.etree import ElementTree as ET
> #root = ET.parse(filename).getroot()
> root = ET.fromstring(data)
> for department in root.findall(".//department"):
> name = department.find("name").text
> desc = department.find("desc").text
name = departmen
Russel Winder, 13.03.2014 17:29:
> On Thu, 2014-03-13 at 16:57 +0100, Stefan Behnel wrote:
> […]
>> The thing is: if you have to write your own wrapper anyway (trivial or
>> not), then why not write it in Cython right away and avoid the intermediate
>> plain C level?
>
James Chapman, 13.03.2014 17:35:
> Perhaps I should look into Cython as I'm currently working on a
> project that utilises a C API.
>
> I've been finding that getting the data types to be exactly what the C
> API is expecting to be the hardest part.
>
> With the original question in mind, here's
Alan Gauld, 12.03.2014 23:05:
> On 12/03/14 16:49, Stefan Behnel wrote:
>> Alan Gauld, 12.03.2014 10:11:
>>> If it were a library then you would have to call
>>> the individual C++ functions directly using
>>> something like ctypes, which is usually more
>&
Alan Gauld, 12.03.2014 10:11:
> If it were a library then you would have to call
> the individual C++ functions directly using
> something like ctypes, which is usually more
> complex.
ctypes won't talk to C++, but Cython can do it quite easily.
Stefan
__
Garry Bettle, 09.01.2014 09:50:
> I'm trying to parse some XML and I'm struggling to reference elements that
> contain foreign characters.
I skipped over Steven's response and he apparently invested quite a bit of
time in writing it up so nicely, so I can happily agree and just add one
little comm
Steven D'Aprano, 14.12.2013 23:22:
> On Sat, Dec 14, 2013 at 09:29:00AM -0500, bruce wrote:
>> Looking at a file -->>
>> http://www.marquette.edu/mucentral/registrar/snapshot/fall13/xml/BIOL_bysubject.xml
>>
>> The file is generated via online/web url, and appears to be XML.
>>
>> However, when I u
bruce, 14.12.2013 15:29:
> Looking at a file -->>
> http://www.marquette.edu/mucentral/registrar/snapshot/fall13/xml/BIOL_bysubject.xml
That file looks ok to me.
> The file is generated via online/web url, and appears to be XML.
>
> However, when I use elementtree:
> document = ElementTree.pa
SM, 29.11.2013 22:21:
> On Thu, Nov 28, 2013 at 2:45 PM, eryksun wrote:
>> On Thu, Nov 28, 2013 at 2:12 PM, SM wrote:
>>> Run with Python3:
>>>
>>> $ python3 testx.py
>>> b'\n \n some text\n\n'
>>
>> print() first gets the object as a string. tostring() returns bytes,
>> and bytes.__str__ returns
Amal Thomas, 04.11.2013 14:55:
> I have checked the execution time manually as well as I found it through my
> code. During execution of my code, at start, I stored my initial time(start
> time) to a variable and at the end calculated time taken to run the code =
> end time - start time. There was
D.V.N.Sarma డి.వి.ఎన్.శర్మ, 31.08.2013 18:30:
> I have been searching for mergesort implimentations in python and came
> across this.
In case this isn't just for education and you actually want to use it, the
built-in sorting algorithm in Python (used by list.sort() and sorted()) is
a very fast me
Santosh Kumar, 16.09.2012 09:20:
> I want to extract (no I don't want to download) all links that end in
> a certain extension.
>
> Suppose there is a webpage, and in the head of that webpage there are
> 4 different CSS files linked to external server. Let the head look
> like this:
>
> http:
Albert-Jan Roskam, 24.07.2012 11:18:
> I would like to test how long it takes for two versions of the same
> program to start up and be ready to receive commands. The program is
> SPSS version-very-old vs. SPSS version-latest.
>
> Normally I'd just fire the program up in a subprocess and measure t
Steven D'Aprano, 08.07.2012 15:48:
>> Hey all, I have a question on using self-modifying code/code generation
>> in Python; namely how to do it.
>
> I know others have already said not to do this, and to be honest I was
> going to say that same thing, but I have changed my mind. Buggrit, this is
Aaron Tp, 07.07.2012 23:19:
> I have a question on using self-modifying code/code generation
> in Python; namely how to do it.
Don't.
Seriously, the answer you should ask yourself is: why do you think the
genetic algorithm (or whatever you are trying to do exactly) would come up
with any reasonab
Peter Otten, 02.07.2012 09:57:
> Sean Carolan wrote:
>>> Thank you, this is helpful. Minidom is confusing, even the
>>> documentation confirms this:
>>> "The name of the functions are perhaps misleading"
Yes, I personally think that (Mini)DOM should be locked away from beginners
as far as pos
Marc Tompkins, 06.06.2012 10:21:
> On Tue, Jun 5, 2012 at 11:22 PM, Stefan Behnel wrote:
>
>> You can do this:
>>
>>connection = urllib2.urlopen(url)
>>tree = etree.parse(connection, my_html_parser)
>>
>> Alternatively, use fromstring() to p
Marc Tompkins, 06.06.2012 03:10:
> I'm trying to parse a webpage using lxml; every time I try, I'm
> rewarded with "UnicodeDecodeError: 'ascii' codec can't decode byte
> 0x?? in position?: ordinal not in range(128)" (the byte value and
> the position occasionally change; the error never does.)
Brett Ritter, 01.04.2012 07:19:
> On Sat, Mar 31, 2012 at 5:37 PM, Barry Drake wrote:
>> concentrate on Python3 or stay with Python2 and get into bad habits when it
>> comes to change eventually? Apart from the print and input functions, I
>> haven't so far got a lot to re-learn.
>
> My recommend
t4 techno, 28.01.2012 11:02:
> I want to make a web page which has to include some python script and html
> tags as well, am not getting how to do that .
> I searched some articles but cant understand them .
> is there anything like linking an external html file into python script ?
>
> Can u plea
Alan Gauld, 27.01.2012 02:16:
> with open(myfile) as aFile:
> # use aFile
I should add that this is the shortest, safest (as in "hard to get wrong")
and most readable way to open and close a file. It's worth getting used to.
Stefan
___
Tutor maill
Pritesh Ugrankar, 28.11.2011 07:56:
First of all, my apologies for writing this very long post.
Welcome to the list. :)
I have been through some related questions about this in Stack Overflow as
well as googled it and found that Perl and Python are the two languages
that offer most what I ne
Dario Lopez-Kästen, 15.11.2011 09:33:
On Tue, Nov 15, 2011 at 9:09 AM, Stefan Behnel wrote:
cubic spline interpolation
No, I didn't.
Stefan
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
Jaidev Deshpande, 14.11.2011 21:30:
I need to perform cubic spline interpolation over a range of points, and I
have written the code for the same in C and in Python.
The interpolation is part of a bigger project. I want to front end for the
project to be Python. Ideally I want Python only to dea
ADRIAN KELLY, 16.10.2011 21:43:
anyone know how i would go about printing 6 random numbers
print(75, 45, 6, 35, 36472, 632)
Numbers were generated by typing randomly on my keyboard.
Sorry-for-taking-it-all-too-literally-ly,
Stefan
___
Tutor ma
Hi,
please don't repost your question before waiting at least a little for an
answer.
c smith, 08.09.2011 05:26:
I found a book at the local library that covers python but it's 2.2.
That's way old then. It won't teach you anything about the really
interesting and helpful things in Python,
questions anon, 08.08.2011 01:57:
Thank you, I didn't realise that was all I needed.
Moving on to the next problem:
I would like to loop through a number of directories and decompress each
*.gz file and leave them in the same folder but the code I have written only
seems to focus on the last fold
Christopher King, 31.07.2011 04:30:
I think I'll go with threading. I've become more familiar with it.
That's ok. When used carefully, threads can be pretty helpful to gain
concurrency in I/O tasks.
But just in case you ever feel like using them for anything else, this is
worth a read:
ht
Christopher King, 29.07.2011 17:08:
On Thursday, July 28, 2011, Dave Angel wrote:
On 07/28/2011 08:32 PM, Christopher King wrote:
Dear Tutor Dudes,
I have a socket Gui program. The only problem is that socket.recv
waits
for a response, which totally screws Tkinter I think. I tried makin
Christopher King, 29.07.2011 02:32:
I have a socket Gui program. The only problem is that socket.recv waits
for a response, which totally screws Tkinter I think. I tried making the
timeout extremely small (it was alright if I didn't receive anything, I
was excepting that a lot) but I think t
Garry Bettle, 22.07.2011 20:18:
I'm trying some calls to an wsdl API I've subscribed to.
You might find this interesting:
http://effbot.org/zone/element-soap.htm
But I'm struggling to know what they want when sending an unsignedByte in a
request.
That's just a number, plain old-fashioned
Emile van Sebille, 22.07.2011 20:59:
You'll likely get more traction on this at
http://mail.python.org/mailman/listinfo/xml-sig
Unlikely.
Stefan
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.pytho
Richard D. Moores, 15.07.2011 23:21:
On Sun, Jul 10, 2011 at 05:05, Peter Otten wrote:
>>> help(print)
shows
print(...)
print(value, ..., sep=' ', end='\n', file=sys.stdout)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-l
Alan Gauld, 02.07.2011 15:28:
"Albert-Jan Roskam" wrote
I used cProfile to find the bottlenecks, the two Python functions
getValueChar and getValueNum. These two Python functions simply call two
equivalent C functions in a .dll (using ctypes).
The code is currently declared as Windows-only and
Albert-Jan Roskam, 02.07.2011 11:49:
Some time ago I finished a sav reader for Spss .sav data files (also with the
help of some of you!):
http://code.activestate.com/recipes/577650-python-reader-for-spss-sav-files/
It works fine, but it is not fast with big files. I am thinking of implementing
t
James Reynolds, 26.05.2011 21:34:
On Thu, May 26, 2011 at 3:07 PM, Stefan Behnel wrote:
Stefan Behnel, 26.05.2011 18:10:
James Reynolds, 26.05.2011 17:22:
As an intellectual exercise, I wanted to try my hand at writing some
extensions in C.
This is fine for en exercise, and I hope you
Stefan Behnel, 26.05.2011 18:10:
James Reynolds, 26.05.2011 17:22:
As an intellectual exercise, I wanted to try my hand at writing some
extensions in C.
This is fine for en exercise, and I hope you had fun doing this.
However, for real code, I suggest you use Cython instead. Your module
Rachel-Mikel ArceJaeger, 26.05.2011 17:46:
A couple small things that will help improve memory management
Rather than avg = sumall / count; return avg; Just return sumall/count
instead. Then you don't have to waste a register or assignment
operation.
Division is expensive. Avoid it when you can
James Reynolds, 26.05.2011 17:22:
As an intellectual exercise, I wanted to try my hand at writing some
extensions in C.
This is fine for en exercise, and I hope you had fun doing this.
However, for real code, I suggest you use Cython instead. Your module would
have been substantially simpler
Sithembewena Lloyd Dube, 25.05.2011 14:40:
Thanks for all your suggestions. I read up on gzip and urllib and also
learned in the process that I could use urllib2 as its the latest form of
that library.
Herewith my solution: I don't know how elegant it is, but it works just
fine.
def get_contest
Sithembewena Lloyd Dube, 24.05.2011 11:59:
I am trying to parse an XML feed and display the text of each child node
without any success. My code in the python shell is as follows:
>>> import urllib
>>> from xml.etree import ElementTree as ET
>>> content = urllib.urlopen('
http://xml.matchbook.c
Spyros Charonis, 10.05.2011 19:14:
On Tue, May 10, 2011 at 5:11 PM, Spyros Charonis wrote:
I know I posted the exact same topic a few hours ago and I do apologize for
this, but my script had a careless error, and my real issue is somewhat
different.
I would have preferred an update to the init
Ratna Banjara, 21.04.2011 13:49:
Does anybody knows jokes related to Python Language?
If the answer is yes, please do share it...
http://www.python.org/doc/humor/
Stefan
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o
Albert-Jan Roskam, 27.03.2011 21:57:
I made a program that reads spss data files. I ran cProfile to see if I can
optimize things (see #1 below).
First thing to note here: sort the output by "time", which refers to the
"tottime" column. That will make it more obvious where most time is really
Shane O'Connor, 17.03.2011 01:32:
In particular, I'm using Python 2.4.3 on a web server which needs to run as
fast as possible using as little memory as possible (no surprises there!).
Note that a web application involves many things outside of your own code
that seriously impact the performan
Alan Gauld, 08.03.2011 09:51:
"Knacktus" wrote
He doesn't have to write it, as it is very obvious, that no Python code
on earth (even written by Guido himself ;-)) stands a chance compared to
Fortran or C. Look at this:
There is one big proviso. The C or Fortran needs to be well written
in th
Knacktus, 07.03.2011 14:28:
Am 07.03.2011 01:50, schrieb Mahesh Narayanamurthi:
Hello,
I am thinking of implementing a BLAS package in pure python. I am
wondering if this is a good idea.
My design goals are:
[2] Targetted to run on Python3
Good idea. NumPy and SciPy will be (are already?)
Mahesh Narayanamurthi, 07.03.2011 01:50:
I am thinking of implementing a BLAS package in pure python. I am wondering
if this is a good idea. My design goals are:
[1] Efficient manipulation of Matrices and
Vectors using pure python objects and
python code.
[2] Targetted to run on Python
Arthur Mc Coy, 06.03.2011 09:56:
I've used SWIG module to embed python inside c++ app.
Given that this deals with an advanced topic (C-level extensions), I find
comp.lang.python (python-list), where you also posted this, a more
appropriate place for discussion than the Python tutor mailing li
Hanlie Pretorius, 01.03.2011 13:33:
Can anyone perhaps suggest the easiest way of translating the C code
into Python, bearing in mind that I'm rather a beginner?
A beginner of what? Python? Programming in general?
The C code you posted doesn't look too complex, so you could try to
translate i
j ram, 28.02.2011 18:49:
Wine is a good suggestion, but it takes up 3.53 MB. Is there a lighter
alternative?
So far, you didn't state whether the DLL actually uses Windows calls, but I
would imagine it does, and if so, you can't use it on anything but Windows
without emulating those calls, thus
fall colors, 28.02.2011 03:25:
> Stefan Behnel wrote:
Well, there's Wine, a free implementation of Windows for Unix systems. You
can either try to load the DLL using Wine and ctypes (I suspect that's the
hard way), or just run the Windows Python distribution through Wine and loa
fall colors, 27.02.2011 20:27:
I was wondering if it would be possible to convert a .pyd file that works on
Windows into a .so file that works on Linux?
I gather that it might not be possible to convert the .pyd file if the
underlying DLL file was built with Windows API calls (Swig was used to w
allan oware, 16.02.2011 09:20:
Alright,
Am stuck with xml.dom.minidom
Interesting. Why would that be the case?
, but is there correct usage for *Node.prettyxml()
*resulting in less junky newlines and spaces ?
i.e *from*
28.4258363792
-6.13557141177
Karim, 15.02.2011 17:24:
On 02/15/2011 02:48 PM, Stefan Behnel wrote:
allan oware, 15.02.2011 14:31:
Which python modules can one use to create nicely formatted xml documents ?
Depends on your exact needs, but xml.etree.ElementTree is usually a good
thing to use anyway. If you care about
allan oware, 15.02.2011 14:31:
Which python modules can one use to create nicely formatted xml documents ?
Depends on your exact needs, but xml.etree.ElementTree is usually a good
thing to use anyway. If you care about formatting (a.k.a. pretty printing),
look here:
http://effbot.org/zone/e
Eun Koo, 07.02.2011 20:45:
Hi I have a problem in JES getting a solution to a function. Is there a way you
guys can help?
If you can provide enough information for us to understand what your
problem is, we may be able to help you. It's a matter of politeness to help
us help you. The more wor
Alex Hall, 28.01.2011 14:25:
On 1/28/11, Stefan Behnel wrote:
Alex Hall, 28.01.2011 14:09:
On 1/28/11, Stefan Behnel wrote:
Alex Hall, 27.01.2011 23:23:
self.id=root.find("id").text
self.name=root.find("name).text
There's a findtext() method on Elements for this
Alex Hall, 28.01.2011 14:09:
On 1/28/11, Stefan Behnel wrote:
Alex Hall, 27.01.2011 23:23:
self.id=root.find("id").text
self.name=root.find("name).text
There's a findtext() method on Elements for this purpose.
I thought that was used to search for the text of an el
Hi,
since you said that you have it working already, here are just a few
comments on your code.
Alex Hall, 27.01.2011 23:23:
all=root.findall("list/result")
for i in all:
self.mylist.append(Obj().parse(i))
It's uncommon to use "i" for anything but integer loop variables. And 'all'
is not
Alex Hall, 27.01.2011 05:01:
How would I go about getting the xml from a website through the site's
api? The url does not end in .xml since the xml is generated based on
the parameters in the url. For example:
https://api.website.com/user/me/count/10?api_key=MY_KEY
would return ten results (the c
Wayne Werner, 15.01.2011 03:25:
On Fri, Jan 14, 2011 at 4:42 PM, Terry Carroll wrote:
On Fri, 14 Jan 2011, Karim wrote:
from xml.etree.ElementTree import ElementTree
I don't think straight XML parsing will work on this, as it's not valid
XML; it just looks XML-like enough to cause confusion.
Izz ad-Din Ruhulessin, 14.01.2011 19:49:
Thanks for your quick reply and clearing the issue up for me. Using your
answer, I rewrote the function to this:
double Py_GetAttr_DoubleFromFloat(PyObject *obj, const char *attr)
{
PyObject *get_attr, *py_float;
int has_attr;
//Check if the given
Izz ad-Din Ruhulessin, 14.01.2011 17:52:
I am writing a Python C extension and I have some trouble understanding how
reference counting works exactly. Though I think I understand the practice
on simple operations (see my question at stackoverflow:
http://stackoverflow.com/questions/4657764/py-inc
Terry Carroll, 14.01.2011 03:55:
Does anyone know of a module that can parse out text with XML-like tags as
in the example below? I emphasize the "-like" in "XML-like". I don't think
I can parse this as XML (can I?).
Sample text between the dashed lines::
-
Blah,
Karim, 10.01.2011 17:07:
I am not a beginner in Python language but I discovered a hidden property
of immutable elements as Numbers and Strings.
s ='xyz'
>>> t = str('xyz')
>>> id(s) == id(t)
True
Thus if I create 2 different instances of string if the string is
identical (numerically). I ge
Emile van Sebille, 10.01.2011 18:42:
On 1/10/2011 9:23 AM bob gailer said...
On 1/10/2011 11:51 AM, Emile van Sebille wrote:
well, not predictably unless you understand the specifics of the
implementation you're running under.
>>> from string import letters
>>> longstring = letters*100
>>> o
Peter Otten, 29.12.2010 13:45:
File "/usr/lib/pymodules/python2.6/BeautifulSoup.py", line 430, in encode
return self.decode().encode(encoding)
Wow, that's evil.
Stefan
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscrip
Frank Chang, 28.12.2010 22:35:
Good afternoon. I want to thank everyone who helped me fix the global
name 'levinshtein_automata' is not defined error.
When I run the Shedskin 0.7 Python to C+++ compiler on the
same python program, I receive the error message * Error *
automata_test.py
Abdulhakim Haliru, 28.12.2010 13:38:
I come from a Cakephp, zend framework angle cutting through ASP.net,VB and
C# at an intermediate level.
[...]
Is python really worth the pain or should I just skip it ?
Given that you already invested your time into learning all of the above
(which basicall
Logan McGrath, 24.12.2010 03:14:
Hi, I've just started using the Python C API for version 2.7.1, and I've
got a question!
How do you define a new type which inherits from multiple types?
You can do this for Python classes, but not for C implemented types (which
are single inheritance by desig
Karim, 22.12.2010 22:09:
Using lxml (except for the different import) will be fully compliant with
the ET code.
Do I have to adapt it?
There are certain differences.
http://codespeak.net/lxml/compatibility.html
This page hasn't been changed for ages, but it should still be mostly accurate.
Karim, 22.12.2010 19:28:
On 12/22/2010 07:07 PM, Karim wrote:
Is somebody has an example of the way to parse an xml file against a
"grammary" file.xsd.
I found this:
http://www.velocityreviews.com/forums/t695106-re-xml-parsing-with-python.html
Stefan is it still true the limitation of etree
Walter Prins, 21.12.2010 22:13:
On 21 December 2010 17:57, Alan Gauld wrote:
"Stefan Behnel" wrote
But I don't understand how uncompressing a file before parsing it can
be faster than parsing the original uncompressed file?
I didn't say "uncompressing a file *bef
David Hutto, 21.12.2010 16:11:
On Tue, Dec 21, 2010 at 10:03 AM, Stefan Behnel wrote:
I meant
uncompressing the data *while* parsing it. Just like you have to decode it
for parsing, it's just an additional step to decompress it before decoding.
Depending on the performance relation betwee
Alan Gauld, 21.12.2010 15:11:
"Stefan Behnel" wrote
And I thought a 1G file was extreme... Do these people stop to think that
with XML as much as 80% of their "data" is just description (ie the tags).
As I already said, it compresses well. In run-length compressed XML
David Hutto, 21.12.2010 13:09:
On Tue, Dec 21, 2010 at 6:59 AM, Stefan Behnel wrote:
David Hutto, 21.12.2010 12:45:
If file a.xml has simple tagged xml like, and file b.config has
tags that represent the a.xml(i.e.=) as greater tags,
does this pattern optimize the process by limiting the
David Hutto, 21.12.2010 12:45:
If file a.xml has simple tagged xml like, and file b.config has
tags that represent the a.xml(i.e. =) as greater tags,
does this pattern optimize the process by limiting the size of the
tags to be parsed in the xml, then converting those simpler tags that
are found
David Hutto, 21.12.2010 12:02:
On Tue, Dec 21, 2010 at 5:45 AM, Alan Gauld wrote:
8 bytes to describe an int which could be represented in
a single byte in binary (or even in CSV).
Well, "CSV" indicates that there's at least one separator character
involved, so make that an asymptotic 2 bytes
1 - 100 of 224 matches
Mail list logo