[EMAIL PROTECTED] wrote:
> 1.5.2? Aren't we at 2.4.2 now? So the regs documentation was pulled,
> yet the source code shipped with the installer still uses it? How are
> people suppose to make heads or tails of a language when it ships with
> deprecated, undocumented code?
$ more classfix.py
#
Hi there i am hoping some one could help me out with a small problem
i am in the process of learning python.I
am trying to write an interactive programme,
This is a short example.
if s = raw_input
("hello what’s your name? ")
if s=='carmel':
Print "Ahh the boss’s wife"
What i would like to
Hi Friends,
I am in need of gudance for getting ouput from the
gdb objfile -batch -x gdb batch_command_file
But I am not able to see messages on display.
So kindly guide me if u have any experience about it.
batch_command_file:
list *0x840230fd
echo bla bla...
--
http://mail.python.org/mai
Erik Max Francis wrote:
> His problem is that cursor.execute does format expansion with %, so a
> single % is not legal.
Yes, I think psycopg uses paramstyle='pyformat', i.e. it expands
parameters in your sql in the usual Python way where % has a special
meaning. If you really mean the % sign o
"Ernesto" wrote:
> I launch a Windows executable and wish to close it from Python. The
> code is below. Normally, my program waits for rib.exe to finish, but
> I'd like to be able to close it from python if possible. (I suppose if
> I was going to do this, I wouldn't use .wait() ) Any ideas ?
On Thu, 2006-03-23 at 22:55 -0800, kpp9c wrote:
> I have a question... and ... whew ... i am gonna be honest, i haven't
> the slightest clue how to even start ... i am not sure if i used up all
> my good will here or can take a mulligan.. i love to try to at least
> post some lame broken code of my
Delaney, Timothy wrote:
> However, there were definitely things found that were real bugs, and
> subsequently fixed.
absolutely. but a significant chunk of those bugs were in the "will leak
references or access null pointers under extreme low-memory conditions,
but it's not very likely that you
okay... out of curiousity... how would you then seperate the interger
value from the fractional part do something to one side and then put it
back together... like if you had 8.01 and you want to add to the '8'
part in one way (ordinary decimal) and add to the .01 part modulo
something .. like say
Dinko Tenev <[EMAIL PROTECTED]> wrote:
>> > I don't see immediately how exactly this is going to work. Unless I'm
>> > very much mistaken, a FSA in the classical sense will accept or reject
>> > only after the whole sequence has been consumed, and this spells
>> > exponential times.
>> Exponentia
I have a question... and ... whew ... i am gonna be honest, i haven't
the slightest clue how to even start ... i am not sure if i used up all
my good will here or can take a mulligan.. i love to try to at least
post some lame broken code of my own at first... but like i said, not
being a math perso
"Dan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>I need to register for a COM callback under Windows. I am using an ADO
> recordset interface like this:
>
> import win32com.client
> import time
> connect = win32com.client.Dispatch("ADODB.Connection")
> recordset = win32com.clien
I just Googled and found the Python-Dev thread 'About "Coverity Study
Ranks LAMP Code Quality" '. I was heartened by the type of issues
raised in the discussion - it leaves me content with whats
'under-the-hood' in Python.
You maintainers don't seem to bang your own drum, which is a good
thing, bu
Jorge Godoy wrote:
> I know. I'm just trying to see if there might be some magic going on with his
> driver...
Since raw strings have no effect on format specifiers, that won't tell
you anything.
>>> r'%' == '%'
True
His problem is that cursor.execute does format expansion with %, so a
sin
Erik Max Francis <[EMAIL PROTECTED]> writes:
> Raw strings don't have anything to do with format specifiers.
I know. I'm just trying to see if there might be some magic going on with his
driver...
--
Jorge Godoy <[EMAIL PROTECTED]>
"Quidquid latine dictum sit, altum sonatur."
- Qualquer
Casey Hawthorne <[EMAIL PROTECTED]> writes:
> Butternut squash <[EMAIL PROTECTED]> wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>> IronPython is currently nowhere near production quality. I would not
>>> recommend it.
>>
>>But it's so cool.
>
> It's cool to have bugs?
>
> That really BUGS ME!
You're c
Excuse me, I mean
python2.4 -mtimeit -s 'from numarray import array; d =
{(100,500):[5,5], (100,501):[6,6],
(100,502):[7,7]}; x = dict(d);' 'for i in x.values():
i[0]*=1;i[1]*=1'
100 loops, best of 3: 1.72 usec per loop
i[0]*=1, not j[0]*=1 ...
--
http://mail.python.org/mailman/listinfo/p
Wait! It occured to me. Why are we touching the key at all. This is
a dictionary with mutable values.
[EMAIL PROTECTED] ~]$ python2.4 -mtimeit -s 'd = {(100,500):[5,5],
(100,501):[6,6],
(100,502):[7,7]}; x = dict(d)' 'for i in x.values():
i[:]=[j*1 for j in i]'
10 loops, best of 3: 2.79 us
On 24/03/2006 2:57 PM, [EMAIL PROTECTED] wrote:
> Gotta love the attitude of people on .lang newsgroups
>
>
> The unraw '\t' might work, but all the example in the tutorial use raw
> strings, so why not be consistent in the example scripts?
classfix.py is not an *example* script. It is (was
On 24/03/2006 2:19 PM, Jean-Paul Calderone wrote:
> On Fri, 24 Mar 2006 09:33:19 +1100, John Machin <[EMAIL PROTECTED]>
> wrote:
>
>> On 24/03/2006 8:36 AM, Peter Otten wrote:
>>
>>> John Machin wrote:
>>>
You can replace ALL of this upshifting and accent removal in one
blow by
us
"Ziga Seilnacht" <[EMAIL PROTECTED]> wrote:
> If you want to restrict attribute asignment, you should use the
> __setattr__ special method, see:
> http://docs.python.org/ref/attribute-access.html
That "should" is what I am asking about. If I understand,
in the simplest case, you want me to say so
Butternut squash <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
>
>> IronPython is currently nowhere near production quality. I would not
>> recommend it.
>
>But it's so cool.
It's cool to have bugs?
That really BUGS ME!
--
Regards,
Casey
--
http://mail.python.org/mailman/listinfo/python-
Jorge Godoy wrote:
> [EMAIL PROTECTED] writes:
>
>> heh.. It works except I am using psycopg.Binary(somebinarystructure),
>> and I am not really doing it by hand to just add the extra %, and
>> psycopg.Binary doesn't do it. I'd imagine it's a bug with psycopg
>> package. Any quick way to project
Gotta love the attitude of people on .lang newsgroups
The unraw '\t' might work, but all the example in the tutorial use raw
strings, so why not be consistent in the example scripts?
1.5.2? Aren't we at 2.4.2 now? So the regs documentation was pulled,
yet the source code shipped with the
Yes, I cede that explicit indexing is faster by quite a bit.
There is a somewhat philosophical decision for why I avoided that. I
prefer to try to present python with as big of a picture of what I want
as possiable. update tells python what I want to do, whereas the
for-loop describes how to. I
[EMAIL PROTECTED] wrote:
> IronPython is currently nowhere near production quality. I would not
> recommend it.
But it's so cool.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> heh.. It works except I am using psycopg.Binary(somebinarystructure),
> and I am not really doing it by hand to just add the extra %, and
> psycopg.Binary doesn't do it. I'd imagine it's a bug with psycopg
> package. Any quick way to project a string from freak '%' pro
## this creates a postscript file which you can then convert to PDF
## using Acrobat Distiller
##
## BTW, I spent an hour trying to get this working with
## win32com.client.Dispatch
## (the save file dialog still appeared)
## Then I remembered win32com.client.dynamic.Dispatch
##
## Can somebody ple
On Fri, 24 Mar 2006 09:33:19 +1100, John Machin <[EMAIL PROTECTED]> wrote:
>On 24/03/2006 8:36 AM, Peter Otten wrote:
>> John Machin wrote:
>>
>>>You can replace ALL of this upshifting and accent removal in one blow by
>>>using the string translate() method with a suitable table.
>>
>> Only if you
heh.. It works except I am using psycopg.Binary(somebinarystructure),
and I am not really doing it by hand to just add the extra %, and
psycopg.Binary doesn't do it. I'd imagine it's a bug with psycopg
package. Any quick way to project a string from freak '%' problems?
Thanks,
Sia
Jorge Godoy w
This is how python is supposed to work.
I'm sure not what languages you have used ... it seems that you are
expecting some sort rule based system like make, or prolog.
Grab a cup of joe, pull up a chair and let me help you out here.
Python is an imperative language, you can envision the presence
[EMAIL PROTECTED] writes:
> The following statement fails because it has the '%' sign in it.
> cursor.execute("select '%'")
>
> The error is: IndexError: list index out of range
>
> How do I address this problem?
Use "%%".
--
Jorge Godoy <[EMAIL PROTECTED]>
"Quidquid latine dictum sit, a
I also posted this in Django Users group, but figured it probably has
more relevance for python group.
It seems like a freak problem to me. I spent a long hour to track the
problem down and here it is:
The following statement fails because it has the '%' sign in it.
cursor.execute("select '%'")
Em Qui, 2006-03-23 às 18:01 -0800, [EMAIL PROTECTED] escreveu:
> >for key in d:
> > d[key] = [x*2 for x in d[key]]
> >
>
> Naw, if you are going to use list interpolation go all the way and save
> yourself all of that ugly indexing into the dict.
>
> >>> d = {(100,500):[5,5], (100,501):[6,6
On 24/03/2006 12:36 PM, [EMAIL PROTECTED] wrote:
> I doubt it, although it might work anyway.
You could dispel all doubt in about 15 seconds flat were you to actually
try it out.
>>> import regex
__main__:1: DeprecationWarning: the regex module is deprecated; please
use the re module
>>> rege
Em Qui, 2006-03-23 às 17:54 -0800, Scott David Daniels escreveu:
> John McMonagle wrote:
> > Say I have a dictionary like below:
> >
> > d = {(100,500):[5,5], (100,501):[6,6], (100,502):[7,7]}
> >
> > Say I want to multiply all the values of the dictionary by 2:
> > for key in d.keys():
> > d[k
IronPython is currently nowhere near production quality. I would not
recommend it.
--
http://mail.python.org/mailman/listinfo/python-list
>for key in d:
> d[key] = [x*2 for x in d[key]]
>
Naw, if you are going to use list interpolation go all the way and save
yourself all of that ugly indexing into the dict.
>>> d = {(100,500):[5,5], (100,501):[6,6], (100,502):[7,7]}
>>> d.update( [[key,[x*2 for x in item]] for key,item in d.
John McMonagle wrote:
> Say I have a dictionary like below:
>
> d = {(100,500):[5,5], (100,501):[6,6], (100,502):[7,7]}
>
> Say I want to multiply all the values of the dictionary by 2:
> for key in d.keys():
> d[key] = map(lambda x: x*2, d.get(key))
> Is there a better/faster/cleaner way to ac
I doubt it, although it might work anyway.
Here's another from the same program:
(a0, b0), (a1, b1), (a2, b2) = classprog.regs[:3]
Nothing in the Python lib reference on the regs attribute for regex
objects.
--
http://mail.python.org/mailman/listinfo/python-list
xe.py is a Python module to make it very easy to work with XML. I have
attempted to make xe classes very Pythonic and intuitive. xe is intended
for working with structured XML, such as syndication feed files, but I
have added some support for unstructured XML as well.
Example:
>>> import xe
>>>
Em Qui, 2006-03-23 às 17:11 -0800, [EMAIL PROTECTED] escreveu:
> Since the classexpr isn't a raw string (not r prefix), doesn't the \t
> get converted to a tab character before it gets to the regex compiler?
>>> print '^\([ \t]*class +[a-zA-Z0-9_]+\) *( *) *\(\(=.*\)?\):'
^\([]*class +[a-zA-Z0
Em Sex, 2006-03-24 às 11:04 +1000, John McMonagle escreveu:
> Is there a better/faster/cleaner way to achieve this ?
Maybe...
for key in d:
d[key] = [x*2 for x in d[key]]
...?
I can't thing of anything better :(...
HTH,
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-
I'm looking through the tools/scripts folder from the python install,
trying to get reacquanted with the language. Got a question on the
following classfix.py snippet:
# This expression doesn't catch *all* class definition headers,
# but it's pretty darn close.
classexpr = '^\([ \t]*class +[a-zA-
Say I have a dictionary like below:
d = {(100,500):[5,5], (100,501):[6,6], (100,502):[7,7]}
Say I want to multiply all the values of the dictionary by 2:
for key in d.keys():
d[key] = map(lambda x: x*2, d.get(key))
Is there a better/faster/cleaner way to achieve this ?
Thanks,
John
--
Th
Dan Sommers wrote:
> Christoph Zwerschke wrote:
>> I was wondering whether this should be allowed, i.e. multiplication of
>> a sequence with a float. There could be either an implicit typecast to
>> int (i.e. rounding) ...
>
> Explicit is better than implicit.
I already knew using the word "impli
Okay So I got the 'search' part to work, which outputs me a long list of
message numbers. how do i use that list of message numbers to fetch the
'from' address for each one and send them a confirmation email?
is this some sort for loop?
any help would be greatly appreciated.
cheers.
Kun wrot
On Fri, 24 Mar 2006 00:35:44 +0100,
Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Currently, if you write 3*'*', you will get '***', but if you write
> 3.0*'*', you will get an error (can't multiply sequence by non-int).
> I was wondering whether this should be allowed, i.e. multiplication of
Magnus Lycka <[EMAIL PROTECTED]> writes:
> As I've written before, the ISO 8601 spec contains many variations
> in date formats. Making a full ISO 8601 parser is probably possible
> if we ignore time deltas, but it's hardly worth the effort. Writing
> something that parses a few percent of the pos
Hey guys, I would like to have a code in python (as simple as possible)
to scan a specific folder in my mailbox and if the subject is equal to,
say, 'BIKES', I would like to have the code automatically send the
SENDER an email saying something like "We have received your Email".
Furthermore, I
"Michael Yanowitz" <[EMAIL PROTECTED]> writes:
> Sorry, got it backwards:
You also got the reply backwards (in both cases).
http://en.wikipedia.org/Top_posting>
--
\"No one ever went broke underestimating the taste of the |
`\American public." --
I launch a Windows executable and wish to close it from Python. The
code is below. Normally, my program waits for rib.exe to finish, but
I'd like to be able to close it from python if possible. (I suppose if
I was going to do this, I wouldn't use .wait() ) Any ideas ?
# Launch a program witho
Currently, if you write 3*'*', you will get '***', but if you write
3.0*'*', you will get an error (can't multiply sequence by non-int).
I was wondering whether this should be allowed, i.e. multiplication of a
sequence with a float. There could be either an implicit typecast to int
(i.e. roun
I noticed that contrary to what is said in
http://www.python.org/doc/2.2.3/whatsnew/node7.html,
namely that integer divison should print deprecation
warnings beginning with Python 2.3, even Python 2.4
is still quiet about it, i.e. you still need to explicitely
set the -Q warn option to see the warn
You are s lame.
--
http://mail.python.org/mailman/listinfo/python-list
"dongdong" <[EMAIL PROTECTED]> writes:
> oh~~~! offer my thanks to Tim Roberts and all persons above!
> I see now, it's the different url causes!
> contents can only be got from the later (real ) url.
> I made a mistick not to look at the different urls taking effect.
If you use ClientCooki
On 24/03/2006 8:36 AM, Peter Otten wrote:
> John Machin wrote:
>
>>You can replace ALL of this upshifting and accent removal in one blow by
>>using the string translate() method with a suitable table.
>
> Only if you convert to unicode first or if your data maintains 1 byte == 1
> character, in p
On 2006-03-23, Michael Yanowitz <[EMAIL PROTECTED]> wrote:
> Sorry, got it backwards:
> def printDecimal(number):
> if (number >= 0):
> print number - int(number)
> else:
> print int(number) - number
Still top posted and still doesn't work:
>>> def printDecimal(number):
.
On 2006-03-23, Michael Yanowitz <[EMAIL PROTECTED]> wrote:
>> With that terse description and the subject line I would interpret the
>> OP like so:
>>
> print re.sub(".*\.",".","0.666")
>> .666
> print re.sub(".*\.",".","123.666")
>> .666
>
> Or if you're allergic to regular expressions:
>
Sorry, got it backwards:
def printDecimal(number):
if (number >= 0):
print number - int(number)
else:
print int(number) - number
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Michael Yanowitz
Sent: Thursday, March 23, 2006 5:21
Fredrik Lundh wrote:
> (and there was never 96 real errors in the code base, of course;
> coverity is a remarkable tool, but there's plenty of room for
> mistakes when used on a code base this large)
Yep - from the discussions on python-dev, a lot of the "error-fixing"
was telling Coverity what t
how about this solution:
def printDecimal(number):
if (number < 0):
print number - int(number)
else:
print int(number) - number
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Grant Edwards
Sent: Thursday, March 23, 2006 5:11 PM
Steven Bethard wrote:
(snip code)
>
> But that looks pretty nasty to me.
> It sounds like your architecture
> could use some redesigning
Done - in much more sane way. Got rid of some more boilerplate and of
the whole problem of per-instance descriptors BTW !-)
I should probably sleep more
[EMAIL PROTECTED] (Aahz) writes:
[...]
> H hschilling is NOT one of the python-announce moderators, so
I see.
> zir e-mail setup is probably b0rken, accounting for all the problems you
> mentioned.
Could be.
> I frequently send e-mail to python-announce, python-list, and
> baypiggies
On 2006-03-23, Arne Ludwig <[EMAIL PROTECTED]> wrote:
> With that terse description and the subject line I would interpret the
> OP like so:
>
print re.sub(".*\.",".","0.666")
> .666
print re.sub(".*\.",".","123.666")
> .666
Or if you're allergic to regular expressions:
>>> print "." +
Scott David Daniels <[EMAIL PROTECTED]> writes:
> At the risk of being thought of as beating a dead horse, this was a
> _great_ way to ask this question. [...]
> So, anyhow, thanks for taking the time to write your question properly.
Take that risk, please. There's enough lambasting of (and proba
On 23.03.2006, at 22:48, Ben Finney wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
>
>> A Python class was designed to represent physical scalars and to
>> eliminate errors involving implied physical units (e.g., confusing
>> angular degrees and radians).
>
> This sounds like a useful ab
I think the problem is this line:
> x == input('What is x now?: ')
which should not have a == but a =
--
http://mail.python.org/mailman/listinfo/python-list
With that terse description and the subject line I would interpret the
OP like so:
>>> print re.sub(".*\.",".","0.666")
.666
>>> print re.sub(".*\.",".","123.666")
.666
--
http://mail.python.org/mailman/listinfo/python-list
Actually under Linux he could probably pipe "clri %d" to debugfs if
that is what he wanted to do. On the other hand he said "unix
environment" which could be anything really.
--
http://mail.python.org/mailman/listinfo/python-list
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> A Python class was designed to represent physical scalars and to
> eliminate errors involving implied physical units (e.g., confusing
> angular degrees and radians).
This sounds like a useful abstraction; I'm not sure if there are
established ways
Thanks again Duncan!
I will use the OpenOffice solution as a last resort. It isn't the
standard office suite at my corp. I would like the code to be as
portable as possible, and it would seem like a pain in the arse to have
the end user install OpenOffice just to run my script. Sure it would
ju
John Machin wrote:
> You can replace ALL of this upshifting and accent removal in one blow by
> using the string translate() method with a suitable table.
Only if you convert to unicode first or if your data maintains 1 byte == 1
character, in particular it is not UTF-8.
Peter
--
http://mail.
> under SunOS there was a way to delete a file given it's i-node.
Yes and no. You probably mean "clri" which cleared the inode, but did
not "remove the file", i.e. all the entries in directories pointing to
it.
In older Unices there was also "ncheck" to find the filesystem names
for inode numbers
John Machin wrote:
> On 24/03/2006 6:44 AM, Larry Bates wrote:
>> Derek Basch wrote:
>>
>>> How can I return:
>>>
>>> ".666"
>>>
>>> from float:
>>>
>>> "0.666"
>>>
>>> This is what I have so far:
>>>
>>>
>> "%.6f" % x
>>>
>>> Thanks Everyone,
>>> Derek Basch
>>>
>>
>>
>> This works but I'm not
On 23 Mar 2006 12:36:17 -0800, MakaMaka <[EMAIL PROTECTED]> wrote:
> I checked and it is. I can't use news servers at work b/c of the
> firewall. Is there another way to access this mailing list?
Yes, try to subscribe: http://www.python.org/community/sigs/. See c++-sig
If you can use your mail o
On 23/03/2006 10:07 PM, bussiere bussiere wrote:
> hi i'am making a program for formatting string,
> or
> i've added :
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> in the begining of my script but
>
> str = str.replace('Ç', 'C')
> str = str.replace('é', 'E')
> str = str.repl
I need to register for a COM callback under Windows. I am using an ADO
recordset interface like this:
import win32com.client
import time
connect = win32com.client.Dispatch("ADODB.Connection")
recordset = win32com.client.Dispatch("ADODB.Recordset")
connect.Open("Driver={SQLServer};Server=devserver
nelson wrote:
> On windows i know i can create in
> python a COM server and call it from smalltalk, but i wonder if there
> is a more general solution (platform independent).
SOAP.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
John J. Lee <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Aahz) writes:
>> In article <[EMAIL PROTECTED]>,
>> John J Lee <[EMAIL PROTECTED]> wrote:
>>>
>>>Hmm, [EMAIL PROTECTED], who are you? python-announce moderator? I
>>>didn't put you on my To: line (nor pyt
Steve Juranich wrote:
> We have a large suite of "legacy" tools (based on stand-alone executables
> and shell scripts) that we would like to integrate into a suite of Python
> modules. I'm having a little trouble getting my head around how the best
> way to implement the whole thing, though.
>
>
I checked and it is. I can't use news servers at work b/c of the
firewall. Is there another way to access this mailing list?
--
http://mail.python.org/mailman/listinfo/python-list
We have a large suite of "legacy" tools (based on stand-alone executables
and shell scripts) that we would like to integrate into a suite of Python
modules. I'm having a little trouble getting my head around how the best
way to implement the whole thing, though.
Here's (roughly) the situation:
W
"Paddy" wrote:
> I followed the links to the coverity page that shows their table of
> errors found, and subsequently fixed in tools used for the LAMP stack.
> They say that they informed the maintainers of the software about the
> precise errors found and the number of errors has been tracked sin
J Rice wrote:
> I'm sorry for such a basic question, but I haven't been able to phrase
> a search that gets me an answer and my books are totally silent on
> this. I have seen a number of python function defs that take
> parameters of the form (**param1). Looks like a pointer... but my
> books on
> a = now()
> delta = ReltaiveDateTime(days=+6, weekday(mx.DateTime.Friday, 0))
> Next Friday: a+delta
> a: march 23
> a+delta: Gives me March 31st and not March 24th
> Any ideas?
Just an off-beat idea: use Python's datetime instead of mx.DateTime,
and my recur module:
http://projects.amor.org/mis
Hi paron,
I am using PyRTF as of now and it seems to fit my need quite well
and it works like a charm :-).
I have made a wrapper around it so that it will easier for me to switch
the backend for generating the word/RTF docs later.
May be, it will be openoffice :-)
I appreciate your input. Thank
I followed the links to the coverity page that shows their table of
errors found, and subsequently fixed in tools used for the LAMP stack.
They say that they informed the maintainers of the software about the
precise errors found and the number of errors has been tracked since
then.
It seems there
On 24/03/2006 6:44 AM, Larry Bates wrote:
> Derek Basch wrote:
>
>>How can I return:
>>
>>".666"
>>
>>from float:
>>
>>"0.666"
>>
>>This is what I have so far:
>>
>>
>"%.6f" % x
>>
>>Thanks Everyone,
>>Derek Basch
>>
>
>
> This works but I'm not entirely sure I know what you are
> trying to
"Derek Basch" <[EMAIL PROTECTED]> writes:
> Ahh yes you have to put parenthases around the string formatting to
> remove the integer using indexes. Thanks, that's just what I needed!
I think it's better to remove leading zeros explicitly:
('%.3x' % x).lstrip('0')
--
http://mail.python.org/ma
Echo wrote:
> Ok, this is the first list comprehension that I have done.
> Surprisinly, it works for the most part.
> The problem with it is that it returns a list with two lists in it,
> instead of just one list. Can anyone tell me what I am doing wrong or
> how to fix it.
>
> Here is my code:
>
I am trying to parse a build log for errors. I figure I can do this
one of three ways:
- find the absolute platonic form of an error and search for that item
- create definitions of what patterns describe errors for each tool
which is used (ant, MSDEV, etc).
- rework the build such that all the re
[EMAIL PROTECTED] (Aahz) writes:
> In article <[EMAIL PROTECTED]>,
> John J Lee <[EMAIL PROTECTED]> wrote:
> >
> >Hmm, [EMAIL PROTECTED], who are you? python-announce moderator? I
> >didn't put you on my To: line (nor python-list for that matter, but I
> >guess that's a reasonable place for i
On 23 Mar 2006 11:17:46 -0800, MakaMaka <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm trying to build the basic boost.python tutorial that comes with the
> distribution. I'm using bjam and mingw. It builds the module, but
> upon import, it gives this error:
>
> ImportError: dynamic module does not defin
Ahh yes you have to put parenthases around the string formatting to
remove the integer using indexes. Thanks, that's just what I needed!
Derek Basch
--
http://mail.python.org/mailman/listinfo/python-list
On 24/03/2006 6:30 AM, vj wrote:
> I figured out how to do it. This does not work:
>
> delta = ReltaiveDateTime(days=0, weekday(mx.DateTime.Friday, 0))
>
> But this works:
>
> delta = ReltaiveDateTime(days=+0, weekday(mx.DateTime.Friday, 0))
>
vj, NEITHER of those work, because you still have
Derek Basch wrote:
> How can I return:
>
> ".666"
>
> from float:
>
> "0.666"
>
> This is what I have so far:
>
"%.6f" % x
>
> Thanks Everyone,
> Derek Basch
>
This works but I'm not entirely sure I know what you are
trying to accomplish.
("%.3f" % x)[1:]
-Larry Bates
--
http://mai
How can I return:
".666"
from float:
"0.666"
This is what I have so far:
>>> "%.6f" % x
Thanks Everyone,
Derek Basch
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for pointing out that the days=+0 is not necessary. Your other
points are well noted.
Thanks
VJ
--
http://mail.python.org/mailman/listinfo/python-list
On 24/03/2006 5:18 AM, Dennis Lee Bieber wrote:
> On 23 Mar 2006 09:37:13 -0800, "vj" <[EMAIL PROTECTED]> declaimed the
> following in comp.lang.python:
>
>
>>I'm doing:
>>
>>a = now()
>>delta = ReltaiveDateTime(days=+6, weekday(mx.DateTime.Friday, 0))
>>Next Friday: a+delta
>>
>>a: march 23
>>a+
I figured out how to do it. This does not work:
delta = ReltaiveDateTime(days=0, weekday(mx.DateTime.Friday, 0))
But this works:
delta = ReltaiveDateTime(days=+0, weekday(mx.DateTime.Friday, 0))
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 224 matches
Mail list logo