This month (June 2009) we will be meeting on the 17th (a Wednesday,
*not* our regular Tuesday). Linux Caffe is at the corner of Grace and
Harbord streets, 1 block South of Christie subway station. This month's
presentation is...
Wednesday, June 17th:
Behdad Esfahbod will be presenting on
Seamus MacRae smacrae...@live.ca.invalid (SM) wrote:
SM Piet van Oostrum wrote:
By the way, there is a series of articles about concurrency on ACM Queue
which may be interesting for those participating in or just following
this discussion:
Does anyone know what version of python will appear in snow leopard
which is apparently being released in September?
--
http://mail.python.org/mailman/listinfo/python-list
Sorry, I missed the last part of the message
This makes a more generic parser (comment/uncomment the corresponding
# 1 or # 2 code based on whether a new block is found by a first
line containing NSTEP or a last line containing EWALD). This
yields a dictionary for each item in the input file.
En Sun, 07 Jun 2009 13:31:07 -0300, Tuomas Vesterinen
tuomas.vesteri...@iki.fi escribió:
I am developing a Python application as a Python2.x and Python3.0
version. A common code base would make the work easier. So I thought to
try a preprosessor. GNU cpp handles this kind of code correct:
One can go from lb = ['b','a','n','a','n','a']
to s = banana by using s = .join(lb)
Is there a way to go the reverse route?
I have not been able to find one.
It is obviously easy to write a for char in s loop
or list comprehension, but there seems to be
no function or string method to return a
On Tue, Jun 9, 2009 at 12:25 AM, Hendrik van Rooyenm...@microcorp.co.za wrote:
One can go from lb = ['b','a','n','a','n','a']
to s = banana by using s = .join(lb)
Is there a way to go the reverse route?
lb = list(banana)
Cheers,
Chris
--
http://blog.rebertia.com
--
Hendrik van Rooyen schrieb:
One can go from lb = ['b','a','n','a','n','a']
to s = banana by using s = .join(lb)
Is there a way to go the reverse route?
I have not been able to find one.
It is obviously easy to write a for char in s loop
or list comprehension, but there seems to be
no function
Sorry, I didn't realize that you already proposed list comprehension.
There is some kind of asymmetry in several areas.I guess that's somehow
related to this post: http://www.zedshaw.com/blog/2009-05-29.html
http://www.zedshaw.com/blog/2009-05-29.html
--
On Jun 9, 7:30 am, Alia Khouri alia_kho...@yahoo.com wrote:
Does anyone know what version of python will appear in snow leopard
which is apparently being released in September?
The python-dev thread starting at
http://mail.python.org/pipermail/python-3000/2008-September/014816.html
suggests
Francesco Pietra ha scritto:
I come 'naked', which is unusual and unfair. However, I find it
difficult to give a correct start. The files consist, among other
things, of a huge number of blocks of the type
NSTEP = 1000 TIME(PS) = 152.000 TEMP(K) = 298.54 PRESS =89.4
Etot
Hendrik van Rooyen mail at microcorp.co.za writes:
One can go from lb = ['b','a','n','a','n','a']
to s = banana by using s = .join(lb)
Is there a way to go the reverse route?
| list('Hendrik')
['H', 'e', 'n', 'd', 'r', 'i', 'k']
Bonus extras: try tuple() and set()
I have not been able
On Tue, 09 Jun 2009 09:43:45 +1000, Ben Finney wrote:
Use a list when the semantic meaning of an item doesn't depend on all
the other items: it's “only” a collection of values.
Your list of message codes is a good example: if a value appears at
index 3, that doesn't make it mean something
Enrico 4...@755189.45 (E) wrote:
E lczancanella lczancane...@gmail.com ha scritto nel messaggio
E news:32bf5ccb-5bfd-49a5-b423-9d41180a0...@l28g2000vba.googlegroups.com...
Hi, i am brand new in Python, so sorry if this question is too basic,
but i have tried a lot and dont have success... I
I was wondering if there is a way to start an interactive shell within a
script/application.
I'm sometimes tired of adding prints to scan the current namespace so
I'd like to pause the execution and give the user the shell prompt.
This is obviously for debugging purpose.
I know that I may use
Mark Dickinson wrote:
The python-dev thread starting at
http://mail.python.org/pipermail/python-3000/2008-September/014816.html
suggests that back in September 2008, there was a 'MajorOS Vendor
(tm)'
who was interested in getting Python 2.6 into their next OS release,
provided that it
On Jun 9, 11:49 am, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
I'm sometimes tired of adding prints to scan the current namespace so
I'd like to pause the execution and give the user the shell prompt.
This is obviously for debugging purpose.
This is definitely doable, have look at
Take a look either at code.interact or at
IPython.ipapi.launch_new_instance. Basically, the only thing that you
have to provide is a dictionary object that contains the namespace
that you would like to have in your shell once it's launched.
Best regards,
Javier
2009/6/9 eGlyph
jon vs. python wrote:
Sorry, I didn't realize that you already proposed list comprehension.
There is some kind of asymmetry in several areas.I guess that's somehow related
to this post: http://www.zedshaw.com/blog/2009-05-29.html
Thanks for the link - I am not quite as rabid, but it would
Chris Rebert c...@ria.com wrote:
lb = list(banana)
Aaargh!
I should have known - you use a string method to get a list of words,
but you have to go to the list to get a list of characters from a string.
There is no string method to do it, which is what I am complaining
about.
Is there a
Diez B. Roggisch d...@nam.web.de wrote:
I think
lb = list(s)
is good enough.
It does the job, of course, but it is not a string method.
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 9, 2009 at 2:42 AM, Hendrik van Rooyenm...@microcorp.co.za wrote:
Chris Rebert c...@ria.com wrote:
lb = list(banana)
Aaargh!
I should have known - you use a string method to get a list of words,
but you have to go to the list to get a list of characters from a string.
There is
Hendrik van Rooyen wrote:
Diez B. Roggisch d...@nam.web.de wrote:
I think
lb = list(s)
is good enough.
It does the job, of course, but it is not a string method.
And that is a bad thing because of what?
Also as list-comps are going away and are replaced by
Hendrik van Rooyen wrote:
lb = list(banana)
Aaargh!
I should have known - you use a string method to get a list of words,
but you have to go to the list to get a list of characters from a string.
As they say, Python is not Java.
Strings support the sequence protocol (aka interface), hence
I built and installed Numpy on my campus account, the install couldn't
be done on the python install location. So I did it on my local
storage location but I am clueless about how to use it I was expecting
to see a numpy.py in the install dir
so I could I suppose just give
import path to install
On Tue, Jun 9, 2009 at 7:40 PM, Chandramoulinaruvim...@gmail.com wrote:
I built and installed Numpy on my campus account, the install couldn't
be done on the python install location. So I did it on my local
storage location but I am clueless about how to use it I was expecting
to see a
On Jun 8, 10:06 pm, Chris Rebert c...@rebertia.com wrote:
On Mon, Jun 8, 2009 at 6:57 PM, samwysesamw...@gmail.com wrote:
On Jun 8, 7:37 pm, Carl Banks pavlovevide...@gmail.com wrote:
On Jun 8, 4:43 pm, Ben Finney ben+pyt...@benfinney.id.au wrote:
m...@pixar.com writes:
Is there any
I was hoping to use pywin32 to automate some rather tedious filling in
of Word forms. I thought
--
http://mail.python.org/mailman/listinfo/python-list
I was hoping to use pywin32 to automate some rather tedious filling in
of Word forms. I thought the process would be analogous to dealing
with xml documents or DOM but find myself somewhat lost in the word
object reference manual (http://msdn.microsoft.com/en-us/library/
bb244515.aspx) . I was
Steven D'Aprano ste...@remove.this.cybersource.com.au writes:
On Tue, 09 Jun 2009 09:43:45 +1000, Ben Finney wrote:
Use a list when the semantic meaning of an item doesn't depend on
all the other items: it's “only” a collection of values.
Your list of message codes is a good example:
lczancanella lczancane...@gmail.com ha scritto nel messaggio
news:32bf5ccb-5bfd-49a5-b423-9d41180a0...@l28g2000vba.googlegroups.com...
Hi, i am brand new in Python, so sorry if this question is too basic,
but i have tried a lot and dont have success... I have the following
code...
class
Piet van Oostrum p...@cs.uu.nl ha scritto nel messaggio
news:m2ljo1ajnx@cs.uu.nl...
The method doesn't need the class at all, so a staticmethod would be
preferable:
class Funcoes:
@staticmethod
def CifradorDeCesar(self, mensagem, chave, funcao):
Yes, in this case self is not
lczancanella wrote:
Hi, i am brand new in Python, so sorry if this question is too basic,
but i have tried a lot and dont have success... I have the following
code...
class Funcoes:
def CifradorDeCesar(mensagem, chave, funcao):
...
You've gotten some interesting advice.
You want
On Jun 9, 9:54 am, Brendan brendandetra...@yahoo.com wrote:
I was hoping to use pywin32 to automate some rather tedious filling in
of Word forms. I thought the process would be analogous to dealing
with xml documents or DOM but find myself somewhat lost in the word
object reference manual
On Jun 9, 12:30 am, Emile van Sebille em...@fenx.com wrote:
On 6/8/2009 8:43 PM Ben Finney said...
The fact that literal set syntax is a relative newcomer is the primary
reason for that, I'd wager.
Well, no. It really is more, that's odd... why use set?
Until I ran some timing tests this
On Jun 9, 2:47 am, Hendrik van Rooyen m...@microcorp.co.za wrote:
Diez B. Roggisch d...@nam.web.de wrote:
I think
lb = list(s)
is good enough.
It does the job, of course, but it is not a string method.
A. Your post's subject included the words function/method
B. Who cares
Carl
I'd like to convert a list of floats to a list of strings constrained
to one .1f format. These don't work. Is there a better way?
[.1f % i for i in l]
or
[(.1f % i) for i in l]
StephenB
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 9, 8:38 am, stephen_b redplusbluemakespur...@gmail.com wrote:
I'd like to convert a list of floats to a list of strings constrained
to one .1f format. These don't work. Is there a better way?
[.1f % i for i in l]
or
[(.1f % i) for i in l]
You need a % in there, chief.
[ %.1f % x for
On Tue, Jun 9, 2009 at 5:38 PM,
stephen_bredplusbluemakespur...@gmail.com wrote:
I'd like to convert a list of floats to a list of strings constrained
to one .1f format. These don't work. Is there a better way?
[.1f % i for i in l]
or
[(.1f % i) for i in l]
There's a missing %, this does
On Jun 9, 10:43 am, Carl Banks pavlovevide...@gmail.com wrote:
You need a % in there, chief.
Carl Banks
You are so right. Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
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
BufferringHandler and log into buffer,
3. once the flash drive is plugged in and available store the logs
from BufferHandler into that
If you're looking to debug your program, try import pdb and then wherever you
want to debug put:
pdb.set_trace()
Your program will then enter the debugger when it executes that line. It's
quite nice really. If you get confused on what to do, just type help
On Jun 9, 4:57 am, samwyse samw...@gmail.com wrote:
On Jun 8, 8:57 pm, samwyse samw...@gmail.com wrote:
I conclude that using constructors is generally a bad idea, since the
compiler doesn't know if you're calling the builtin or something with
an overloaded name. I presume that the
On Jun 9, 8:20 am, samwyse samw...@gmail.com wrote:
On Jun 9, 12:30 am, Emile van Sebille em...@fenx.com wrote:
On 6/8/2009 8:43 PM Ben Finney said...
The fact that literal set syntax is a relative newcomer is the primary
reason for that, I'd wager.
Well, no. It really is more,
John Machin sjmac...@lexicon.net wrote:
T=lambda x:x in(25401,25402,25408);import dis;dis.dis(L);dis.dis(T)
I've learned a lot from this thread, but this is the
niftiest bit I've picked up... thanks!
--
Mark Harrison
Pixar Animation Studios
--
myopc wrote:
hi, all
I am ruuning a c++ program (boost python) , which create many python
interpreaters and each run a python script with use multi-thread
(threading).
when the c++ main program exit, I want to shut down python
interpreaters, but it crashed. I have googled a lot but cant get
Hello,
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,
locale, and optparse). The code is as follows:
Hi,
the problem screams for a separate thread.
Anyway there's a TimedRotatingFileHandler handler in the logging package:
you can derive from it and change the emit/doRollover pair to hold the records
until a device is not ready.
Regards,
Antonio
On Tuesday 09 June 2009 16:57:00 kretel
On Tue, Jun 9, 2009 at 8:19 AM, Scott David
Danielsscott.dani...@acm.org wrote:
lczancanella wrote:
Hi, i am brand new in Python, so sorry if this question is too basic,
but i have tried a lot and dont have success... I have the following
code...
class Funcoes:
def
On Jun 9, 6:10 pm, A. Cavallo a.cava...@mailsnare.com wrote:
Hi,
the problem screams for a separate thread.
I was thinking about that, as mentioned in the first post. Although, I
was wonder if there is another way to tackle the problem.
Anyway there's a TimedRotatingFileHandler handler in
On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote:
Arved Sandstrom wrote:
Jon Harrop wrote:
I see no problem with mutable shared state.
In which case, Jon, you're in a small minority.
No. Most programmers still care about performance
Frequently when they shouldn't.
and
R. David Murray wrote:
Well, I for one looked at that long pylint output when I first tried it,
and switched to another tool :)
(pyflakes...but I don't think it does PEP 8)
:-)
Ok, so I'm not the only one who thinks the output is rather lengthy.
I've since dug into the docs and searched on
I need to have some non-buffered keyboard interaction with a Python script
(on Linux). Back in the day, I fired up Curses to do this in Perl. Any
idea if that's still how I have to fly? Or is there a different
mechanism?
Thanks!
-Ken
--
This message has been scanned for viruses and
Enrico 4...@755189.45 (E) wrote:
E Piet van Oostrum p...@cs.uu.nl ha scritto nel messaggio
E news:m2ljo1ajnx@cs.uu.nl...
The method doesn't need the class at all, so a staticmethod would be
preferable:
class Funcoes:
@staticmethod
def CifradorDeCesar(self, mensagem, chave, funcao):
E
Anyway there's a TimedRotatingFileHandler handler in the logging package:
you can derive from it and change the emit/doRollover pair to hold the
records
until a device is not ready.
Hm, that might be the way to go. Will have a try.
I had another look at the logging package.
The class
I'm trying to write a try/catch block to handle an interrupted system
call. However, I can't seem to locate information on the actual
typename of the exception. Does anyone know what it would be? I want
my code to look like this:
try:
...
except InterruptedSystemCall # what's the right name?
Steven D'Aprano wrote:
James Tauber explains this at
URL:http://jtauber.com/blog/2006/04/15/
python_tuples_are_not_just_constant_lists/.
He doesn't really explain anything though, he merely states it as
revealed wisdom. The closest he comes to an explanation is to declare
that in tuples
On Jun 9, 2009, at 6:05 AM, Diez B. Roggisch wrote:
Also as list-comps are going away and are replaced by
list(generator-expression)
Where did you hear that?
-Miles
--
http://mail.python.org/mailman/listinfo/python-list
m...@pixar.com wrote:
John Machin sjmac...@lexicon.net wrote:
T=lambda x:x in(25401,25402,25408);import dis;dis.dis(L);dis.dis(T)
I've learned a lot from this thread, but this is the
niftiest bit I've picked up... thanks!
If you are doing a lot of dissing, starting with
from dis import dis
hi
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 to
free the port that is used by the web app, or in other words i am
On 2009-06-09, Ken D'Ambrosio k...@jots.org wrote:
I need to have some non-buffered keyboard interaction with a Python script
(on Linux). Back in the day, I fired up Curses to do this in Perl. Any
idea if that's still how I have to fly? Or is there a different
mechanism?
Same as it ever
On Tue, Jun 9, 2009 at 1:52 PM, Ken D'Ambrosio k...@jots.org wrote:
I need to have some non-buffered keyboard interaction with a Python script
(on Linux).
Assuming you're running your code from a command prompt, something
like this recipe might do the trick:
toby wrote:
On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote:
Arved Sandstrom wrote:
Jon Harrop wrote:
I see no problem with mutable shared state.
In which case, Jon, you're in a small minority.
No. Most programmers still care about performance
Frequently when they
On Jun 9, 8:57 am, kretel krzysztof.re...@googlemail.com 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
BufferringHandler and log into buffer,
3. once the flash drive is
exceptions.EOFError exceptions.ReferenceError exceptions.ZeroDivisionError
...
exceptions.NotImplementedError exceptions.UnicodeError exceptions.__str__
Is there a single parent exception to all those? Or should I just
write it as:
try:
...
catch Exception:
...
Thanks,
--Steve
--
mrstevegross wrote:
I'm trying to write a try/catch block to handle an interrupted system
call. However, I can't seem to locate information on the actual
typename of the exception. Does anyone know what it would be? I want
my code to look like this:
try:
...
except InterruptedSystemCall #
On Jun 9, 2:22 pm, mrstevegross mrstevegr...@gmail.com wrote:
I'm trying to write a try/catch block to handle an interrupted system
call. However, I can't seem to locate information on the actual
typename of the exception. Does anyone know what it would be? I want
my code to look like this:
i have a csv file like so:
row1,field1,[field2][text in field2 quote, quote],field3,field
row2,field1,[field2]text in field2 quote, quote,field3,field
using csv.reader to read the file, the first row is broken into two
fields:
[field2][text in field2 quote
and
quote
while the second row is read
On 2009-06-09 03:49, Jean-Michel Pichavant wrote:
I was wondering if there is a way to start an interactive shell within a
script/application.
I'm sometimes tired of adding prints to scan the current namespace so
I'd like to pause the execution and give the user the shell prompt.
This is
That works for me. There isn't an InterruptedSystemCall error or
equivalent in the standard exception hierarchy. EnvironmentError is
the parent of OSError IOError, which is where you'll most likely be
encountering that state.
Thanks!
--Steve
--
Hendrik van Rooyen wrote:
I should have known - you use a string method to get a list of words,
but you have to go to the list to get a list of characters from a string.
That is symmetry.
There is no string method to do it, which is what I am complaining
about.
That would be asymmetry.
jon vs. python wrote:
Sorry, I didn't realize that you already proposed list comprehension.
There is some kind of asymmetry in several areas.I guess that's
somehow related to this post:
http://www.zedshaw.com/blog/2009-05-29.html
The premise of this post by Zed the Insightful is that Python
I'm sure this is a FAQ, but I certainly haven't been able
to find an answer.
Is it possible to set the program name as seen by the
operating system or lower-level libraries?
I'm connecting to a database, and the runtime helpfully
sends some information to the server, such as username,
pid, and
On Tue, 9 Jun 2009 10:47:11 -0700 (PDT), toby
t...@telegraphics.com.au wrote:
On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote:
Arved Sandstrom wrote:
Jon Harrop wrote:
performance means mutable state.
Hm, not sure Erlangers would wholly agree.
Erlang uses quite a bit of mutable
On 2009-06-09 14:43, Terry Reedy wrote:
jon vs. python wrote:
Sorry, I didn't realize that you already proposed list comprehension.
There is some kind of asymmetry in several areas.I guess that's
somehow related to this post: http://www.zedshaw.com/blog/2009-05-29.html
The premise of this
Miles Kaufmann wrote:
On Jun 9, 2009, at 6:05 AM, Diez B. Roggisch wrote:
Also as list-comps are going away and are replaced by
list(generator-expression)
Where did you hear that?
Perhaps in the discussion of possible changes for 3.0 about 18 months
ago. The idea was rejected because
Bret bretrouse at gmail.com writes:
i have a csv file like so:
row1,field1,[field2][text in field2 quote, quote],field3,field
row2,field1,[field2]text in field2 quote, quote,field3,field
using csv.reader to read the file, the first row is broken into two
fields:
[field2][text in field2
On 6/9/2009 1:06 PM m...@pixar.com said...
I'm sure this is a FAQ, but I certainly haven't been able
to find an answer.
Is it possible to set the program name as seen by the
operating system or lower-level libraries?
I'm connecting to a database, and the runtime helpfully
sends some
I'm sure this is a FAQ, but I certainly haven't been able
to find an answer.
Is it possible to set the program name as seen by the
operating system or lower-level libraries?
I'm connecting to a database, and the runtime helpfully
sends some information to the server, such as username,
Bret wrote:
i have a csv file like so:
row1,field1,[field2][text in field2 quote, quote],field3,field
row2,field1,[field2]text in field2 quote, quote,field3,field
using csv.reader to read the file, the first row is broken into two
fields:
[field2][text in field2 quote
and
quote
while the
Thanks John,
I didn't realize that the quotes were supposed to surround the entire
field. I ended up making a quick script to replace comma's outside
quotes with tabs. I was just trying to clean this crazy csv file to
import into msyql.
thanks again,
bret
--
Erlang uses quite a bit of mutable state behind the scenes ... the
programmers just don't see it.
George
Heh... The CPUs use quite a bit of mutable state behind the scenes ...
the programmers just don't see it.
Actually with CPU they see it more, than... say Erlang (that's why you
need to
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 specifications as possible though I suppose the
difference
Robert Kern wrote:
On 2009-06-09 14:43, Terry Reedy wrote:
jon vs. python wrote:
Python and the stdlib is all open source. If he were to submit a patch,
and it were ignored or rejected for whatever reason, he could still
release it and register it on PyPI. I just checked and NONE of the 6710
On 6/9/2009 11:59 AM Jon Harrop said...
toby wrote:
On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote:
snip
No. Most programmers still care about performance
Frequently when they shouldn't.
I disagree. A lot of software is still far too slow because the programmers
failed to pay
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.environ[TECHROOT],
tools/python/modules))
But that eventually evolved into..
import os, site; site.addsitedir(os.path.join(os.environ.get
On Jun 9, 12:42 pm, Terry Reedy tjre...@udel.edu wrote:
Hendrik van Rooyen wrote:
I should have known - you use a string method to get a list of words,
but you have to go to the list to get a list of characters from a string.
That is symmetry.
There is no string method to do it, which is
On 2009-06-09 16:34, Terry Reedy wrote:
Robert Kern wrote:
On 2009-06-09 14:43, Terry Reedy wrote:
jon vs. python wrote:
Python and the stdlib is all open source. If he were to submit a patch,
and it were ignored or rejected for whatever reason, he could still
release it and register it on
On 2009-06-09 17:06, Carl Banks wrote:
On Jun 9, 12:42 pm, Terry Reedytjre...@udel.edu wrote:
Hendrik van Rooyen wrote:
I should have known - you use a string method to get a list of words,
but you have to go to the list to get a list of characters from a string.
That is symmetry.
There is
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.environ[TECHROOT],
tools/python/modules))
But that eventually evolved into..
import os, site;
En Tue, 09 Jun 2009 18:33:39 -0300, Esmail ebo...@hotmail.com escribió:
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 think you shouldn't worry about that - the difference may be as
On Jun 9, 4:33 pm, Esmail ebo...@hotmail.com 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
On 2009-06-09 18:05, Mensanator wrote:
On Jun 9, 4:33 pm, Esmailebo...@hotmail.com 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
On Jun 9, 2009, at 7:05 PM, Mensanator wrote:
On Jun 9, 4: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
On Tue, 09 Jun 2009 04:57:48 -0700, samwyse wrote:
Time to test things! I'm going to compare three things using Python
3.0:
X={...}\nS=lambda x: x in X
S=lambda x: x in {...}
S=lambda x: x in (...)
where the ... is replaced by lists of integers of various lengths.
Here's the test
Gabriel Genellina wrote:
En Tue, 09 Jun 2009 18:33:39 -0300, Esmail ebo...@hotmail.com escribió:
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 think you shouldn't worry about that -
Robert Kern wrote:
On 2009-06-09 18:05, Mensanator wrote:
On Jun 9, 4:33 pm, Esmailebo...@hotmail.com wrote:
That's wrong. Where did you get it?
http://docs.python.org/library/random
What he said :-)
(thanks Robert)
--
http://mail.python.org/mailman/listinfo/python-list
Miles Kaufmann wrote:
I'm curious what algorithm calls for random numbers on a closed interval.
I'm implementing a Particle Swarm Optimizer. Depending on what paper you
read you'll see mention of required random values between 0 and 1
which is somewhat ambiguous. I came across one paper that
On Tue, 9 Jun 2009 16:30:06 -0700 (PDT), rh0dium steven.kl...@gmail.com
wrote:
Apparently there is a problem with the if statement???
Thanks
No for .pth files this needs to be on a single line..
I can't really see why you need conditional code...
If you want to add more locations...
On Jun 9, 6:12 pm, Robert Kern robert.k...@gmail.com wrote:
On 2009-06-09 18:05, Mensanator wrote:
On Jun 9, 4:33 pm, Esmailebo...@hotmail.com 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
1 - 100 of 185 matches
Mail list logo