On Mon, Dec 21, 2009 at 3:24 PM, Stephen Hansen wrote:
> This is indented over one indentation level too much. You want it to
> be at the same level as the for above. Here, its at the same level
> with "t" -- meaning this entire loop gets repeated five times.
Err, "this" in this context meant the
sturlamolden wrote:
On 19 Des, 22:58, sturlamolden wrote:
If you pick two random states (using any PRNG), you need error-
checking that states are always unique, i.e. that each PRNG never
reaches the starting state of the other(s).
Another note on this:
Ideally, we would e.g. know how to fi
W. eWatson wrote:
Mensanator wrote:
On Dec 14, 8:14�pm, "W. eWatson" wrote:
I think Python is capable of executing a compiled C or FORTRAN program,
Sure, if it was compiled to an .exe file.
and maybe even getting some parameters passed back.
Sure, if the program prints to stdout.
Does
Hi! Please help with the problem:
send over TCPIP data packet organized as 6 bytes of identifier,
integer (LSB) and length of following binary data, binary data
the clear part: create socket, connect it, use send, close socket
the unclear part: create string with required data to use with send
wh
J Kenneth King wrote:
> c) This has nothing to do with programming languages. A programmer that
> lacks critical thinking is a bad programmer. The language they use has
> no bearing on such human facilities.
The language may well have a bearing on the quality of the programs
generated though,
Stephen Hansen wrote:
On Mon, Dec 21, 2009 at 3:12 PM, Gib Bogle
wrote:
#spawn a pool of threads, and pass them queue instance
for i in range(5):
t = ThreadUrl(queue,i)
t.setDaemon(True)
t.start()
#populate queue with data
for host in hosts:
queue.put(host)
This is indent
On Mon, 21 Dec 2009 21:49:11 +, r0g wrote:
> I use assertions myself e.g.
>
foo = "123456"
assert len(foo) <= 5
> Traceback (most recent call last):
> File "", line 1, in
> AssertionError
>
>
> Dunno if this would be considered good or bad programming practice by
> those more e
On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote:
> A programmer that
> lacks critical thinking is a bad programmer. The language they use has
> no bearing on such human facilities.
That's nonsense, and I can demonstrate it by reference to a single
programming language, namely Python.
On 2009-12-21 16:57 PM, r0g wrote:
sturlamolden wrote:
On 19 Des, 16:20, Carl Johan Rehn wrote:
How about mulit-core or (perhaps more exciting) GPU and CUDA? I must
admit that I am extremely interested in trying the CUDA-alternative.
Obviously, cuBLAS is not an option here, so what is the sa
Stephen Hansen wrote:
On Mon, Dec 21, 2009 at 3:12 PM, Gib Bogle
wrote:
#spawn a pool of threads, and pass them queue instance
for i in range(5):
t = ThreadUrl(queue,i)
t.setDaemon(True)
t.start()
#populate queue with data
for host in hosts:
queue.put(host)
This is indent
On Mon, Dec 21, 2009 at 3:31 PM, Boris Epel wrote:
> Hi! Please help with the problem:
> send over TCPIP data packet organized as 6 bytes of identifier,
> integer (LSB) and length of following binary data, binary data
> the clear part: create socket, connect it, use send, close socket
> the uncle
>> The key ID should be an eight-digit string, such as EA5BBD71 (i.e. a
>> 32-bit key ID).
>
> pretend I was someone who had never ever used PGP before.
>
> pgp -kg, then what?
I don't have pgp, only gpg. In gpg --list-keys, it's the 32-bit ID
that gets listed. Try -kv.
If you have never used P
Steven D'Aprano wrote:
> On Mon, 21 Dec 2009 21:49:11 +, r0g wrote:
>
>> I use assertions myself e.g.
>>
> foo = "123456"
> assert len(foo) <= 5
>> Traceback (most recent call last):
>> File "", line 1, in
>> AssertionError
>>
>>
>> Dunno if this would be considered good or bad prog
If you have never used PGP before, you *really* shouldn't register
a PGP key ID in PyPI. I suppose your key doesn't have any counter
signatures, anyway.
Nope, thanks, I'm already in. The pypi page could mark the field "optional". I
just associated it, conceptually, with the Github SSH key, and
*Bitten once again by 'reply all', my apologies john.*
Brilliant troll :D
Well done!
I, for one, am looking forward to watching the videos of the talks, since I
can not attend myself (hi college education!).
On Mon, Dec 21, 2009 at 9:31 AM, John Nagle wrote:
> Steve Holden, Chairman, PSF wrot
I'm pleased to announce the first release of PyTrie, a pure Python
implementation of the trie (prefix tree) data structure [1].
Tries extend the mapping interface with methods that facilitate
finding the keys/values/items for a given prefix, and vice versa,
finding the prefixes (or just the longes
And the next question in the series - how to make sure the resulting package has
a setup.py file?
The basic steps are...
- build a python package
- create a minimal setup.py
- (github it, natch)
- throw it at pypi with:
python setup.py bdist upload
- attempt to install it with:
s
Stephen Hansen wrote:
On Mon, Dec 21, 2009 at 2:57 PM, W. eWatson wrote:
This has got to be some sort of IDLE issue then.
Huh? How do you figure?
When I run a simple
program. If I open this program in the IDLE editor:
#import math
print "hello, math world."
print cos(0.5)
print sin(0.8)
th
"Georg" wrote in message
news:7padi2fsm...@mid.individual.net...
Hi Mark,
many thanks for your help. I tried your code in my program and it worked.
I would like to understand what the code is doing and I have some
questions to it.
Are you passing in these values, or are they being returne
hi...
the following sample is an attempt to fetch two subsequent pages from a
sameple site. (it's public) the script attempts to implement a request,
using the POST method, as well as as cookies. Testing using
LiveHttpHeaders/Firefox indicates that the app uses post/cookies, and it
doesn't work if
hi...
the following sample is an attempt to fetch two subsequent pages from a
sameple site. (it's public) the script attempts to implement a request,
using the POST method, as well as as cookies. Testing using
LiveHttpHeaders/Firefox indicates that the app uses post/cookies, and it
doesn't work if
r0g wrote:
> Steven D'Aprano wrote:
>> On Mon, 21 Dec 2009 21:49:11 +, r0g wrote:
>>
>>> I use assertions myself e.g.
>>>
>> foo = "123456"
>> assert len(foo) <= 5
>>> Traceback (most recent call last):
>>> File "", line 1, in
>>> AssertionError
>>>
>>>
>>> Dunno if this would be con
En Mon, 21 Dec 2009 15:25:05 -0300, John Nagle
escribió:
I just installed "python3.1.1.msi" on a system that had
"python3.1.msi" installed in "D:/python31". The installer found the old
installation in
"D:/python31", partially trashed it, and then installed the new version
in "C:/pyth
En Mon, 21 Dec 2009 16:30:13 -0300, Pulkit Agrawal
escribió:
I am writing a script wherein I need to merge files into existing tar.gz
files. Currently, I am using tarfile module. I extract the tar.gz to a
tempdir and copy the new file there and re-compress all the files back
into
a tar.gz.
David Cournapeau wrote:
On Sun, Dec 20, 2009 at 6:47 PM, Lie Ryan wrote:
On 12/20/2009 2:53 PM, sturlamolden wrote:
On 20 Des, 01:46, Lie Ryan wrote:
Not necessarily, you only need to be certain that the two streams don't
overlap in any reasonable amount of time. For that purpose, you can u
Nice work! But I have a question...
On Mon, 21 Dec 2009 20:40:40 +, Albert van der Horst wrote:
> def pi4():
> ' Calculate pi by a 5th order process, with favorable stop
> criterion'
> precision = 10e-20
Why do you say 10e-20 instead of 1e-19?
--
Steven
--
http://mail.pytho
En Mon, 21 Dec 2009 17:40:40 -0300, Albert van der Horst
escribió:
In article ,
Albert van der Horst wrote:
In article
,
Mark Dickinson wrote:
After a cup of coffee, it's much clearer: this just comes from the
Taylor series for arcsin(x), applied to x = 1/2 to get asin(1/2) =
pi/6.
Hi,
I tried to get the xycoordinate of a click of the rowheader column of
Pmw's ScrolledText...and it returns the xycoordinate of the text
portion...even though I supplied it with the rowheader component.
self.scrolledtext.component('rowheader').index("@%d,%d" %
(event.x,event.y))
What am I doin
On Tue, 22 Dec 2009 00:18:21 +, r0g wrote:
> Yikes, glad to be set me straight on that one! Thanks :) It's a pity
> though, I really like the way it reads. Is there anything similar with
> ISN'T disabled when optimizations are turned on?
Yes: an explicit test-and-raise.
if not condition:
On Tue, 22 Dec 2009 04:04:56 +, Albert van der Horst wrote:
> In article <00b967e1$0$15623$c3e8...@news.astraweb.com>, Steven D'Aprano
> wrote:
>>Nice work! But I have a question...
>>
>>On Mon, 21 Dec 2009 20:40:40 +, Albert van der Horst wrote:
>>
>>> def pi4():
>>> ' Calculate pi
I have the following two implementation techniques in mind.
def myfunc(mystring):
check = "hello, there " + mystring + "!!!"
print check
OR
structure = ["hello, there",,"!!!"]
def myfunc(mystring):
structure[2] = mystring
output = ''.join(mystring)
i heard that string concatenat
Hi;
Back when I worked with Zope, they had this nifty form element where I could
select from a list of elements on the right and click an arrow to make them
go into a list on the left. I need to add this functionality to the store I
am creating. What is it called?
TIA,
beno
--
http://mail.python.o
Hi Mark,
many thanks for your valuable help.
>>> # numVars contains size of returned arrays. Recast to access.
>>> varNamesArray = c.cast(varNames,c.POINTER(PCHAR * numVars.value))
>>> varTypesArray = c.cast(varTypes,c.POINTER(INT * numVars.value))
One last question: You created an object varNa
En Tue, 22 Dec 2009 03:13:38 -0300, Zubin Mithra
escribió:
I have the following two implementation techniques in mind.
def myfunc(mystring):
check = "hello, there " + mystring + "!!!"
print check
OR
structure = ["hello, there",,"!!!"]
def myfunc(mystring):
structure[2] = mystri
> Oltmans wrote:
> >I've a string that looks something like
> >
> >lksjdfls kdjff lsdfs sdjfls >= "amazon_35343433">sdfsdwelcome
> >
> >
> >>From above string I need the digits within the ID attribute. For
> >example, required output from above string is
> >- 35343433
> >- 345343
> >-
101 - 135 of 135 matches
Mail list logo