On Jun 12, 11:28 am, Chris Rebert wrote:
> On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote:
> > I am new to python
> > I have written the following program in python.It is the solution of
> > problem ETF in SPOJ.
>
> > #Euler Totient Function
>
> > from math import sqrt
> > def etf(n):
> >
On Jun 12, 11:28 am, Chris Rebert wrote:
> On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote:
> > I am new to python
> > I have written the following program in python.It is the solution of
> > problem ETF in SPOJ.
>
> > #Euler Totient Function
>
> > from math import sqrt
> > def etf(n):
> >
On Jun 12, 3:35 pm, Dennis Lee Bieber wrote:
> On Thu, 11 Jun 2009 08:44:24 -0500, "Strax-Haber, Matthew (LARC-D320)"
> declaimed the following in
> gmane.comp.python.general:
>
> > I sent this to the Tutor mailing list and did not receive a response.
> > Perhaps one of you might be able to offer
On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote:
> I am new to python
> I have written the following program in python.It is the solution of
> problem ETF in SPOJ.
>
>
> #Euler Totient Function
>
> from math import sqrt
> def etf(n):
> i,res =2,n
> while(i*i<=n):
> if(n%i==0):
>
I am new to python
I have written the following program in python.It is the solution of
problem ETF in SPOJ.
#Euler Totient Function
from math import sqrt
def etf(n):
i,res =2,n
while(i*i<=n):
if(n%i==0):
res-=res/i
while(n%i==0):
n/=i
i+=1
Thanks for the additional info! I had no idea this was an old Windows
problem... I'm using Windows XP and I'm up-to-date on all my patches.
The good news is I can invoke the script correctly now, thanks to your
help!
On Jun 11, 4:25 pm, Tim Harig wrote:
> On 2009-06-11, Tim Harig wrote:
>
> >
On Thu, 11 Jun 2009 18:54:56 -0700 (PDT)
Oni wrote:
> Managed to get a dictionary to sort on multiple columns using a tuple
> to set the sort order (see below). However how can I control that
> column "date" orders descending and the column "name" orders
> ascending.
...
> bob = entries
> bob.sor
On Jun 11, 9:41 pm, "Mark Tolonen" wrote:
> "meryl" wrote in message
>
> news:2d4d8624-043b-4f5f-ae2d-bf73bca3d...@p6g2000pre.googlegroups.com...
>
>
>
>
>
> > Hi,
>
> > I have this regular expression
> > blockRE = re.compile(".*RenderBlock {\w+}")
>
> > it works if my source is "RenderBlock {CEN
Johannes Bauer wrote:
> Stefan Behnel schrieb:
>
>>> So I need to build hyperlinks (a elements) with href attribute and
>>> replace the text elements (numbers) somehow.
>> Try lxml.html instead. It makes it really easy to do these things. For
>> example, you can use XPath to find all table cells t
"Oni" wrote in message
news:018f4fa2-7203-4c98-a313-da5584976...@z20g2000prh.googlegroups.com...
Managed to get a dictionary to sort on multiple columns using a tuple
to set the sort order (see below). However how can I control that
column "date" orders descending and the column "name" orders
On Jun 11, 10:30 pm, meryl wrote:
> Hi,
>
> I have this regular expression
> blockRE = re.compile(".*RenderBlock {\w+}")
>
> it works if my source is "RenderBlock {CENTER}".
>
> But I want it to work with
> 1. RenderTable {TABLE}
>
> So i change the regexp to re.compile(".*Render[Block|Table] {\w+
"meryl" wrote in message
news:2d4d8624-043b-4f5f-ae2d-bf73bca3d...@p6g2000pre.googlegroups.com...
Hi,
I have this regular expression
blockRE = re.compile(".*RenderBlock {\w+}")
it works if my source is "RenderBlock {CENTER}".
But I want it to work with
1. RenderTable {TABLE}
So i change the
On Jun 12, 1:56 pm, lucius wrote:
> w, h, absX, absY = result.group(3), result.group(4), result.group
> (5), result.group(6)
>
> w = 100
> h = 200
>
> absX = 10.0
> absY = 20.0
Are you sure those values are ints & floats? I would expect your
regexp would be returning strings...
Try replacing th
I am trying to
print some values to a file (using c's printf like method).
TypeError: int argument required
# this works, i see value on screen
print w, h, absX, absY
# where result is the return value of my regular expression.
w, h, absX, absY = result.group(3), result.group(4), result.group
Hi,
I have this regular expression
blockRE = re.compile(".*RenderBlock {\w+}")
it works if my source is "RenderBlock {CENTER}".
But I want it to work with
1. RenderTable {TABLE}
So i change the regexp to re.compile(".*Render[Block|Table] {\w+}"),
but that breaks everything
2. RenderBlock (CENT
Hi,
Please consider this example:
#!/usr/bin/env python
import apsw
import tempfile
fh = tempfile.NamedTemporaryFile()
conn = apsw.Connection(fh.name)
# Fill the db with some data
cur = conn.cursor()
datafh = open("/dev/urandom", "rb")
cur.execute("CREATE TABLE foo (no INT, data BLOB)")
for i
hi *Tim Janick,*
I encountered same problem, did you ever get some resolution?
Brent Jiang,
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, this is what I needed
On Jun 11, 9:40 pm, Ulrich Eckhardt wrote:
> casebash wrote:
> > I know the bin function converts an int into a binary string.
>
> Binary string sounds ambiguous. Firstly, everything is binary. Secondly,
> strings are byte strings or Unicode strings. In any case, I'm
Managed to get a dictionary to sort on multiple columns using a tuple
to set the sort order (see below). However how can I control that
column "date" orders descending and the column "name" orders
ascending.
Thanks
import datetime
import pprint
import operator
faUserFormInput = {'DDPageSortOrder
> > >event_timestamp = (2009, 06, 04, 05, 02, 03)
> > >(year, month, day, hour, minute, second) = event_timestamp
> >
> > [...]
>
> The point of each position having a different semantic meaning is that
> tuple unpacking works as above. You need to know the meaning of each
> position in ord
On Thu, Jun 11, 2009 at 2:33 PM, tanner barnes wrote:
> could some one explain this error to me and possibly how to fix it?
>
> Traceback (most recent call last):
> File "C:\Users\brandon\workspace\tanner's workshop\tanner's
> workshop\src\WxGlade.py", line 458, in
> Edit = MyDialog2(None, -
Gunter Henriksen writes:
> > Try, then, this tuple:
> >
> >event_timestamp = (2009, 06, 04, 05, 02, 03)
> >(year, month, day, hour, minute, second) = event_timestamp
>
> I totally agree about anything to do with immutability, I think the
> relative ordering of the elements in this exampl
> Try, then, this tuple:
>
>event_timestamp = (2009, 06, 04, 05, 02, 03)
>(year, month, day, hour, minute, second) = event_timestamp
>
> A list would be wrong for this value, because each position in the
> sequence has a specific meaning beyond its mere sequential position. Yet
> it also ma
On 2009-06-11, Tim Harig wrote:
> On 2009-06-11, lynvie wrote:
>> I have a very simple program from the first chapter of a book on
>> python 3 (I'm a novice). I called the program tmp.py and the data
>> input file is sum.dat (just a list of numbers, 1 per line). When I
>> type into my command she
On 2009-06-11, lynvie wrote:
> I have a very simple program from the first chapter of a book on
> python 3 (I'm a novice). I called the program tmp.py and the data
> input file is sum.dat (just a list of numbers, 1 per line). When I
> type into my command shell "tmp.py < sum.dat" I get an error fr
Stefan Behnel schrieb:
>> So I need to build hyperlinks (a elements) with href attribute and
>> replace the text elements (numbers) somehow.
>
> Try lxml.html instead. It makes it really easy to do these things. For
> example, you can use XPath to find all table cells that contain numbers:
>
>
On Jun 11, 2:01 pm, Robert Kern wrote:
> On 2009-06-11 14:56, Captain___nemo wrote:
> > Please advice me very simple implementation of voronoi diagram (given
> > coordinates). Please advice me simple python code preferably without-
> > hash, multi-threading, Delaunay Traingulation,
>
> You can't r
On Jun 11, 1:54 pm, Terry Reedy wrote:
> Jack Diederich wrote:
> > 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 c
David Robinow schrieb:
> On Thu, Jun 11, 2009 at 9:20 AM, Johannes Bauer wrote:
>> Well, I'm not speaking about my software :-) Actually it's Gnucash which
>> complains if the tag is not explicitly set. This is because they
>> appearently had a ancient version which did not specify the charset, but
Stefan Behnel schrieb:
> Johannes Bauer wrote:
>> Stefan Behnel schrieb:
>>
Can I somehow force Python to generate it anyways?
>>> Did you try passing encoding='UTF-8' on serialisation?
>> Uhm... nope - how can I do that?
>
> Well, depends on what your code currently does.
>
> Maybe you coul
HI ,
I have number of process run on different windows servers which run's with
different command line parameters. for example "process.exe -input
statusurl: http://sss.com "., These parameters can vary from host to host.
using Psexec I know the PID and process name which are running on these
I'm surprised it's been so difficult to find an example of the hash
character in a RegEx string -- for exactly this type of situation,
since it's so common in the real world that people want to put a pound
symbol in front of a number.
It's a character with no special meaning to the regex engine,
On Thu, 11 Jun 2009 15:50:06 +0100, S. Dornseifer
wrote:
Hi everybody,
The situation:
I wrote a GUI, based on Python, TkInter and Pmw.
It runs perfectly fine with Python 2.4 (providing, TkInter and Pmw are
installed). But it crashes with Python 2.6. I tried this on MacOSX11.4
and various
On Thu, 11 Jun 2009 15:22:44 +0100, Brian D wrote:
I'm surprised it's been so difficult to find an example of the hash
character in a RegEx string -- for exactly this type of situation,
since it's so common in the real world that people want to put a pound
symbol in front of a number.
It's a
Found this python implementation:
http://www.oxfish.com/python/voronoi.py
>From what I understand, not my area of expertise, it would seem to be
correct.
--
http://mail.python.org/mailman/listinfo/python-list
Found this python implementation:
http://www.oxfish.com/python/voronoi.py
>From what I understand, not my area of expertise, it would seem to be
correct.
--
http://mail.python.org/mailman/listinfo/python-list
Found this python implementation:
http://www.oxfish.com/python/voronoi.py
>From what I understand, not my area of expertise, it would seem to be
correct.
--
http://mail.python.org/mailman/listinfo/python-list
Gunter Henriksen writes:
> I think I would have difficulty holding a position that this should
> not be a class (or equivalent via namedtuple()) or a dict. It seems to
> me like a case could be made that there are far more situations where
> it makes sense to use tuples as immutable sequences tha
I have a very simple program from the first chapter of a book on
python 3 (I'm a novice). I called the program tmp.py and the data
input file is sum.dat (just a list of numbers, 1 per line). When I
type into my command shell "tmp.py < sum.dat" I get an error from
"line=input()" -- that's line 7 fro
On 2009-06-11 16:16, Bearophile wrote:
Robert Kern:
You can see a mild modification of Fortune's original C code here:
http://svn.scipy.org/svn/scikits/trunk/delaunay/scikits/delaunay/Voro...
That's C++; C++ makes simple things hard and hard things possible :-)
The actual algorithm implemen
could some one explain this error to me and possibly how to fix it?
Traceback (most recent call last):
File "C:\Users\brandon\workspace\tanner's workshop\tanner's
workshop\src\WxGlade.py", line 458, in
Edit = MyDialog2(None, -1, "")
File "C:\Users\brandon\workspace\tanner's workshop\tan
Stefan Behnel wrote:
> Nick Craig-Wood wrote:
> > Luis M González wrote:
> >> I am very excited by this project (as well as by pypy) and I read all
> >> their plan, which looks quite practical and impressive.
> >> But I must confess that I can't understand why LLVM is so great for
> >> pytho
Mads Michelsen wrote:
...I'm getting some error reports ... looking for advice on a way that
I can investigate the error The script ... downloads and...
> in the background using a separate thread (the 'thread' module),
> Sometimes, when I quit the script, the following error messa
On Thu, Jun 11, 2009 at 2:54 PM, Terry Reedy wrote:
> Jack Diederich wrote:
>>
>> 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 li
Robert Kern:
> You can see a mild modification of Fortune's original C code here:
>
> http://svn.scipy.org/svn/scikits/trunk/delaunay/scikits/delaunay/Voro...
That's C++; C++ makes simple things hard and hard things possible :-)
In Python that code may become much shorter (and slower).
Bye,
bearo
On 2009-06-11, Duncan Booth wrote:
> Tim Harig wrote:
>>> number 3 never gets printed. Does Python make a copy of a list before
>>> it iterates through it?:
>> No, complex types are passed by reference unless explicity copied.
> *All* types are passed by reference unless explicitly copied. Pytho
Jeff McNeil wrote:
> Is the string in your text file literally "\xea\xe0\xea+\xef\xee
> \xe7\xe2\xee\xed\xe8\xf2\xfc" as "plain text?" My assumption is that
> when you're reading that in, Python is interpreting each byte as an
> ASCII value (and rightfully so) rather than the corresponding '\x'
>
WHIFF.0.3 adds amChart Flash based Charts.
The amChart chart widgets
[ http://www.amcharts.com ]
provide a sophisticated methodology
for creating beautiful and interactive
statistical charts using Adobe Flash
plug-in technology.
The WHIFF.0.3 release adds extensive
support for embedding amChart
On 2009-06-11 14:56, Captain___nemo wrote:
Hi,
I am implementing Voronoi diagram to find out the nearest location in
a map visually. Right now I want to do this using integer coordinates
(x,y) only in a canvas.
Problem is- I am really confused about this algorithm. I read the
Computational Geome
On Thu, Jun 11, 2009 at 1:41 PM, Stef Mientki wrote:
> Peter Otten wrote:
>> Stef Mientki wrote:
>>> Peter Otten wrote:
Stef Mientki wrote:
> I packed all sources with zipfile,
> but the compression doesn't seem to be very good.
>
If you don't specify the compression, the
Tim Harig wrote:
>> number 3 never gets printed. Does Python make a copy of a list before
>> it iterates through it?:
>
> No, complex types are passed by reference unless explicity copied.
*All* types are passed by reference unless explicitly copied. Python does
make special cases for simple
On Jun 11, 4:24 pm, Sydoruk Yaroslav wrote:
> Hello all,
>
> In a text file aword.txt, there is a string:
> "\xea\xe0\xea+\xef\xee\xe7\xe2\xee\xed\xe8\xf2\xfc".
>
> There is a first script:
> f = open ("aword.txt", "r")
> for line in f:
> print chardet.detect(line)
> b = line.decode('c
Peter Otten wrote:
Stef Mientki wrote:
Peter Otten wrote:
Stef Mientki wrote:
I packed all sources with zipfile,
but the compression doesn't seem to be very good.
If you don't specify the compression, the files are not compressed at
all. Just in case you didn
Captain___nemo:
> Isn't it possible to implement Voronoi diagram using Fortune's
> algorithm without multithreading or hash map?
Multi-threading isn't part of Fortune's algorithm.
Multi-threading can be confusing, but it's better for you to learn to
feel at home using hash maps (named dicts in Pyt
Hello all,
In a text file aword.txt, there is a string:
"\xea\xe0\xea+\xef\xee\xe7\xe2\xee\xed\xe8\xf2\xfc".
There is a first script:
f = open ("aword.txt", "r")
for line in f:
print chardet.detect(line)
b = line.decode('cp1251')
print b
_RESULT_
{'confidence': 1.0, 'encoding': '
On Jun 11, 8:55 pm, Christian Heimes wrote:
> Phil Thompson schrieb:
>
> > How stable should the implementation of, for example, a string's hash
> > across different Python versions?
>
> > Is it defined that hash("foo") will return the same value for Python 2.5.1,
> > 2.6.1 and 2.6.2?
>
> The hash
David Wilson writes:
> 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 s
Hi,
I am implementing Voronoi diagram to find out the nearest location in
a map visually. Right now I want to do this using integer coordinates
(x,y) only in a canvas.
Problem is- I am really confused about this algorithm. I read the
Computational Geometry book, few more theory on Fortune's algori
(I'll ask you to bear with the somewhat vague description in advance -
I'm a noob in all respects here, with regard to python and the mailing
list)
I'm getting some error reports sometimes when I quit a script, I've
been working on. The reports are extremely uninformative, and I do not
notice anyt
Registration is now open for the O'Reilly Open Source Convention (OSCON).
OSCON 2009 will be July 20-24 in San Jose, California.
Early registration has been extended and now ends June 23.
Use the special discount code 'os09pgm' for an extra 15% off.
For more information:
http://conferences.oreil
Phil Thompson schrieb:
> How stable should the implementation of, for example, a string's hash
> across different Python versions?
>
> Is it defined that hash("foo") will return the same value for Python 2.5.1,
> 2.6.1 and 2.6.2?
The hash of an object is an internal implementation detail. The has
Please give me directions on where to start researching for answers.
I probably can do the javascript, but I don't know where to start on
the Python.
1. Wife has a blogger blog and wants a widget to embed in the posts.
2. Widget will have a form that readers can enter their name and url.
3. Widget
Stef Mientki wrote:
> Peter Otten wrote:
>> Stef Mientki wrote:
>>
>>
>>> I packed all sources with zipfile,
>>> but the compression doesn't seem to be very good.
>>>
>>
>> If you don't specify the compression, the files are not compressed at
>> all. Just in case you didn't know...
>>
>
On 2009-06-11, Brendan wrote:
> Can someone please explain what is happening in the output below? The
> number 3 never gets printed. Does Python make a copy of a list before
> it iterates through it?:
You can see what is happening by printing the list as you work through the
loop:
>>> e = range(
On Thu, Jun 11, 2009 at 12:11 PM, Stef Mientki wrote:
> Peter Otten wrote:
>> Stef Mientki wrote:
>>> I packed all sources with zipfile,
>>> but the compression doesn't seem to be very good.
>>>
>>
>> If you don't specify the compression, the files are not compressed at all.
>> Just in case you did
On 6/11/2009 11:54 AM Brendan said...
Can someone please explain what is happening in the output below?
you delete e[2] before displaying it.
The
number 3 never gets printed. Does Python make a copy of a list before
it iterates through it?:
No.
Mods to a list while passing it is generally
Peter Otten wrote:
Stef Mientki wrote:
I packed all sources with zipfile,
but the compression doesn't seem to be very good.
If you don't specify the compression, the files are not compressed at all.
Just in case you didn't know...
.. and would you be willing to tell me how I could
Chris Rebert wrote:
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
si
Can someone please explain what is happening in the output below? The
number 3 never gets printed. Does Python make a copy of a list before
it iterates through it?:
>>> e = range(1,5)
>>> for i in e:
print i
if i == 2 :
e.remove(i)
1
2
4
>>> e
[1, 3, 4]
--
http://
Jack Diederich wrote:
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.
En Thu, 11 Jun 2009 13:56:17 -0300, Phil Thompson
escribió:
How stable should the implementation of, for example, a string's hash
across different Python versions?
I cannot find any such guarantee in the documentation:
http://docs.python.org/reference/datamodel.html
Is it defined that hash
Phil Thompson wrote:
How stable should the implementation of, for example, a string's hash
across different Python versions?
Is it defined that hash("foo") will return the same value for Python 2.5.1,
2.6.1 and 2.6.2?
Thanks,
Phil
Pretty certain that A.B.* will always hash the same (unacceptab
On Jun 11, 4:29 am, casebash wrote:
> Sorry, I didn't quite make it clear. The issue isn't about limiting
> the length (as I won't be using integers bigger than this). The
> problem is that sometimes the output is shorter.
This works also:
>>> bin(15)[2:].zfill(32)
'1
Hi
I am having issues downloading any msi prior to the 3.X version. All of them
appear to be truncated. My old scripts dont compile on the later versions.
Can someone please fix this ASAP ?
Thanks
-Praveen
--
http://mail.python.org/mailman/listinfo/python-list
How stable should the implementation of, for example, a string's hash
across different Python versions?
Is it defined that hash("foo") will return the same value for Python 2.5.1,
2.6.1 and 2.6.2?
Thanks,
Phil
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 11, 2009 at 9:20 AM, Johannes Bauer wrote:
> Well, I'm not speaking about my software :-) Actually it's Gnucash which
> complains if the tag is not explicitly set. This is because they
> appearently had a ancient version which did not specify the charset, but
> used a different one than
Hi,
I'm working on a project of mine that does creates python installation under
/opt so they can be installed side by side with a system installed one.
There's a web page:
http://pyvm.sourceforge.net/
With links to the newest build plus all teh accompaining unitests.
But you can use the sour
> [In this tuple]
>dodge_city = (1781, 1870, 1823)
>(population, feet_above_sea_level, establishment_year) = dodge_city
> each index in the sequence implies something very
> different about each value. The semantic meaning
> of each index is *more* than just the position in
> the sequence;
On Jun 10, 10:13 am, Peter Otten <__pete...@web.de> wrote:
> 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
En Tue, 09 Jun 2009 20:30:06 -0300, rh0dium
escribió:
On Jun 9, 3:28 pm, Emile van Sebille wrote:
On 6/9/2009 3:00 PM rh0dium said...
> I have a .pth file which has some logic in it - but it isn't quite
> enough...
> It started with this..
> import os, site; site.addsitedir(os.path.join(os.e
Hi everybody,
The situation:
I wrote a GUI, based on Python, TkInter and Pmw.
It runs perfectly fine with Python 2.4 (providing, TkInter and Pmw are
installed). But it crashes with Python 2.6. I tried this on MacOSX11.4
and various Linux Distributions.
Crashes occurs when I activate a Pmw.Diaog
En Tue, 09 Jun 2009 05:02:33 -0300, Steven D'Aprano
escribió:
[...] As tuples are defined in Python, they quack like immutable lists,
they
walk like immutable lists, and they swim like immutable lists. Why
shouldn't we treat them as immutable lists?
Phillip Eby states that "Lists are intende
En Tue, 09 Jun 2009 15:38:53 -0300, rkmr...@gmail.com
escribió:
im spawning a script that runs for a long from a web app like this:
os.spawnle(os.P_NOWAIT, "../bin/producenotify.py", "producenotify.py",
"xx",os.environ)
the script is spawned and it runs, but till it gets over i am not able t
On Jun 11, 2:01 am, Lie Ryan wrote:
> 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
>
>
On Jun 11, 9:22 am, Brian D wrote:
> On Jun 11, 2:01 am, Lie Ryan wrote:
>
>
>
> > 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')
> >
On Jun 11, 2:01 am, Lie Ryan wrote:
> 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
>
>
I sent this to the Tutor mailing list and did not receive a response.
Perhaps one of you might be able to offer some sagely wisdom or pointed
remarks?
Please reply off-list and thanks in advance. Code examples are below in
plain text.
-- Forwarded Message
> From: Matthew Strax-Haber
> Reply-
pobox.com> writes:
>
> I thought there was a website which demonstrated how to program a bunch of
> small problems in a number of different languages. I know about the
> Programming Language Shootout:
>
> http://shootout.alioth.debian.org/
>
> but that's not what I was thinking of. I tho
MRAB wrote:
Element 112 is to be named. Do you think we could persuade the
scientists to name it "Pythonium"? :-)
What did Python do to deserve this? I think 'Hofmannium' is a more
appropriate name ;-)
On the other hand, if the scientists used Python on their equipment with
which they dis
Johannes Bauer wrote:
> Stefan Behnel schrieb:
>
>>> Can I somehow force Python to generate it anyways?
>> Did you try passing encoding='UTF-8' on serialisation?
>
> Uhm... nope - how can I do that?
Well, depends on what your code currently does.
Maybe you could use something like
doc.
Not if this element is to end up in some further ultimate nuclear weapon
:-) , unless you are using python to conquer the world (I've been
told this is GVR main secret objective).
MRAB wrote:
Element 112 is to be named. Do you think we could persuade the
scientists to name it "Pythonium"? :-
Stefan Behnel schrieb:
>> Can I somehow force Python to generate it anyways?
>
> Did you try passing encoding='UTF-8' on serialisation?
Uhm... nope - how can I do that?
>
>> I have software which
>> complains if an explicit encoding is missing...
>
> Well, to parse XML, it's best to use an XM
On Jun 10, 8:41 am, 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'm wondering is wheth
Element 112 is to be named. Do you think we could persuade the
scientists to name it "Pythonium"? :-)
http://news.bbc.co.uk/1/hi/sci/tech/8093374.stm
--
http://mail.python.org/mailman/listinfo/python-list
Sorry, I didn't quite make it clear. The issue isn't about limiting
the length (as I won't be using integers bigger than this). The
problem is that sometimes the output is shorter.
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki wrote:
> I packed all sources with zipfile,
> but the compression doesn't seem to be very good.
If you don't specify the compression, the files are not compressed at all.
Just in case you didn't know...
Peter
--
http://mail.python.org/mailman/listinfo/python-list
casebash wrote:
> I know the bin function converts an int into a binary string.
Binary string sounds ambiguous. Firstly, everything is binary. Secondly,
strings are byte strings or Unicode strings. In any case, I'm not 100% sure
what you mean - giving an example of input and output would help!
>
Thanks everyone, I learned more than I expected about
floats :-) and got some good explanations and ideas about
all of this.
Esmail
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jun 10, 2009 at 10:33 PM, 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
>
OT:
find -type f -iname "db.h"
--
http://mail.python.org/mailman/listinfo/python-li
Johannes Bauer wrote:
> Stefan Behnel schrieb:
>> 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
1 - 100 of 117 matches
Mail list logo