.split() Qeustion

2013-08-16 Thread Alfonso Andalon Jr.
-- http://mail.python.org/mailman/listinfo/python-list

Rock, Paper, Scissors game

2013-08-16 Thread Larry Hudson
Some time ago there was a post asking for help on a rock/paper/scissors game. I read that thread at the time it was posted, but since it received several answers I didn't pay too much attention to it. But I can't find that thread again right now. However, the subject stuck (loosely) in my mind,

Re: .split() Qeustion

2013-08-16 Thread Chris Angelico
On Sat, Aug 17, 2013 at 3:38 AM, Steven D'Aprano wrote: > On Fri, 16 Aug 2013 05:27:49 +, Dave Angel wrote: > >> I figure it just under a foot. I once attended a lecture by Grace >> Hopper where she handed out "nanoseconds," pieces of wire about a foot >> long. > > Is that based on the speed

Re: .split() Qeustion

2013-08-16 Thread Steven D'Aprano
On Fri, 16 Aug 2013 05:27:49 +, Dave Angel wrote: > I figure it just under a foot. I once attended a lecture by Grace > Hopper where she handed out "nanoseconds," pieces of wire about a foot > long. Is that based on the speed of light in a vacuum, speed of light in copper, speed of electr

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread Roy Smith
In article <0d60fd90-eb19-4702-acd5-dd7ba0edd...@googlegroups.com>, taldcr...@cfa.harvard.edu wrote: > Python is showing up in high-school and colllege intro programming > courses here in the U.S. Yup. For the past few years, I've been a judge in the NYC Science and Engineering Fair (http:

Re: Writing a “social network” in Python (was: Open-source vs. closed-source for centralised social-networks?)

2013-08-16 Thread David Hutto
Is this social network app based, or browser based. Either will need an updated server file, or a db field. On Tue, Aug 13, 2013 at 7:08 PM, Ben Finney wrote: > Alec Taylor writes: > > > Fear open-sourcing fledgling social-networks; as centralisation is > > easily losable. > > Welcome! This

Re: The meaning of "doubt", was Re: Python Basic Doubt

2013-08-16 Thread David Hutto
You could say that all translated languages lose something in translation. It's all symbolism. I say sunshine, and you might say Great Ball of' Fire in the s ky. Isay x = 10 in python print x and in c++ something like unsigned int x cin << x; cout >> x; or something like that. It's someth

Re: .split() Qeustion

2013-08-16 Thread Gregory Ewing
Gene Heskett wrote: Where a 1 degree shift, may or may not have been noticeable, was the cable equivalent of 7.7601420788892939683e-10 seconds, which was for the small foam cored cables used for such, with a Propagation Velocity of 0.78*C, only a very short length of cable. I'd have figured ho

Re: Proper use of the codecs module.

2013-08-16 Thread Chris Angelico
On Fri, Aug 16, 2013 at 3:02 PM, Andrew wrote: > I have a mixed binary/text file[0], and the text portions use a radically > nonstandard character set. I want to read them easily given information > about the character encoding and an offset for the beginning of a string. To add to all the inform

Re: http post goes into $_REQUEST instead into $_FILES

2013-08-16 Thread Piet van Oostrum
cerr writes: > Hi, > > I have a Python script that is executing an http POST to transfer a file from > the client to the server. I have achieved this with below code: > but my problem is, the data gets posted to the sever but arrives in > the `$_REQUEST` array and I'm expected to post stuff s

Re: Proper use of the codecs module.

2013-08-16 Thread Andrew
On 16 Aug 2013 19:12:02 GMT, Steven D'Aprano wrote: > If you try opening the file in text mode, you'll very likely break the > binary parts (e.g. converting the two bytes 0x0D0A to a single byte > 0x0A). So best to stick to binary only, extract the "text" portions of > the file, then explicitly

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread chris . barker
On Friday, August 16, 2013 11:51:49 AM UTC-7, Steven D'Aprano wrote: > > The trick here is that numpy really is the "right" way to do this stuff. > Numpy does not have a monopoly on the correct algorithms for statistics > functions, indeed not -- in fact, a number of them are quite lame, either

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread Oscar Benjamin
On 16 August 2013 20:00, wrote: > > > One other point -- for performance reason, is would be nice to have some > compiled code in there -- this adds incentive to put it in the stdlib -- > external packages that need compiling is what makes numpy unacceptable to > some folks. >> >> It might be

RE: PEP 450 Adding a statistics module to Python

2013-08-16 Thread Prasad, Ramit
CM wrote: > > On Friday, August 9, 2013 9:10:18 PM UTC-4, Steven D'Aprano wrote: > > I am seeking comments on PEP 450, Adding a statistics module to Python's > > standard library: > > I think it's a very good idea. Good PEP points, too. I hope it happens. > +1 especially for non-Cpython versi

Re: Proper use of the codecs module.

2013-08-16 Thread Steven D'Aprano
On Fri, 16 Aug 2013 10:02:08 -0400, Andrew wrote: > I have a mixed binary/text file[0], and the text portions use a > radically nonstandard character set. I want to read them easily given > information about the character encoding and an offset for the beginning > of a string. "Mixed binary/text"

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread chris . barker
On Friday, August 16, 2013 10:15:52 AM UTC-7, Oscar Benjamin wrote: > On 16 August 2013 17:31, wrote: > Although it doesn't mention this in the PEP, a significant point that > > is worth bearing in mind is that numpy is only for CPython, not PyPy, > > IronPython, Jython etc. See here for a rece

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread Steven D'Aprano
On Fri, 16 Aug 2013 09:31:34 -0700, chris.barker wrote: >> > I am seeking comments on PEP 450, Adding a statistics module to >> > Python's > > The trick here is that numpy really is the "right" way to do this stuff. Numpy does not have a monopoly on the correct algorithms for statistics functio

Re: How to I do this in Python ?

2013-08-16 Thread random832
On Fri, Aug 16, 2013, at 7:47, Roy Smith wrote: > There is no need to shell out to dd just to do this. All dd is doing > for you is seeking to the offset you specify and closing the file. You > can do that entirely in Python code. > > http://docs.python.org/2.7/library/stdtypes.html#file.seek

Shen video appeal - generating type secure Python

2013-08-16 Thread Mark Tarver
Shen is a hypermodern functional programming language based on a core that is essentially a Lisp, but portable to many major language platforms. One of these platforms is Python. I am asking for support for the Shen project in this video appeal www.shenlanguage.org/appeal.html The video explai

Lettuce vs Behave

2013-08-16 Thread cutems93
I found that BDD is a very good philosophy for coding and checking my program, and I decided to use either of these two software. However, it seems these two are very similar in the way they function. As professionals, what do you prefer and why? -- http://mail.python.org/mailman/listinfo/pytho

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread Oscar Benjamin
On 16 August 2013 17:31, wrote: >> > I am seeking comments on PEP 450, Adding a statistics module to Python's > > The trick here is that numpy really is the "right" way to do this stuff. Although it doesn't mention this in the PEP, a significant point that is worth bearing in mind is that numpy

Re: .split() Qeustion

2013-08-16 Thread Gene Heskett
On Friday 16 August 2013 10:27:36 Dave Angel did opine: > Roy Smith wrote: > > In article <520da6d1$0$3$c3e8da3$54964...@news.astraweb.com>, > > > > Steven D'Aprano wrote: > >> On Thu, 15 Aug 2013 16:43:41 +0100, Chris Angelico wrote: > >> > A mole is as much a number (6e23) as the light ye

Re: .split() Qeustion

2013-08-16 Thread Gene Heskett
On Friday 16 August 2013 10:07:12 Roy Smith did opine: > In article <520da6d1$0$3$c3e8da3$54964...@news.astraweb.com>, > > Steven D'Aprano wrote: > > On Thu, 15 Aug 2013 16:43:41 +0100, Chris Angelico wrote: > > > A mole is as much a number (6e23) as the light year is a number > > > (9.5e15

Re: Options ExecCGI is off in this directory:

2013-08-16 Thread helmut_blass
On Friday, August 16, 2013 5:41:56 PM UTC+2, Xavi wrote: > You do not say the version of apache. If it's the 2.4 > > must change "allow from all" to "Require all granted". it is apache2.2.14, so that's not the point. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread chris . barker
> > I am seeking comments on PEP 450, Adding a statistics module to Python's The trick here is that numpy really is the "right" way to do this stuff. I like to say: "crunching numbers in python without numpy is like doing text processing without using the string object" What this is really an

Re: PEP 450 Adding a statistics module to Python

2013-08-16 Thread taldcroft
On Friday, August 9, 2013 9:10:18 PM UTC-4, Steven D'Aprano wrote: > I am seeking comments on PEP 450, Adding a statistics module to Python's > > standard library: > > > > http://www.python.org/dev/peps/pep-0450/ > > > > Please read the FAQs before asking anything :-) > I think this is a

Re: Options ExecCGI is off in this directory:

2013-08-16 Thread Xavi
You do not say the version of apache. If it's the 2.4 must change "allow from all" to "Require all granted". HTH -- Xavi El 16/08/2013 12:28, helmut_bl...@web.de escribió: Hello, I am desperately trying to get my python script running, but I alway get a 403-Error. apache logfile says: Options

THRINAXODON ON RAGE.

2013-08-16 Thread THRINA.XODON
>THRINAXODON GETS REVENGE AGAINST SMITHSONIAN ASS HOLES. > TODAY; THE SMITHSONIAN BURNED THRINAXODON'S HOUSE DOWN; AS HE WENT TO GET GROCERY'S FROM MARK'S. > THE ARSONISTS WERE COMPO

Proper use of the codecs module.

2013-08-16 Thread Andrew
I have a mixed binary/text file[0], and the text portions use a radically nonstandard character set. I want to read them easily given information about the character encoding and an offset for the beginning of a string. The descriptions of the codecs module and codecs.register() in particular see

Re: .split() Qeustion

2013-08-16 Thread Grant Edwards
On 2013-08-16, Roy Smith wrote: > In article , > Ben Finney wrote: > >> Avogadro's Number is worth remembering, for mocking the pseudo-science >> of homeopathy http://www.1023.org.uk/what-is-homeopathy.php>. > > You have obviously never argued science with a homeopath if you believe > that know

Re: .split() Qeustion

2013-08-16 Thread Roy Smith
In article <2d88bc0f-fdcb-4685-87ed-c17998dd3...@googlegroups.com>, wxjmfa...@gmail.com wrote: > A chemist has to work and is always working in mole; as his > balance can only measure a mass, the calculation mole <-> mass > is always mandatory. That's because chemists are lazy. The recipe says,

Re: .split() Qeustion

2013-08-16 Thread wxjmfauth
- A mole is an amount of matter measured in [kg] . The Avogadro's number can only be a dimensionless number, [1] . The Avogadro's constant is the Avogadro's number (of "pieces" or "objects") per mol, [1 / mol]. A chemist has to work and is always working in mole; as his balance can only measu

Re: How to I do this in Python ?

2013-08-16 Thread Roy Smith
In article , Ganesh Pal wrote: > # Creating sparse files in the sparse path > sparse_path = os.path.join(path,'sparsefiles') > os.makedirs(sparse_path) > os.chdir(sparse_path) > sparsefiles = "dd if=/dev/zero of=sp1 count=0 bs=1 seek=10G" > process_0 = subprocess.Popen(

Re: .split() Qeustion

2013-08-16 Thread Roy Smith
In article , Ben Finney wrote: > Avogadro's Number is worth remembering, for mocking the pseudo-science > of homeopathy http://www.1023.org.uk/what-is-homeopathy.php>. You have obviously never argued science with a homeopath if you believe that knowing Avogadro's number will in any way shake t

Re: How to I do this in Python ?

2013-08-16 Thread Steven D'Aprano
Hi Ganesh, and welcome! Unfortunately, you ask your questions in reverse order. The most general (and important) question comes last, and the least important first, so I'm going to slice-and-dice your post and answer from most general to least. On Fri, 16 Aug 2013 11:51:32 +0530, Ganesh Pal w

Options ExecCGI is off in this directory:

2013-08-16 Thread helmut_blass
Hello, I am desperately trying to get my python script running, but I alway get a 403-Error. apache logfile says: Options ExecCGI is off in this directory:/home/user12/cgi-bin/showblogs.py - apache configuration: AllowOverride None AddType application/python .py DirectoryIndex index.html index.h

Re: "Nested" virtual environments

2013-08-16 Thread Luca Cerone
Thanks Marcel, I will give it a try during the weekend and let you know if it worked for me :) > > If you have a recent version of pip, you can use wheels [1] to save built > packages locally. First create a new virtualenv and install the common > packages. Then put these packages in a wheel dir

Re: Want to learn Python

2013-08-16 Thread Nikhil Bansode
On Thursday, August 15, 2013 7:51:43 PM UTC+5:30, prem kumar wrote: > Hi All, > > > > Presently Iam working with QTP(VBscript)..Now planning to learn PYTHON..Could > you please suggest me like is ti good to learn what is the present condition > for Python in IT Companies.. > > Iam not thinkin

How to I do this in Python ?

2013-08-16 Thread Ganesh Pal
Hello Friends , Iam a newbie to python , Iam writing a small script that would generate various kinds of files in the specified path . Iam using sub process module to achieve this , I have stuck with few basic problems , any help on this would be great Case (a) : The below code creates the onl