In message <[EMAIL PROTECTED]>, Paul Rubin wrote:
> Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes:
>
>> Except that the NSA's reputation has taken a dent since they failed to
>> anticipate the attacks on MD5 and SHA-1.
>
> NSA had nothing to do with MD5 ...
Nevertheless, it was their job to ant
In message <[EMAIL PROTECTED]>, Stefan Behnel wrote:
> He means he has to use backslashes instead of parentheses here.
>
> Which is not true, you could easily rephrase this as:
>
> for link in GetEachRecord(
> "links",
> ):
> out.write(
> ..
Paul Rubin wrote:
> Lawrence D'Oliveiro writes:
>> Except that the NSA's reputation has taken a dent since they failed to
>> anticipate the attacks on MD5 and SHA-1.
>
> NSA had nothing to do with MD5, and it's to NSA's credit that SHA-1
> held up for as long as it did.
I haven't kept up. Has any
> steps.sort(key = lambda s: s.time)
This is why attrgetter in the operator module was invented.
from operator import attrgetter
...
steps.sort(key=attrgettr("time"))
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Hello Marco,
> hi all, I have a python program that calls a dll through ctypes
> (py2.5). In some (reproducible)
> conditions the program crashes with an error in ctypes module.
> How can I trace down the problem? I have created a debug build of
> python but I also use pyodbc
> and dateutil librar
Marc 'BlackJack' Rintsch wrote:
> On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote:
>
>> The one thing I don't like about Python syntax is using backslashes to
>> continue lines. Yes, you can avoid them if you can include parentheses
>> somehow, but this isn't always possible.
>>
>> P
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote:
> The one thing I don't like about Python syntax is using backslashes to
> continue lines. Yes, you can avoid them if you can include parentheses
> somehow, but this isn't always possible.
>
> Possible:
>
> […]
>
> Not possible:
>
>
>> In an ideal world, my IDE would do this with a red wavy line.
>
> You didn't mention which IDE you use; however, if you use Emacs, there
> is flyspell-prog-mode which does that for you (checks your spelling
> "on the fly", but only within comments and strings).
Same in Vim (:set spell)
HTH,
--
The one thing I don't like about Python syntax is using backslashes to
continue lines. Yes, you can avoid them if you can include parentheses
somehow, but this isn't always possible.
Possible:
if (
quitting
and
len(client["to_write"]) == 0
and
On Sep 8, 10:01 pm, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:
>
> Again pyparsing to the rescue :)
>
> I have to do a parsing project in Java right now and I dearly miss
> pyparsing. I explained it to the guy I'm working for, and he was pretty
> impressed.
>
> Thought that might make you smi
Hi
Greets!
This is sandy,Working in TechRecruit Consultants,Chennai as Head
Operaitons - Recruitment.
Currently we have openning in Unix/SQL/Oracle/JAVA for ISO 9001:2000/
CMM LEVEL 5 Company in US.
About the company:An ISO 9001:2000 /SEI-CMM Level 5 accreditation.
Experience:4 - 7 Years
Pos
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes:
> Except that the NSA's reputation has taken a dent since they failed to
> anticipate the attacks on MD5 and SHA-1.
NSA had nothing to do with MD5, and it's to NSA's credit that SHA-1
held up for as long as it did.
--
http://mail.python.org/mailman/
Paul McGuire wrote:
> Well, it is an external module, but pyparsing makes this pretty
> straightforward:
>
> [snip delightful parsing]
>
Again pyparsing to the rescue :)
I have to do a parsing project in Java right now and I dearly miss
pyparsing. I explained it to the guy I'm working for, and
On-line registration is through the OOPSLA registrar
http://www.regmaster.com/conf/oopsla2007.html
APL 2007 home page
http://www.sigapl.org/apl2007.html
--
http://mail.python.org/mailman/listinfo/python-list
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote:
> Any cryptographer worth his salt (pun intended) would be looking to close
> that vulnerability BEFORE an attack is made public, and not just wait for
> the attack to trickle down from the NSA to the script kiddies.
Except that the NSA's rep
Gregor Horvath <[EMAIL PROTECTED]> wrote:
> Alexander Eisenhuth schrieb:
> >
> > I'm wodering how the information hiding in python is ment. As I
> > understand there doesn't exist public / protected / private mechanism,
> > but a '_' and '__' naming convention.
> >
> > As I figured out there
John Zenger writes:
> In an ideal world, my IDE would do this with a red wavy line.
You didn't mention which IDE you use; however, if you use Emacs, there
is flyspell-prog-mode which does that for you (checks your spelling
"on the fly", but only within comments and strings).
Regards,
David Trudg
Ricardo Aráoz wrote:
> Is there a way to import a module whose name is in a variable (read from
> a configuration file for example)?
pydoc __import__
Richard
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way to import a module whose name is in a variable (read from
a configuration file for example)?
TIA
--
http://mail.python.org/mailman/listinfo/python-list
You shouldn't even need the call to super in that method, a simple
'len(self)' ought to be sufficient. Note that using the list object's
append method is going to be much more efficient than handling it yourself
anyways.
There are a few problems in your call to super. First, it's a callable - it
On Sat, 08 Sep 2007 14:04:55 -0700, John Zenger <[EMAIL PROTECTED]>
wrote:
> In an ideal world, my IDE would do this with a red wavy line.
I can't help with your problem, but this is the first thing I turn off in
Word. It drives me _mad_.
Sorry - just had to share that.
DaveM
--
http://mail.p
On Sep 8, 2007, at 8:04 PM, xkenneth wrote:
>
> Code doesn't compile in python. This is pseudo code anyways.
> Can't post actual code and tracebacks because the code is proprietary.
> "MyModule" is pseudo code, and i forgot the arguments, the actual code
> and errors are unimportant for this quest
On Sep 8, 3:42 pm, tool69 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to parse some source with nested parenthesis, like this :
>
> >cut-
>
> {
> {item1}
> {
> {item2}
> {item3}
> }
>
> }
>
> >cut-
>
> In fact I'd like to get all start indexes of
On Sep 8, 3:35 pm, David <[EMAIL PROTECTED]> wrote:
> > How do import statements that are declared at the top of a python
> > module work?
>
> http://docs.python.org/tut/node8.html
On Sat, 08 Sep 2007 12:42:19 -0700, xkenneth wrote:
> How do import statements that are declared at the top of a pyth
I am trying to extend list class to build a stack class -- see code below---
but I got an error when I try to call len method from list class here.. why?
Thanks in advance!
-
class Stackx(list):
def push(self,x):
indx= super.len(x)
self.insert(my_le
David wrote:
>>> (I know that the better practice is to isolate user-displayed strings
>>> from the code, but in this case that just didn't happen.)
>>>
>> Use the re module, identify the strings and write them to another file,
>> then open the file with your spell checker. Program shouldn't be mor
David a écrit :
> On 9/8/07, tool69 <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I need to parse some source with nested parenthesis, like this :
>>
>
> If this is exactly how your data looks, then how about a loop which
> searches for "{item" and the following "}"? You can use the "find"
> string meth
On 9/8/07, Zentrader <[EMAIL PROTECTED]> wrote:
> Same solution as above, but if you just want "Hello" and to not
> include words containing "Hello", i.e. "Helloing" or "Unhello", then
> you want to include a leading and/or trailing space.
You can also use the re (regular expression) module to sea
Same solution as above, but if you just want "Hello" and to not
include words containing "Hello", i.e. "Helloing" or "Unhello", then
you want to include a leading and/or trailing space.
lit=" hello" ## note added space
t1="nothello world hello. hello \nwhy world hello"
start = t1.find(lit)
t2 = t
> >
> > (I know that the better practice is to isolate user-displayed strings
> > from the code, but in this case that just didn't happen.)
> >
>
> Use the re module, identify the strings and write them to another file,
> then open the file with your spell checker. Program shouldn't be more
> than
John Zenger wrote:
> To my horror, someone pointed out to me yesterday that a web app I
> wrote has been prominently displaying a misspelled word. The word was
> buried in my code.
>
> Is there a utility out there that will help spell-check literal
> strings entered into Python source code? I do
On 9/8/07, tool69 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to parse some source with nested parenthesis, like this :
>
If this is exactly how your data looks, then how about a loop which
searches for "{item" and the following "}"? You can use the "find"
string method for that.
Otherwise, if th
To my horror, someone pointed out to me yesterday that a web app I
wrote has been prominently displaying a misspelled word. The word was
buried in my code.
Is there a utility out there that will help spell-check literal
strings entered into Python source code? I don't mean spell-check
strings en
Hi,
I need to parse some source with nested parenthesis, like this :
>cut-
{
{item1}
{
{item2}
{item3}
}
}
>cut-
In fact I'd like to get all start indexes of items and their end (or
lenght).
I know regexps are rather limited for this type
> How do import statements that are declared at the top of a python
> module work?
http://docs.python.org/tut/node8.html
--
http://mail.python.org/mailman/listinfo/python-list
The timedelta module did the job just fine.
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
>
> How do import statements that are declared at the top of a python
> module work?
>
> for instance
>
> from MyModule.Objects import *
>
> class Class:
> def function:
>#here i cannot access the things that should have been
> imported from the above statement
>#i
On Sat, 08 Sep 2007 12:42:19 -0700, xkenneth wrote:
> How do import statements that are declared at the top of a python
> module work?
They import the module. ;-)
> for instance
>
> from MyModule.Objects import *
>
> class Class:
> def function:
>#here i cannot access th
On Sep 7, 2:04 pm, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:
> Paul Rudin wrote:
> > xkenneth <[EMAIL PROTECTED]> writes:
>
> >>> Ah, yes, a couple of things:
> >>> - avoid the 'one-class-per-file' syndrom. It's perfectly ok to have tens
> >> Yes but i find it hard to edit classes easily whe
On 9/8/07, sapsi <[EMAIL PROTECTED]> wrote:
> Hi,
> I am using a library (pcapy) that returns a timeval object T=
> (seconds,microseconds) where microseconds is always < 1e6.
> Is there a Python class that can handle timeval structs? Specifically,
> I wish to subtract two T (defined above) objects,
On 9/8/07, Jimmy <[EMAIL PROTECTED]> wrote:
> Hi, I want a progress bar to increase automatically, so I wrote code
> like this:
> current = 0
> while True:
> if current == 100:
> current = 0
> self._gaug
Steven D'Aprano wrote:
...
..
.
> You know, one or two examples was probably plenty. The other six or seven
> didn't add anything to your post except length.
>
> Also, type testing by equality is generally not a good idea. For example:
>
> class HexInt(int):
> """Like built-in ints, but prin
On 9/8/07, David <[EMAIL PROTECTED]> wrote:
> > The python doesn't supports t1[keyword_index]="XYZhello" (string
> > object assignment is not supported). How do I get to this problem? Any
> > sugguestions?
>
> Build a new string var using slicing. eg:
>
> t1 = t1[:keyword_index] + "XYZhello" + [key
> The python doesn't supports t1[keyword_index]="XYZhello" (string
> object assignment is not supported). How do I get to this problem? Any
> sugguestions?
Build a new string var using slicing. eg:
t1 = t1[:keyword_index] + "XYZhello" + [keyword_index]
Or use string formatting:
t1 = "your text
Hi, I want a progress bar to increase automatically, so I wrote code
like this:
current = 0
while True:
if current == 100:
current = 0
self._gauge.SetValue(current)
time.sleep(0.1
Hi;
I'm trying to insert XYZ before a keyword in a string. The first and
the last occurence of hello in the string t1 (t1="hello world hello.
hello \nwhy world hello") are keywords. So after the insertion of XYZ
in this string, the result should be t1 = "XYZhello world hello. hello
\nwhy world XYZ
Hallöchen!
Carsten Haese writes:
> On Sat, 2007-09-08 at 18:52 +0200, Torsten Bronger wrote:
>
>> Is there a portable and simply way to direct file-like IO to
>> simply nothing? [...]
>>
>> [...]
>
> This might work:
>
> class LogSink(object):
> def write(self, *args, **kwargs): pass
> d
Thanks for the replies, very instructive!
On 9/7/07, Steve Holden <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Fri, 07 Sep 2007 01:30:00 -0500, Sergio Correia wrote:
> >> Hi, I'm kinda new to Python (that means, I'm a total noob here), but
> >> have one doubt which is more about consisten
Hi,
I am using a library (pcapy) that returns a timeval object T=
(seconds,microseconds) where microseconds is always < 1e6.
Is there a Python class that can handle timeval structs? Specifically,
I wish to subtract two T (defined above) objects, taking into account
the large values of T[0] and T[1]
Hallöchen!
Marc 'BlackJack' Rintsch writes:
> On Sat, 08 Sep 2007 18:52:57 +0200, Torsten Bronger wrote:
>
>> Is there a portable and simply way to direct file-like IO to
>> simply nothing? I try to implement some sort of NullLogging by
>> saying
>
> `os.devnull`?
Yes, but I wasn't really sure
Duncan Booth <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
I went through your example to get timings for my machine, and I
ran into an issue I didn't expect.
My bat file did the following 10 times in a row:
(the command line wraps in this post)
call timeit -s "s='abracadabra1'*1000;t='
On Sep 7, 9:42 pm, [EMAIL PROTECTED] wrote:
> On Sep 7, 3:10 am, Jimmy <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi, wxPython is cool and easy to use, But I ran into a problem
> > recently when I try to write a GUI.
> > The thing is I want to periodically update the content of StatixText
> > object, so
On Sat, 08 Sep 2007 18:52:57 +0200, Torsten Bronger wrote:
> Is there a portable and simply way to direct file-like IO to simply
> nothing? I try to implement some sort of NullLogging by saying
`os.devnull`?
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/pyth
On Sat, 2007-09-08 at 18:52 +0200, Torsten Bronger wrote:
> Hallöchen!
>
> Is there a portable and simply way to direct file-like IO to simply
> nothing? I try to implement some sort of NullLogging by saying
>
> --8<---cut here---start->8---
> import logging
>
On Sat, 08 Sep 2007 12:08:16 -0300, Ricardo Aráoz wrote:
>> if type(x) == type(True):
>> ...print "bool"
>> ...
>> bool
>>
>>
> Or just :
>
a = True
type(a) == int
> False
[snip]
You know, one or two examples was probably plenty. The other six or seven
didn't add anything to
Dr Mephesto <[EMAIL PROTECTED]> writes:
> well, I want to (maybe) have a dictionary where the value is a list of
> 5 lists. And I want to add a LOT of data to these lists. 10´s of
> millions of pieces of data. Will this be a big problem? I can just try
> it out in practice on monday too :)
Yes, th
Hallöchen!
Is there a portable and simply way to direct file-like IO to simply
nothing? I try to implement some sort of NullLogging by saying
--8<---cut here---start->8---
import logging
if options.logging:
logging.basicConfig(level=logging.DEBUG, filename
Dr Mephesto wrote:
> On Sep 8, 3:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> En Fri, 07 Sep 2007 16:16:46 -0300, Dr Mephesto <[EMAIL PROTECTED]>
>> escribi?:
>>
>>> hey, that defaultdict thing looks pretty cool...
>>> whats the overhead like for using a dictionary in python?
>> Diction
On Sep 8, 3:33 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Fri, 07 Sep 2007 16:16:46 -0300, Dr Mephesto <[EMAIL PROTECTED]>
> escribi?:
>
> > hey, that defaultdict thing looks pretty cool...
>
> > whats the overhead like for using a dictionary in python?
>
> Dictionaries are heavily opt
ah <[EMAIL PROTECTED]> wrote:
>Art Deco wrote:
>> ah <[EMAIL PROTECTED]> wrote:
>>>Art Deco wrote:
ah <[EMAIL PROTECTED]> wrote:
>Art Deco wrote:
>> ah <[EMAIL PROTECTED]> wrote:
>>>Art Deco wrote:
ah <[EMAIL PROTECTED]> wrote:
>Art Deco wrote:
>> ah <[EMAI
Zentrader wrote:
> On Sep 7, 11:30 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> On Fri, 07 Sep 2007 18:49:12 +0200, Jorgen Bodde wrote:
>>> As for why caring if they are bools or not, I write True and False to
>>> the properties, the internal mechanism works like this so I need to
>>>
Hi,
Based on the already released SCF, the code is there:
http://snakecard.com/Source/Applications/SCF/Load_BC.zip.
hg
--
http://mail.python.org/mailman/listinfo/python-list
Hotmail: cheapestsell#hotmail.com
(www.cheapestsell.com )professionally wholesale sports shoes from
china,main product including:Footwear-sneakers series
(nike,puma,adidas,Jordan 1-24,nike max,nike shox,nike dunk,nike
kobe,nike rift,bapesta,timberland
boot,D&G,dsquqred,LV,prada,icecream,NBA,lacost
Dennis Lee Bieber wrote:
> On Fri, 07 Sep 2007 12:19:12 -0700, Steve Holden <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> Since it's only a matter of time before someone brings up the "post-It"
>> analogy, let me cavil in advance about it. The thing I don't like about
>
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Should garbage-collecting 16 million strings really take 20+
> minutes?
It shouldn't. For testing purposes I've created a set of 16 milion
strings like this:
s = set()
for n in xrange(1600):
s.add('somerandomprefix' + str(n)) # prefix makes t
On Sat, 08 Sep 2007 10:07:14 +0200, Peter Otten wrote:
> Am Fri, 07 Sep 2007 13:10:16 + schrieb Grant Edwards:
>
>> On 2007-09-07, Peter Otten <[EMAIL PROTECTED]> wrote:
>>> Am Fri, 07 Sep 2007 10:40:47 + schrieb Steven D'Aprano:
>>>
Python doesn't have any pointers.
>>>
>>> Thinking
On Sat, 08 Sep 2007 10:37:51 +0200, EuGeNe Van den Bulke wrote:
> Is the sqlite distributed with Python 2.5 compiled with the
> -DTHREADSAFE=1 flag? My gutt feeling is Windows (yes) MacOS/Linux (no)
> but ...
Take a look at the `threadsafety` attribute of the module.
Ciao,
Marc 'BlackJ
Hi,
Is the sqlite distributed with Python 2.5 compiled with the
-DTHREADSAFE=1 flag? My gutt feeling is Windows (yes) MacOS/Linux (no)
but ...
If it is not on MacOS/Linux, how do I go about replacing the sqlite so
file with a threadsafe sqlite?
Thanks,
EuGeNe -- http://www.3kwa.com
--
http:
Am Fri, 07 Sep 2007 13:10:16 + schrieb Grant Edwards:
> On 2007-09-07, Peter Otten <[EMAIL PROTECTED]> wrote:
>> Am Fri, 07 Sep 2007 10:40:47 + schrieb Steven D'Aprano:
>>
>>> Python doesn't have any pointers.
>>
>> Thinking of python variables or "names" as pointers should
>> get you a lo
Am Sat, 08 Sep 2007 00:32:35 + schrieb Steven D'Aprano:
> On Fri, 07 Sep 2007 15:59:53 +0200, Wildemar Wildenburger wrote:
>
>> I just thought I'd go along with the analogy the OP created as that was
>> his mindset and it would make things easier to follow if I didn't try to
>> forcibly chang
On 9/8/07, Greg Lindstrom <[EMAIL PROTECTED]> wrote:
> # run client pricing at 0215 (p) Monday-Friday
> 15 2 * * 1-5 cd /m01/edith/src && /usr/bin/python /m01/edith/src/driver.py
> --paid-date yesterday --jobname professional >>
> /m01/edith/stdout/ecomppo.stdout 2&>1
"2&>1", Is that a typo ? It
71 matches
Mail list logo