Johannes Bauer wrote:
> when I read in a XML document with the xml.dom.minidom parser and write
> it out again, an attribute is lost:
>
> Input:
>
>
> [...]
>
> Output:
>
>
> How can I fix this?
You don't have to. UTF-8 is the default encoding, so the two lines above
are equivalent.
Stefan
Chris Seberino wrote:
> How build new elements to replace existing ones using xml.dom.minidom?
>
> Specifically, I have an HTML table of numbers. I want to replace
> those numbers with hyperlinks to create a table of hyperlinks.
>
> So I need to build hyperlinks (a elements) with href attribute
Hendrik van Rooyen wrote:
Ken Seehart wrote:
8< implementation --
The practical constraints of my specific application are:
1. The rpc server is a highly specialized slave system that does heavy duty
work.
2. The rpc client is itself a web server that dispatch
Chris Rebert rebertia.com> writes:
>
> On Wed, Jun 10, 2009 at 8:11 PM, higer gmail.com> wrote:
> > I just want to compare two files,one from windows and the other from
> > unix. But I do not want to compare them through reading them line by
> > line. Then I found there is a filecmp module which
Nick Matzke berkeley.edu> writes:
>
>
> Looks like this was a solution:
>
> 1. Use this guy's unescape function to convert from HTML/XML Entities to
> unicode
> http://effbot.org/zone/re-sub.htm#unescape-html
Looks like you didn't notice "this guy"'s unaccent.py :-)
http://effbot.org/zone/un
On Thu, Jun 11, 2009 at 12:03 AM, David M. Wilson wrote:
[snip]
> I found my answer: Python 2.6 introduces heap.merge(), which is
> designed exactly for this.
Thanks, I knew Raymond added something like that but I couldn't find
it in itertools.
That said .. it doesn't help. Aside, heapq.merge fit
On Jun 10, 2009, at 10:38 PM, Karl Jansson wrote:
Hi,
I was doing the tutorial at http://www.python.org/doc/current/tutorial/
, and I came across some code that did not work, and I got the
following error: AttributeError: 'str' object has no attribute
'format'.
So I downloaded a .dmg
Hi,
I have been studying python metaclasses for a few days now and I believe that
slowly but surely I am grasping the subject. The best article I have found on
this is "Metaclass Demystified", by J. LaCour, Python Magazine, July 2008
(http://cleverdevil.org/computing/78/).
I replicated the ar
On Jun 10, 7:05 pm, Chris Rebert wrote:
> On Wed, Jun 10, 2009 at 5:53 PM, Mensanator wrote:
> > On Jun 10, 5:24 pm, David Wilson wrote:
> >> Hi,
>
> >> During a fun coding session yesterday, I came across a problem that I
> >> thought was already solved by itertools, but on investigation it seem
On Jun 10, 11:24 pm, David Wilson wrote:
> Hi,
>
> During a fun coding session yesterday, I came across a problem that I
> thought was already solved by itertools, but on investigation it seems
> it isn't.
>
> The problem is simple: given one or more ordered sequences, return
> only the objects th
On Jun 11, 12:59 am, Jack Diederich wrote:
> On Wed, Jun 10, 2009 at 6:24 PM, David Wilson wrote:
> > During a fun coding session yesterday, I came across a problem that I
> > thought was already solved by itertools, but on investigation it seems
> > it isn't.
>
> > The problem is simple: given on
On Wed, Jun 10, 2009 at 8:11 PM, higer wrote:
> I just want to compare two files,one from windows and the other from
> unix. But I do not want to compare them through reading them line by
> line. Then I found there is a filecmp module which is used as file and
> directory comparisons. However,when
I just want to compare two files,one from windows and the other from
unix. But I do not want to compare them through reading them line by
line. Then I found there is a filecmp module which is used as file and
directory comparisons. However,when I use two same files (one from
unix,one from windows,t
Hi,
I was doing the tutorial at http://www.python.org/doc/current/
tutorial/, and I came across some code that did not work, and I got
the following error: AttributeError: 'str' object has no attribute
'format'.
So I downloaded a .dmg of python 2.6.2 and then I installed it. But
it's
On Jun 11, 3:05 am, Chris Rebert wrote:
> On Wed, Jun 10, 2009 at 5:53 PM, Mensanator wrote:
> > On Jun 10, 5:24 pm, David Wilson wrote:
> >> Hi,
>
> >> During a fun coding session yesterday, I came across a problem that I
> >> thought was already solved by itertools, but on investigation it seem
Looks like this was a solution:
1. Use this guy's unescape function to convert from HTML/XML Entities to
unicode
http://effbot.org/zone/re-sub.htm#unescape-html
2. Take the unicode and convert to approximate plain ASCII matches with
unicodedata (after import unicodedata)
ascii_content2 =
Thanks a lot.
在2009-06-11,"Chris Rebert" 写道:
On Wed, Jun 10, 2009 at 7:25 AM, Metal Zong wrote:
> Hello,
>
> Can not dump class object created on runtime.
>
> Is there anybody can help me? Thank.
>
> Following is testing code:
>
> import pickle
> from new import classobj
>
> class A:
> def
On Wed, 10 Jun 2009 15:32:05 -0500, Robert Kern wrote:
> That's a fair point. However, one issue that hasn't been brought up is
> that it might be confusing to a user why random.random() returns values
> in a half-open interval while random.uniform() claims a closed interval.
> Even for reasonably
On Wed, Jun 10, 2009 at 5:53 PM, Mensanator wrote:
> On Jun 10, 5:24 pm, David Wilson wrote:
>> Hi,
>>
>> During a fun coding session yesterday, I came across a problem that I
>> thought was already solved by itertools, but on investigation it seems
>> it isn't.
>>
>> The problem is simple: given
thanks,
I use gdb to debug, and cant find any symbol in the stack.
I wanna to exit from outside python, without tell anything to the
interpreator,
but it seems impossible
"Floris Bruynooghe"
:6deac4c8-b208-4fbf-8098-8dc7af7f8...@r34g2000vba.googlegroups.com...
On Jun 9, 6:50 am, "myopc" wro
On Jun 10, 5:24 pm, David Wilson wrote:
> Hi,
>
> During a fun coding session yesterday, I came across a problem that I
> thought was already solved by itertools, but on investigation it seems
> it isn't.
>
> The problem is simple: given one or more ordered sequences, return
> only the objects tha
Apologies, I figured there was some easy, obvious solution, since there
is in BBedit. I will explain further...
John Machin wrote:
On Jun 11, 6:09 am, Nick Matzke wrote:
Hi all,
So I'm parsing an XML file returned from a database. However, the
database entries have occasional non-ASCII cha
Jeff M. wrote:
On Jun 9, 9:08 pm, Arved Sandstrom wrote:
Jon Harrop wrote:
Arved Sandstrom wrote:
Jon, I do concurrent programming all the time, as do most of my peers.
Way down on the list of why we do it is the reduction of latency.
What is higher on the list?
Correctness.
IMO, that re
Jon Harrop wrote:
Arved Sandstrom wrote:
Jon Harrop wrote:
Arved Sandstrom wrote:
Jon Harrop wrote:
No. Concurrent programming is about interleaving computations in order
to reduce latency. Nothing to do with parallelism.
Jon, I do concurrent programming all the time, as do most of my peers.
On Wed, Jun 10, 2009 at 6:24 PM, David Wilson wrote:
> During a fun coding session yesterday, I came across a problem that I
> thought was already solved by itertools, but on investigation it seems
> it isn't.
>
> The problem is simple: given one or more ordered sequences, return
> only the objects
On 2009-06-10 16:47, Mark Dickinson wrote:
And of course I'm wrong. I shouldn't have said *never*, above:
from random import uniform
uniform(-1e308, 1e308)
inf
:-(
Somehow this doesn't seem worth either fixing or documenting, though.
Agreed.
--
Robert Kern
"I have come to believe that
On Wed, Jun 10, 2009 at 12:01 PM, Matt Burson wrote:
> Is there a way to reproduce the behavior of IDLE's restart shell ability by
> using a function? I thought there would be since you can exit python by
> executing the simple quit() function I thought there would be an equally
> simple function n
On Wed, Jun 10, 2009 at 7:25 AM, Metal Zong wrote:
> Hello,
>
> Can not dump class object created on runtime.
>
> Is there anybody can help me? Thank.
>
> Following is testing code:
>
> import pickle
> from new import classobj
>
> class A:
> def __str__(self):
> return self.__class__.na
How build new elements to replace existing ones using xml.dom.minidom?
Specifically, I have an HTML table of numbers. I want to replace
those numbers with hyperlinks to create a table of hyperlinks.
So I need to build hyperlinks (a elements) with href attribute and
replace the text elements (num
On Tue, 9 Jun 2009 12:22:20 -0400, David Shapiro wrote:
> I have been trying to find an example of how to deal with options
> that have spaces in them. I am using jython, which is the same I
> think as python 2.2.3. I feebly tried to use optparse and argparse
> with no success (got gettext, loca
Hi,
During a fun coding session yesterday, I came across a problem that I
thought was already solved by itertools, but on investigation it seems
it isn't.
The problem is simple: given one or more ordered sequences, return
only the objects that appear in each sequence, without reading the
whole se
On Tue, 9 Jun 2009 18:10:18 +0100, A. Cavallo wrote:
[top-posting fixed]
> On Tuesday 09 June 2009 16:57:00 kretel wrote:
>> Hi All,
>>
>> I am trying to implement the following functionality:
>> 1. log messages to the flash drive
>> 2. if the flash drive is not available, switch handler to the
On Jun 11, 6:09 am, Nick Matzke wrote:
> Hi all,
>
> So I'm parsing an XML file returned from a database. However, the
> database entries have occasional non-ASCII characters, and this is
> crashing my parsers.
So fix your parsers. google("unicode"). Deleting stuff that you don't
understand is a
Johannes Bauer wrote:
> Martin v. Löwis schrieb:
>>> What can I do about that?
>> Remove the non-ASCII characters from db.h.
>
> Ehh...
>
> $ find -type f | grep -i db.h
> ./Modules/unicodename_db.h
> ./Modules/unicodedata_db.h
> ./Objects/unicodetype_db.h
>
> There's no db.h file in the Python-
Terry Reedy wrote:
> Str.join takes any iterable of strings and constructs a string. Only
> str knows how to do that, though it could have a built-in that called a
> hypothetical .__join__ method. However, Python started with just one
> string type and there does not seem much use for joining an
Robert Kern wrote:
> On 2009-06-10 15:54, Mark Dickinson wrote:
>> [...] I'm not sure I'm capable of coming up with extra wording
>> for the docs that won't just cause more confusion, so I'll leave that
>> to someone else.
>
> I did make a concrete suggestion.
Yes, you did. Thank you. Submitte
On Jun 9, 2:33 pm, Esmail wrote:
> Hi,
>
> random.random() will generate a random value in the range [0, 1).
>
> Is there an easy way to generate random values in the range [0, 1]?
> I.e., including 1?
>
> I am implementing an algorithm and want to stay as true to the
> original design specificati
Martin v. Löwis schrieb:
>> What can I do about that?
>
> Remove the non-ASCII characters from db.h.
Ehh...
$ find -type f | grep -i db.h
./Modules/unicodename_db.h
./Modules/unicodedata_db.h
./Objects/unicodetype_db.h
There's no db.h file in the Python-3.1rc1 distribution. The ones above
conta
On May 7, 10:27 pm, oyster wrote:
> I mean chart, not plot. If you don't know the difference, you can
> checkwww.advsofteng.com, which is a commercial program
>
> is there such a thing with many kinds ofchart, i.e. pie-chart,
> line-chart, ..?
>
> A long time ago, I programmed a rmchart interf
On 2009-06-10 15:54, Mark Dickinson wrote:
Robert Kern wrote:
On 2009-06-10 14:46, Mark Dickinson wrote:
On Jun 10, 8:15 pm, Robert Kern wrote:
On 2009-06-10 13:53, Terry Reedy wrote:
A full technical discussion does not below in the docs, in my opinion. A
wike article would be fine.
True
Robert Kern wrote:
> On 2009-06-10 14:46, Mark Dickinson wrote:
>> On Jun 10, 8:15 pm, Robert Kern wrote:
>>> On 2009-06-10 13:53, Terry Reedy wrote:
A full technical discussion does not below in the docs, in my opinion. A
wike article would be fine.
>>> True. However, a brief note that
Nick Matzke wrote:
Hi all,
So I'm parsing an XML file returned from a database. However, the
database entries have occasional non-ASCII characters, and this is
crashing my parsers.
Is there some handy function out there that will schlep through a file
like this, and do something like fix t
On 2009-06-10 15:32, Robert Kern wrote:
On 2009-06-10 14:46, Mark Dickinson wrote:
But I don't know why it would be useful to know that endpoints *are*
sometimes
included, without knowing exactly when.
That's a fair point. However, one issue that hasn't been brought up is
that it might be co
2009/6/10 Nick Matzke :
> Hi all,
>
> So I'm parsing an XML file returned from a database. However, the database
> entries have occasional non-ASCII characters, and this is crashing my
> parsers.
>
> Is there some handy function out there that will schlep through a file like
> this, and do somethi
Manavan wrote:
Hello everyone,
Since the real world objects often needs to be deleted even if they
have some reference from some other object, I am going to use this
approach to better model this situation, by cleaning up the attributes
and assigning self.__class__ to a different class.
Any c
On 2009-06-10 14:46, Mark Dickinson wrote:
On Jun 10, 8:15 pm, Robert Kern wrote:
On 2009-06-10 13:53, Terry Reedy wrote:
A full technical discussion does not below in the docs, in my opinion. A
wike article would be fine.
True. However, a brief note that "Due to floating point arithmetic, fo
Amit Dor-Shifer wrote:
Hi all.
I'd like to print-out a dictionary of objects. The printed values are
references. How Do I print the actual objects.
You can only print string representations, as defined by
type(ob).__str__ and type(ob).__repr__.
class MyClass:
def __str__(self):
Hi all,
So I'm parsing an XML file returned from a database. However, the
database entries have occasional non-ASCII characters, and this is
crashing my parsers.
Is there some handy function out there that will schlep through a file
like this, and do something like fix the characters that i
> What can I do about that?
Remove the non-ASCII characters from db.h.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
Important correction noted. But how did you find those? When I search
for 'Shaw' with the search box (I tried it again), I only get a couple
of other, irrelevant hits. Is the search box buggy?
I suspect so. I knew of most of them already, and Googling
site:pypi.python.org p
On Jun 10, 8:15 pm, Robert Kern wrote:
> On 2009-06-10 13:53, Terry Reedy wrote:
> > A full technical discussion does not below in the docs, in my opinion. A
> > wike article would be fine.
>
> True. However, a brief note that "Due to floating point arithmetic, for some
> values of a and b, b may
Never mind, its just that the "choose file" option produces a file path with
'/" rather than '\', and python cannot use the former.
Thanks anyway
- Original Message -
From: jcher...@gatech.edu
To: python-list@python.org
Sent: Wednesday, June 10, 2009 2:22:22 PM GMT -05:00 US/Canada Eastern
Hello everyone,
Since the real world objects often needs to be deleted even if they
have some reference from some other object, I am going to use this
approach to better model this situation, by cleaning up the attributes
and assigning self.__class__ to a different class.
Any comment on this ap
Carl Banks wrote:
Sometimes alternate constructors are needed when there is more than one
possible way to create an instance from a given input. In the case of
str(iterable), one could want either a string representing the iterable
itself, just as with non-iterables, or a string representing th
On 2009-06-10 13:53, Terry Reedy wrote:
Mensanator wrote:
So, the 2.6.2 documentation is STILL wrong. Before it implied
it was ALWAYS a semi-open interval, and now it says it's ALWAYS
a closed interval. But neither is correct.
If a < x < b is true, then a <= x <= b is true.
But docs say that
On Jun 10, 6:57 pm, Mensanator wrote:
> On Jun 10, 12:37 pm, Mark Dickinson wrote:
>
> > On Jun 10, 6:21 pm, Mensanator wrote:
>
> > > So, the 2.6.2 documentation is STILL wrong. Before it implied
> > > it was ALWAYS a semi-open interval, and now it says it's ALWAYS
> > > a closed interval. But
Is there a way to reproduce the behavior of IDLE's restart shell ability by
using a function? I thought there would be since you can exit python by
executing the simple quit() function I thought there would be an equally
simple function name something like restart(). I'd prefer something like
this
I have python 3.0.1, and have downloaded pywin32 for python 3.x, aka build #213.
I ran win32com.client.makepy.py on Microsoft Office 12.0 Object Library and
Microsoft PowerPoint 12.0 Object Library. The output files were placed in
win32com.gen_py. I renamed them as MSO.py and MSPPT.py, respecti
Mensanator wrote:
So, the 2.6.2 documentation is STILL wrong. Before it implied
it was ALWAYS a semi-open interval, and now it says it's ALWAYS
a closed interval. But neither is correct.
If a < x < b is true, then a <= x <= b is true.
But docs say that in general end point values might happen.
On 2009-06-09 19:27, Mensanator wrote:
On Jun 9, 6:12 pm, Robert Kern wrote:
On 2009-06-09 18:05, Mensanator wrote:
On Jun 9, 4:33 pm, Esmailwrote:
Hi,
random.random() will generate a random value in the range [0, 1).
Is there an easy way to generate random values in the range [0, 1]
Jeff M. wrote:
On Jun 9, 9:08 pm, Arved Sandstrom wrote:
Jon Harrop wrote:
Arved Sandstrom wrote:
Jon, I do concurrent programming all the time, as do most of my peers.
Way down on the list of why we do it is the reduction of latency.
What is higher on the list?
Correctness.
IMO, that re
On Jun 10, 12:49 pm, Seamus MacRae wrote:
> Jeff M. wrote:
> > On Jun 9, 9:08 pm, Arved Sandstrom wrote:
> >> Jon Harrop wrote:
> >>> Arved Sandstrom wrote:
> Jon, I do concurrent programming all the time, as do most of my peers.
> Way down on the list of why we do it is the reduction o
On Jun 10, 12:37 pm, Mark Dickinson wrote:
> On Jun 10, 6:21 pm, Mensanator wrote:
>
> > So, the 2.6.2 documentation is STILL wrong. Before it implied
> > it was ALWAYS a semi-open interval, and now it says it's ALWAYS
> > a closed interval. But neither is correct.
>
> Exactly which bit of the 2.
Jeff M. wrote:
On Jun 9, 9:08 pm, Arved Sandstrom wrote:
Jon Harrop wrote:
Arved Sandstrom wrote:
Jon, I do concurrent programming all the time, as do most of my peers.
Way down on the list of why we do it is the reduction of latency.
What is higher on the list?
Correctness.
IMO, that res
On Jun 10, 10:01 am, Jeff McNeil wrote:
> On Jun 10, 10:26 am, Sparky wrote:
>
>
>
> > Hey! I am developing a small application that tests multiple websites
> > and compares their "response time". Some of these sites do not respond
> > to a ping and, for the measurement to be standardized, all si
On Jun 10, 6:21 pm, Mensanator wrote:
> So, the 2.6.2 documentation is STILL wrong. Before it implied
> it was ALWAYS a semi-open interval, and now it says it's ALWAYS
> a closed interval. But neither is correct.
Exactly which bit of the 2.6.2 documentation do you think is
incorrect? The documen
>
> If what you're interested in is to get real work done, why decide to
> make XML a showstopper?
>
> I see two tasks: (a) transforming a text file description of a sprinkler
> system into a Python data structure, and (b) implementing algorithms
> to find out important stuff about such a data st
On Jun 10, 4:01 am, Mark Dickinson wrote:
> On Jun 10, 7:25 am, John Yeung wrote:
>
>
>
>
>
> > On Jun 10, 1:52 am, Steven D'Aprano
>
> > wrote:
> > > On Tue, 09 Jun 2009 22:21:26 -0700, John Yeung wrote:
> > > > Therefore, to me the most up-to-date docs (which say
> > > > that uniform(a, b) ret
William Purcell wrote:
Scott David Daniels wrote:
William Purcell wrote:
I am writing a application to calculate pressure drop for a piping
network. Namely a building sprinkler system. This will be a
command line program at first with the system described in xml
If you are going to be do
Maybe a using a Unicode equiv of # would do the trick.
-Original Message-
From: python-list-bounces+david.shapiro=sas@python.org
[mailto:python-list-bounces+david.shapiro=sas@python.org] On Behalf Of
Peter Otten
Sent: Wednesday, June 10, 2009 11:32 AM
To: python-list@python.org
S
Scott David Daniels wrote:
> William Purcell wrote:
>> I am writing a application to calculate pressure drop for a piping
>> network. Namely a building sprinkler system. This will be a
>> command line program at first with the system described in xml
>
> If you are going to be doing a lot of
On Wed, 10 Jun 2009 08:57:42 -0500, William Purcell wrote:
...
> I am writing a application to calculate pressure drop for a piping
> network. Namely a building sprinkler system. This will be a
> command line program at first with the system described in xml (at
> least that is how I think I wan
William Purcell wrote:
I am writing a application to calculate pressure drop for a piping
network. Namely a building sprinkler system. This will be a
command line program at first with the system described in xml
If you are going to be doing a lot of tree walking, try etree.
Simple exampl
On Mon, 8 Jun 2009 07:49:42 -0700 (PDT), youssef_edward3...@yahoo.com
wrote:
> Roles and Responsibilities :
>
> The primary role of a Computer Programmer is to write programs
> according to the instructions determined primarily by computer
> software engineers and systems analysts.
I hope this i
Diez B. Roggisch wrote:
> William Purcell wrote:
>
>> I am writing a application to calculate pressure drop for a piping
>> network. Namely a building sprinkler system. This will be a
>> command line program at first with the system described in xml (at
>> least that is how I think I want to do
QOTW: "Most power systems math can be summed this way: take a really big
number and multiply by the square root of two." - iceowl
http://everything2.com/index.pl?node_id=1348321
The chuzer project provides a means for severely disabled people to
express their most basic needs
On Jun 10, 10:26 am, Sparky wrote:
> Hey! I am developing a small application that tests multiple websites
> and compares their "response time". Some of these sites do not respond
> to a ping and, for the measurement to be standardized, all sites must
> have the same action preformed upon them. An
William Purcell wrote:
> I am writing a application to calculate pressure drop for a piping
> network. Namely a building sprinkler system. This will be a
> command line program at first with the system described in xml (at
> least that is how I think I want to do it).
>
> An important part of t
504cr...@gmail.com wrote:
> I've encountered a problem with my RegEx learning curve -- how to
> escape hash characters # in strings being matched, e.g.:
>
string = re.escape('123#abc456')
match = re.match('\d+', string)
print match
>
> <_sre.SRE_Match object at 0x00A6A800>
pr
Sparky wrote:
> Hey! I am developing a small application that tests multiple websites
> and compares their "response time". Some of these sites do not respond
> to a ping and, for the measurement to be standardized, all sites must
> have the same action preformed upon them. Another problem is that
Jon Harrop writes:
> > I'm not being facetious. I write applications that run on application
> > servers, and from time to time I have had to write various special
> > purpose servers. This kind of programming is all about managing
> > concurrent execution of computations. The overarching concern
Ulrich Eckhardt wrote:
I need to pack a floating point value into a vector of 32-bit unsigned
values in IEEE format. Further, I maintain a CRC32 checksum for integrity
checking. For the latter, I actually need the float as integral value.
What I currently do is ... pack and unpack the float usin
504cr...@gmail.com wrote:
> I wonder if you (or anyone else) might attempt a different explanation
> for the use of the special sequence '\1' in the RegEx syntax.
>
> The Python documentation explains:
>
> \number
> Matches the contents of the group of the same number. Groups are
> numbered
On Jun 10, 10:19 am, Amit Dor-Shifer wrote:
> Hi all.
>
> I'd like to print-out a dictionary of objects. The printed values are
> references. How Do I print the actual objects.
>
> class MyClass:
> def __str__(self):
> return str(self.__dict__)
>
> if __name__ == '__main__':
> dict
Amit Dor-Shifer wrote:
> Hi all.
>
> I'd like to print-out a dictionary of objects. The printed values are
> references. How Do I print the actual objects.
>
> Thanks,
> Amit
How about this:
class MyClass:
def __str__(self):
return str(self.__dict__)
def __repr__(self):
"Jeff M." writes:
> On Jun 9, 9:08 pm, Arved Sandstrom wrote:
>> Jon Harrop wrote:
>> >
>> > Arved Sandstrom wrote:
>> >>
>> >> Jon, I do concurrent programming all the time, as do most of my peers.
>> >> Way down on the list of why we do it is the reduction of latency.
>>
>> > What is higher on
John Machin wrote:
On Jun 10, 9:01 pm, dmitrey wrote:
hi all,
what is easiest way to check python version (to obtain values like
2.4, 2.5, 2.6, 3.0 etc) from Python env?
...
"easiest" depends on purpose; e.g. version for display or for logging
exactly what the customer is running. version_in
On Jun 9, 9:08 pm, Arved Sandstrom wrote:
> Jon Harrop wrote:
> >
> > Arved Sandstrom wrote:
> >>
> >> Jon, I do concurrent programming all the time, as do most of my peers.
> >> Way down on the list of why we do it is the reduction of latency.
>
> > What is higher on the list?
>
> Correctness.
>
Hi all.
I'd like to print-out a dictionary of objects. The printed values are
references. How Do I print the actual objects.
class MyClass:
def __str__(self):
return str(self.__dict__)
if __name__ == '__main__':
dict = dict()
classA = MyClass()
setattr(classA, "attr-1", "
I've encountered a problem with my RegEx learning curve -- how to
escape hash characters # in strings being matched, e.g.:
>>> string = re.escape('123#abc456')
>>> match = re.match('\d+', string)
>>> print match
<_sre.SRE_Match object at 0x00A6A800>
>>> print match.group()
123
The correct resul
William Purcell wrote:
> I am writing a application to calculate pressure drop for a piping
> network. Namely a building sprinkler system. This will be a
> command line program at first with the system described in xml (at
> least that is how I think I want to do it).
>
> An important part of t
Ken Seehart wrote:
8< implementation --
>The practical constraints of my specific application are:
>1. The rpc server is a highly specialized slave system that does heavy duty
work.
>2. The rpc client is itself a web server that dispatches work requests to the
rpc serve
Not al pages suppost GET. If a page pings and returns does not mean it can be
logged into and work (maybe database down). Have you seen soapui?
- Original Message -
From: python-list-bounces+david.shapiro=sas@python.org
To: python-list@python.org
Sent: Wed Jun 10 10:26:22 2009
S
Hello,
Can not dump class object created on runtime.
Is there anybody can help me? Thank.
Following is testing code:
import pickle
from new import classobj
class A:
def __str__(self):
return self.__class__.name
if __name__ == "__main__":
c = classobj('B', (A, ), {}) # crea
On Jun 10, 5:17 am, Paul McGuire wrote:
> On Jun 9, 11:13 pm, "504cr...@gmail.com" <504cr...@gmail.com> wrote:
>
> > By what method would a string be inserted at each instance of a RegEx
> > match?
>
> Some might say that using a parsing library for this problem is
> overkill, but let me just put
Arved Sandstrom wrote:
> Jon Harrop wrote:
>> Arved Sandstrom wrote:
>>> Jon Harrop wrote:
No. Concurrent programming is about interleaving computations in order
to reduce latency. Nothing to do with parallelism.
>>>
>>> Jon, I do concurrent programming all the time, as do most of my peer
On Jun 10, 5:17 am, Paul McGuire wrote:
> On Jun 9, 11:13 pm, "504cr...@gmail.com" <504cr...@gmail.com> wrote:
>
> > By what method would a string be inserted at each instance of a RegEx
> > match?
>
> Some might say that using a parsing library for this problem is
> overkill, but let me just put
Ulrich Eckhardt wrote:
> I need to pack a floating point value into a vector of 32-bit unsigned
> values in IEEE format. Further, I maintain a CRC32 checksum for integrity
> checking. For the latter, I actually need the float as integral value.
>
> What I currently do is this:
>
> tmp = struct
Hey! I am developing a small application that tests multiple websites
and compares their "response time". Some of these sites do not respond
to a ping and, for the measurement to be standardized, all sites must
have the same action preformed upon them. Another problem is that not
all of the sites h
Ulrich Eckhardt wrote:
> Hi!
>
> I need to pack a floating point value into a vector of 32-bit unsigned
> values in IEEE format. Further, I maintain a CRC32 checksum for integrity
> checking. For the latter, I actually need the float as integral value.
>
> [...]
You could try using frexp to ext
1 - 100 of 128 matches
Mail list logo