Re: Seeding the rand() Generator

2009-08-04 Thread Fred Atkinson
On Tue, 04 Aug 2009 07:12:30 GMT, Jarkko Torppa wrote: >On 2009-08-04, Fred Atkinson wrote: >> On Mon, 3 Aug 2009 20:00:08 -0700 (PDT), Carl Banks >> wrote: >>> >>>If you don't "get" why this is a MySQL question and not a Python >>>quest

Re: Seeding the rand() Generator

2009-08-03 Thread Fred Atkinson
On Mon, 3 Aug 2009 20:00:08 -0700 (PDT), Carl Banks wrote: >Your question is a MySQL question, not a Python question. I don't >know off hand how to seed the RNG in MySQL, and, since this is a >Python group and not a MySQL group, I don't care to look it up. But >if you were able to produce the M

Re: Seeding the rand() Generator

2009-08-03 Thread Fred Atkinson
On Sun, 2 Aug 2009 17:00:40 -0700 (PDT), Carl Banks wrote: I appreciate the response. I am executing a statement to retrieve one record at random. An example would be: SELECT first, second, third, fourth, fifth, sixth from sometable order by rand() limit 1 I

Get Cliet IP Address

2009-08-02 Thread Fred Atkinson
What is the function to obtain the client browser's IP address? Fred -- http://mail.python.org/mailman/listinfo/python-list

Re: Predefined Variables

2009-08-02 Thread Fred Atkinson
On Sun, 02 Aug 2009 08:11:22 -0700, Scott David Daniels wrote: >Piet van Oostrum wrote: >>>>>>> Scott David Daniels (SDD) wrote: >>> SDD> Stephen Cuppett (should have written in this order): >>>>> "Fred Atkinson" wrote ... >

Re: Seeding the rand() Generator

2009-08-02 Thread Fred Atkinson
On Sun, 02 Aug 2009 08:53:50 -0700, Scott David Daniels wrote: >Fred Atkinson wrote: >> How does one seed the rand() generator when retrieving random >> recordings in MySQL? > >It is not entirely clear what you are asking. If you are talking about >MySQL's

Seeding the rand() Generator

2009-08-02 Thread Fred Atkinson
How does one seed the rand() generator when retrieving random recordings in MySQL? Regards, Fred -- http://mail.python.org/mailman/listinfo/python-list

Re: Predefined Variables

2009-08-01 Thread Fred Atkinson
On Sat, 01 Aug 2009 18:56:33 -0700, Fred Atkinson wrote: >On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch" > wrote: > >>Fred Atkinson wrote: >> >>> Is there a pre-defined variable that returns the GET line >>> (http://www.php.net/index.ph

Re: Predefined Variables

2009-08-01 Thread Fred Atkinson
On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch" wrote: >Fred Atkinson wrote: > >> Is there a pre-defined variable that returns the GET line >> (http://www.php.net/index.php?everythingafterthequestionmark) as a >> single variable (rather than individ

Predefined Variables

2009-07-24 Thread Fred Atkinson
Is there a pre-defined variable that returns the GET line (http://www.php.net/index.php?everythingafterthequestionmark) as a single variable (rather than individual variables)? Regards, Fred -- http://mail.python.org/mailman/l

Final Project

2009-07-19 Thread Fred Atkinson
I'm looking for some ideas here. I think I've mentioned I am taking a course in Python and PHP. The professor wants each of us to pick a project to write in both languages. It has to be something fairly complex and I'd like for it to be something that would be useful on my Web s

Re: explode()

2009-07-14 Thread Fred Atkinson
On Mon, 13 Jul 2009 23:54:11 -0700 (PDT), alex23 wrote: >Fred Atkinson wrote: >>         I wish the Python site was as well written as the PHP site. On >> the PHP site, I can look up a command and they show not only the docs >> on that command but a list of all other comman

Re: explode()

2009-07-14 Thread Fred Atkinson
On Tue, 14 Jul 2009 05:41:40 GMT, Tim Harig wrote: >On 2009-07-14, Fred Atkinson wrote: >> The one thing I really dislike about Python over PHP is that >> Python can usually only appear in the cgi directory (unless other >> arragements are made with your hosti

Re: explode()

2009-07-13 Thread Fred Atkinson
On Mon, 13 Jul 2009 22:32:55 -0700, Chris Rebert wrote: >On Mon, Jul 13, 2009 at 11:28 PM, Fred Atkinson wrote: >> On Sat, 11 Jul 2009 18:50:28 -0700, Chris Rebert >> wrote: >> >>>On Sat, Jul 11, 2009 at 7:41 PM, Fred Atkinson wrote: >>>>        What i

Re: explode()

2009-07-13 Thread Fred Atkinson
On Sat, 11 Jul 2009 18:50:28 -0700, Chris Rebert wrote: >On Sat, Jul 11, 2009 at 7:41 PM, Fred Atkinson wrote: >>        What is the Python equivalent of the PHP explode() function? > >some_string.split("separator") > >Cheers, >Chris What would the equival

Re: explode()

2009-07-11 Thread Fred Atkinson
On Sat, 11 Jul 2009 18:50:28 -0700, Chris Rebert wrote: >On Sat, Jul 11, 2009 at 7:41 PM, Fred Atkinson wrote: >>        What is the Python equivalent of the PHP explode() function? > >some_string.split("separator")

explode()

2009-07-11 Thread Fred Atkinson
What is the Python equivalent of the PHP explode() function? Fred -- http://mail.python.org/mailman/listinfo/python-list

Re: IP Address Function

2009-07-08 Thread Fred Atkinson
On Wed, 08 Jul 2009 12:29:54 +0200, Piet van Oostrum wrote: >Something like: > >#! /usr/bin/env python > >import cgi >from os import getenv > >print "Content-type: text/html" >print > >ipaddr = (getenv("HTTP_CLIENT_IP") or > getenv("HTTP_X_FORWARDED_FOR") or > getenv("HTTP_X_FORWARDED_F

Re: IP Address Function

2009-07-08 Thread Fred Atkinson
On Tue, 07 Jul 2009 22:54:03 -0300, "Gabriel Genellina" wrote: >En Tue, 07 Jul 2009 22:45:24 -0300, Fred Atkinson >escribió: > >> Is there a Python function I can use to get the user's IP >> address so I can display it on his browser? > >The

IP Address Function

2009-07-07 Thread Fred Atkinson
Is there a Python function I can use to get the user's IP address so I can display it on his browser? Regards, Fred -- http://mail.python.org/mailman/listinfo/python-list