On 5/31/2023 3:52 PM, Dennis Lee Bieber wrote:
Python does not provide, normally, a "click me" icon to run Python.
Python is a command line language INTERPRETER/COMPILER. If file
associations are set up, clicking on a script (.py) file/will/ run it --
but the window it opens goes away as soon as
On Wed, 31 May 2023 08:34:48 +0100, Mark Bass
declaimed the following:
>-- Forwarded message -
>From: Mark Bass
>Date: Wed, 31 May 2023 at 08:09
>Subject: Problems Installing and getting started.
>To:
>
>
>Good morning,
>
>I installed python seve
On 2023-05-31 08:34, Mark Bass wrote:
-- Forwarded message -
From: Mark Bass
Date: Wed, 31 May 2023 at 08:09
Subject: Problems Installing and getting started.
To:
Good morning,
I installed python several hours ago (from python.org), I then installed
the IDE PyCharm. I
you have loaded into the project.
> On May 31, 2023, at 11:55 AM, Mark Bass wrote:
>
> -- Forwarded message -
> From: Mark Bass
> Date: Wed, 31 May 2023 at 08:09
> Subject: Problems Installing and getting started.
> To:
>
>
> Good morning,
&
-- Forwarded message -
From: Mark Bass
Date: Wed, 31 May 2023 at 08:09
Subject: Problems Installing and getting started.
To:
Good morning,
I installed python several hours ago (from python.org), I then installed
the IDE PyCharm. I'm using AI to help with a project
f of Steve Pruitt via Python-list
Sent: Friday, June 11, 2021 9:24 AM
To: python-list@python.org
Subject: [EXTERNAL] - jython getting started question
CAUTION: This email originated from outside of the organization. Do not click
links or open attachments unless you recognize the sender and know t
Not sure if this is the right list for jython questions.
I am getting started with both python and jython. My use case need is invoking
python from java. org.python:jython:2.7.2 loaded ok.
To check, I executed the following.
ScriptEngineManager manager = new ScriptEngineManager();
List
I downloaded the software and have been given a few test commands to use.
When I run it as it is, I get the request to enter the commands manually and
they work.
I do not see how to get the commands to work automatically. Somehow, I have
to bypass the "Enter command or 'Q' to quit"
How do I do thi
subhendu.pand...@gmail.com wrote:
Hi,
Could you please help me with the below if possible:
Possible and reasonable are two different things. Why don't you try
some web searches and try to answer some of your own questions. I offer
this advice as a Python newbe myself.
Bill
1. Best si
Hi,
Could you please help me with the below if possible:
1. Best site to go ahead for python.
2. How python is different from other languages and future scope of it.
3. Tasks that are getting done using python in present.
4. Link where I can be able to get python videos, ebooks from basics to exp
Is there a good guide to getting started with type-checking Python code?
Specifically as an aid to porting from Python 2 to 3.
There are the PEPs, of course. Anything else?
Apart from mypy, what type checkers are available?
--
Steve
“Cheer up,” they said, “things could be worse.” So I
1. I want to learn basic image processing in python. (working on raspberry pi 2
board)
2. I have a image with different color dots like red,white, etc.After taking
image, need to identify how many are red,white etc.
I am looking for free image processing libs for that. Which one is better for
Forgot to mention. you might want to take a look at numpy and pandas for their
structures.
https://github.com/numpy/numpy
https://github.com/pydata/pandas
I always find it easier to look at something concrete.
Ivan
--
https://mail.python.org/mailman/listinfo/python-list
Hi Glenn,
Welcome to the community and thank you for creating this module. It's great
you want to get this going in Python (3?).
A couple of things:
1) I looked at the github repo. You do not have anything to be deployed there.
Actually, that repo has nothing to do with python as of yet, as
In a message of Mon, 12 Oct 2015 16:58:40 -0600, Ian Kelly writes:
>Just saying that it doesn't work doesn't help us help you. What
>precisely have you tried, and what was the error that you got when you
>tried it?
What Ian said. Also what python version are you using and what OS?
Laura
--
htt
On Mon, Oct 12, 2015 at 4:42 PM, Glenn Schultz wrote:
> Hello All,
>
> I have an application written in R for the analysis of mortgage-backed and
> asset-backed securities. I am in the process of writing it in Python. I
> need some help getting started.Here is the repos
Hello All,
I have an application written in R for the analysis of mortgage-backed and
asset-backed securities. I am in the process of writing it in Python. I need
some help getting started.Here is the repository
https://github.com/glennmschultz/Bond_Lab
I think I have the deployment
On 12/07/2015 21:29, Laura Creighton wrote:
In a message of Sun, 12 Jul 2015 21:09:22 +0100, Mark Lawrence writes:
On 12/07/2015 20:47, Laura Creighton wrote:
Simon Evans -- what editor are you using to write your Python code with?
Laura Creighton
Editor? His earlier posts clearly show he'
In a message of Sun, 12 Jul 2015 21:09:22 +0100, Mark Lawrence writes:
>On 12/07/2015 20:47, Laura Creighton wrote:
>> Simon Evans -- what editor are you using to write your Python code with?
>>
>> Laura Creighton
>>
>
>Editor? His earlier posts clearly show he's using the 2.7.6 32 bit
>interacti
On 07/12/2015 05:48 AM, Simon Evans wrote:
Dear Peter Otten,
Yes, I have been copying and pasting, as it saves typing. I do get 'indented
block' error responses as a small price
> to pay for the time and energy thus saved.
>
You CANNOT ignore indenting.
Indenting is NOT optional, it is REQUIRED
On 12/07/2015 20:47, Laura Creighton wrote:
Simon Evans -- what editor are you using to write your Python code with?
Laura Creighton
Editor? His earlier posts clearly show he's using the 2.7.6 32 bit
interactive interpreter on Windows.
--
My fellow Pythonistas, ask not what our language c
Simon Evans -- what editor are you using to write your Python code with?
Laura Creighton
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 12 Jul 2015 19:33:17 +0200, Simon Evans
wrote:
Dear Peter Otten,
I typed in (and did not copy and paste) the code as you suggested just
now (6.28 pm, Sunday 12th July 2015), this is the result I got:
Pyth
On 12/07/2015 18:33, Simon Evans wrote:
Dear Peter Otten,
I typed in (and did not copy and paste) the code as you suggested just now
(6.28 pm, Sunday 12th July 2015), this is the result I got:
Python 2.7.6 (default, No
On 2015-07-12 18:33, Simon Evans wrote:
Dear Peter Otten,
I typed in (and did not copy and paste) the code as you suggested just now
(6.28 pm, Sunday 12th July 2015), this is the result I got:
Python 2.7.6 (default, No
On Mon, Jul 13, 2015 at 3:54 AM, Laurent Pointal
wrote:
> Double \ in your string:
> "C:\\Beautiful Soup\\ecologicalpyramid.html"
>
> Or use a raw string by prepending a r to disable escape sequences:
> r"C:\Beautiful Soup\ecologicalpyramid.html"
Or use forward slashes:
"C:/Be
Simon Evans wrote:
> -
with open("C:\Beautiful Soup\ecologicalpyramid.html","r") as
You seem to run Python under Windows.
You have to take care of escape mechanism beyond \ char in string literals
(see Python docs).
By
Dear Peter Otten,
I typed in (and did not copy and paste) the code as you suggested just now
(6.28 pm, Sunday 12th July 2015), this is the result I got:
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit
Simon Evans wrote:
> Dear Peter Otten,
> Yes, I have been copying and pasting, as it saves typing. I do get
> 'indented block' error responses as a small price to pay for the time and
> energy thus saved. Also Console seems to reject for 'indented block'
> reasons better known to itself, copy and
Dear Peter Otten,
Yes, I have been copying and pasting, as it saves typing. I do get 'indented
block' error responses as a small price to pay for the time and energy thus
saved. Also Console seems to reject for 'indented block' reasons better known
to itself, copy and pasted lines that it accep
Dear Peter Otten,
Incidentally, you have discovered a fault in that there is an erroneous
difference in my code of 'ecologicalpyramid.html' and that given in the text,
in the first few lines re:
plants
1000
Simon Evans wrote:
> Dear Peter Otten, thank you for your reply that I have not gone very far
> into the detail of which, as it seems Python console cannot recognise the
> name 'f' as given it, re output below :
>
>
> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
> on
Dear Peter Otten, thank you for your reply that I have not gone very far into
the detail of which, as it seems Python console cannot recognise the name 'f'
as given it, re output below :
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright"
Simon Evans wrote:
> Dear Mark Lawrence, thank you for your advice.
> I take it that I use the input you suggest for the line :
>
> soup = BeautifulSoup("C:\Beautiful Soup\ecological_pyramid.html",lxml")
>
> seeing as I have to give the file's full address I therefore have to
> modify your :
>
icalpyramid' html file, or more
specifically why does it respond that the html file has no such attribute as
'li' ?
Incidentally I have installed all the xml, lxml, html, and html5 TreeBuilders/
Parsers. I am using lxml as that is the format specified in the text.
I may as well qu
On 11/07/2015 23:17, Simon Evans wrote:
Dear Programmers,
Thank you for your advice regarding giving the console a current address in the
code for it to access the html file.
The console seems to accept the code to that extent, but when I input the two
lines of code intended to access the loca
Dear Programmers,
Thank you for your advice regarding giving the console a current address in the
code for it to access the html file.
The console seems to accept the code to that extent, but when I input the two
lines of code intended to access the location of a required word, the console
re
On Mon, Dec 15, 2014 at 1:48 AM, Simon Evans wrote:
> Thanks Guys
> This book keeps swapping from the Python console to the Windows - without
> telling you, but it is the only book out there on 'Beautiful Soup' so I have
> got to put up with it. There's more problems with it, but I will start a
Thanks Guys
This book keeps swapping from the Python console to the Windows - without
telling you, but it is the only book out there on 'Beautiful Soup' so I have
got to put up with it. There's more problems with it, but I will start a new
thread in regard of, I don't know if its related to the
On 12/11/2014 02:40 PM, Chris Angelico wrote:
On Fri, Dec 12, 2014 at 6:34 AM, Dave Angel wrote:
Please give your environment when starting a new thread. Python version and
OS version. In this case, I'm guessing Windows, because I have to guess
something to give a meaningful answer.
On 12/11
On Fri, Dec 12, 2014 at 6:34 AM, Dave Angel wrote:
> Please give your environment when starting a new thread. Python version and
> OS version. In this case, I'm guessing Windows, because I have to guess
> something to give a meaningful answer.
>
> On 12/11/2014 02:21 PM, Simon Evans wrote:
>> Py
Please give your environment when starting a new thread. Python version
and OS version. In this case, I'm guessing Windows, because I have to
guess something to give a meaningful answer.
On 12/11/2014 02:21 PM, Simon Evans wrote:
At the start of Chapter 3 of 'Getting Started in
On Thursday, December 11, 2014 11:21:52 AM UTC-8, Simon Evans wrote:
> At the start of Chapter 3 of 'Getting Started in Beautiful Soup' it has said
> to create a html file, 'ecological
>
> pyramid.html'
At the start of Chapter 3 of 'Getting Started in Beautiful Soup' it has said to
create a html file, 'ecological
pyramid.html' - which I have already done re:
plants
10
algae
10
Getting started with Python: The ultimate list with Tips, Tools and Resources
http://lurnq.com/lesson/Getting-started-with-Python-Tips-Tools-and-Resources/
Here is a lesson which includes a great set of resources including Books,
MOOCs, Video Tutorials, Interactive tutorials, exercises which can
Getting started with Python: Tips, Tools and Resources
http://lurnq.com/lesson/getting-started-with-python-tips-tools-and-resources/
This is a lesson I published on LurnQ which acts like a beginners guide. I have
included various Books, MOOCs, Video Tutorials, Interactive tutorials,
exercises
OK, the story so far:
import gdata
import gdata.auth
import gdata.gauth
import gdata.docs.service
import OpenSSL.crypto
tokenfile = "privatekey.p12"
#f = open(tokenfile, 'r')
#blob = f.read()
#f.close()
#if blob:
p12 = OpenSSL.crypto.load_pkcs12(file(tokenfile, 'rb').read(), 'notasecret')
print
OK, maybe the p12 file is useful after all (?) I've got the following code:
import gdata
tokenfile = "my-privatekey.p12"
f = open(tokenfile, 'r')
blob = f.read()
f.close()
token = gdata.gauth.token_from_blob(blob)
When I run that I get:
Traceback (most recent call last):
File "/home/mcarter/wa
I want to mess around with my online Google spreadsheets from my Linux box
programmatically. I am TOTALLY confused.
I've got gdata installed, and it appears that the best way to access the
spreadsheets is to authenticate with Oauth2.
Here's the main thing: how do I get an Oauth2 key to use with
On Sunday, August 5, 2012 7:46:54 PM UTC-4, PeterSo wrote:
> I am just starting to learn Python, and I like to use the editor
>
> instead of the interactive shell. So I wrote the following little
>
> program in IDLE
>
>
>
> # calculating the mean
>
>
>
> data1=[49, 66, 24, 98, 37, 64, 98, 2
On Aug 5, 7:09 pm, Rotwang wrote:
> On 06/08/2012 00:46, PeterSo wrote:
>
>
>
>
>
>
>
>
>
> > I am just starting to learn Python, and I like to use the editor
> > instead of the interactive shell. So I wrote the following little
> > program in IDLE
>
> > # calculating the mean
>
> > data1=[49, 66,
On 8/5/2012 7:46 PM, PeterSo wrote:
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
# calculating the mean
data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 78, 22, 25, 11]
def mean(data):
On 06/08/2012 02:01, Matthew Barnett wrote:
On 06/08/2012 01:58, MRAB wrote:
On 06/08/2012 01:09, Rotwang wrote:
On 06/08/2012 00:46, PeterSo wrote:
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDL
On 06/08/2012 01:58, MRAB wrote:
On 06/08/2012 01:09, Rotwang wrote:
On 06/08/2012 00:46, PeterSo wrote:
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
# calculating the mean
data1=[49, 66, 24,
On 06/08/2012 01:09, Rotwang wrote:
On 06/08/2012 00:46, PeterSo wrote:
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
# calculating the mean
data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 7
On 06/08/2012 00:46, PeterSo wrote:
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
[snip]
I can't comment on IDLE as I've never used it, but you're doing yourself
a big disservice if you don't
On 06/08/2012 00:46, PeterSo wrote:
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
# calculating the mean
data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 78, 22, 25, 11]
def mean(data):
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
# calculating the mean
data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 78, 22, 25, 11]
def mean(data):
return sum(data)/len(data)
mean(da
On 25May2012 09:37, Dave Angel wrote:
| On 05/25/2012 09:12 AM, Harvey Greenberg wrote:
| > elementary ques...I set
| > s.name = ["a","b"]
| > s.value = [3,5]
| >
| > I get error that s is not defined. How do I define s and proceed to
| > give its attributes?
[...]
| Of course if you told why you
On 05/25/2012 09:12 AM, Harvey Greenberg wrote:
> elementary ques...I set
> s.name = ["a","b"]
> s.value = [3,5]
>
> I get error that s is not defined. How do I define s and proceed to
> give its attributes?
You just have to initialize s as an object that's willing to take those
attributes. The
> s.name = ["a","b"]
> s.value = [3,5]
>
> I get error that s is not defined. How do I define s and proceed to
> give its attributes?
Either you create a class and use __init__:
class S:
def __init__(self, name, value):
self.name = name
self.value = value
or create a generic
Le 29/04/12 00:52, Santosh Kumar a écrit :
> System Information
>
> Ubuntu 11.10
> Python 2.7.2
>
> Problem
>
>
> I think my Ubuntu has PyGTK and GTK both already installed. But
> however when I am importing "gtk" in Python interactive mode then I am
> gett
System Information
Ubuntu 11.10
Python 2.7.2
Problem
I think my Ubuntu has PyGTK and GTK both already installed. But
however when I am importing "gtk" in Python interactive mode then I am
getting the following warning:
(.:4126): Gtk-WARNING **: Unable to
In article
,
Benjamin Kaplan wrote:
> On Sun, Jul 11, 2010 at 1:18 PM, dk wrote:
[...]
> > when i try to compile mysql-python-1.2.3 i get the following error
> > returned from python setup.py build -
> >
> > building '_mysql' extension
> > gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
On Sun, Jul 11, 2010 at 1:18 PM, dk wrote:
> I have been going round and round trying to configure python 2.6
> running on osx 10.6.x to work with mySQL 5.1.44.
> Python seems to work ... i have an installation of mysql 5.1.44
> running and have used it in conjunction for other php/apache projects
I have been going round and round trying to configure python 2.6
running on osx 10.6.x to work with mySQL 5.1.44.
Python seems to work ... i have an installation of mysql 5.1.44
running and have used it in conjunction for other php/apache projects.
I want to learn python and think i need a better
Hi all,
I have a primitive data structure which looks like this.
cells = [{'name': 'AND2X1',
'pins': [{'direction': 'input', 'name': 'A', 'type':
'signal'},
{'direction': 'input', 'name': 'B', 'type':
'signal'},
{'direction': 'output', '
On Fri, 02 May 2008 17:40:02 +0200, Paul Melis wrote:
>
> I'm not sure you've been helped so far as you seem to already understand
> about pyvtk not being the official VTK bindings :)
>
> So, what would you like to know?
Thanks, I think I'm set. For the benefit of the next instance of
me googlin
Peter Pearson wrote:
On Thu, 01 May 2008 16:45:51 -0500, Robert Kern <[EMAIL PROTECTED]> wrote:
pyvtk is not the Python interface to VTK. It is for the
creation of VTK files. The vtk(1) command is a Tcl shell
with the VTK libraries loaded (I believe). Read the VTK
documentation for information
On Thu, 01 May 2008 16:45:51 -0500, Robert Kern <[EMAIL PROTECTED]> wrote:
>
> pyvtk is not the Python interface to VTK. It is for the
> creation of VTK files. The vtk(1) command is a Tcl shell
> with the VTK libraries loaded (I believe). Read the VTK
> documentation for information on the Tcl in
Peter Pearson wrote:
I'm trying to get started with pyvtk, the Python interface
to the Visualization Toolkit, but there's obviously
something important that I haven't figured out after an
embarrassingly long morning of googling around. When I run
sample pyvtk code (example1.py, from
http://cens.
On 1 mei, 22:54, Peter Pearson <[EMAIL PROTECTED]> wrote:
> I'm trying to get started with pyvtk, the Python interface
> to the Visualization Toolkit,
It looks like you're using this package:
http://cens.ioc.ee/projects/pyvtk/
These are not the official Python bindings to VTK, but seem to be an
a
I'm trying to get started with pyvtk, the Python interface
to the Visualization Toolkit, but there's obviously
something important that I haven't figured out after an
embarrassingly long morning of googling around. When I run
sample pyvtk code (example1.py, from
http://cens.ioc.ee/cgi-bin/viewcvs.
[EMAIL PROTECTED] wrote:
> if you are not satisfied with the native version, why not install the
> official version directly from python site
> http://www.python.org/download/ (macpython) instead of using that of
> macports. It moreover is provided with many utilities
>
> There is a macpython list
if you are not satisfied with the native version, why not install the
official version directly from python site
http://www.python.org/download/ (macpython) instead of using that of
macports. It moreover is provided with many utilities
There is a macpython list that you can consult at
http://www.
Mark Carter wrote:
> Arnaud Delobelle wrote:
>
>> Is there a particular reason you want python from MacPorts? OSX
>> Leopard comes with python 2.5, that's what I use on my mac.
>
> I heard from somewhere that Apple's version was a bit wonky, and that I
> would be better off with a "proper" build
Arnaud Delobelle wrote:
> Is there a particular reason you want python from MacPorts? OSX
> Leopard comes with python 2.5, that's what I use on my mac.
I heard from somewhere that Apple's version was a bit wonky, and that I
would be better off with a "proper" build.
--
http://mail.python.org/ma
On Mar 15, 7:31 pm, Mark Carter <[EMAIL PROTECTED]> wrote:
> has wrote:
> > On 15 Mar, 18:05, Mark Carter <[EMAIL PROTECTED]> wrote:
> >> The sorts of things I want to do are:
> >> * copy the directory of Finder to the clipboard
> >> * add a new file to Finder's directory.
> >> * find out the size
has wrote:
> On 15 Mar, 18:05, Mark Carter <[EMAIL PROTECTED]> wrote:
>> The sorts of things I want to do are:
>> * copy the directory of Finder to the clipboard
>> * add a new file to Finder's directory.
>> * find out the size of a directory
>> * open a file with Aquamacs, regardless of file type,
On 15 Mar, 18:05, Mark Carter <[EMAIL PROTECTED]> wrote:
> The sorts of things I want to do are:
> * copy the directory of Finder to the clipboard
> * add a new file to Finder's directory.
> * find out the size of a directory
> * open a file with Aquamacs, regardless of file type,
If you want to c
One thing I really liked about Ubuntu was that Nautilus allowed you to
add scripts to a directory which could be accessed via the RMB. It was a
very simple thing to do.
I've recently switched to Leopard, and I'm trying to do the same thing.
I'm fairly experienced with Python, but new to OS X. I
On Nov 1, 1:25 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> Several chapter excerpts are available online, including this
> chapter on the Zen of Pyparsing:http://preview.tinyurl.com/yp4v48
>
Here is a better link:
http://my.safaribooksonline.com/9780596514235/what_makes_pyparsing_so_special
--
I'm happy to report the release of the O'Reilly ShortCut,
"Getting Started With Pyparsing."
This 65-page e-book goes into detail on Pyparsing's design
rationale, basic features, and a succession of applications.
"Getting Started With Pyparsing" covers a range o
Disclaimer: I have never used (or even heard of) JPype before...
porter wrote:
(snip)
>
> "Package myclass.HelloWorld is not Callable"
>
(snip)
>
> from jpype import *
>
> startJVM(getDefaultJVMPath(), "-ea", "-Djava.class.path=D:/tmp/jpype-
> reli/test/dist/test.jar'' )
>
> package = JPackag
Gah - I hate it when that happens: Just after posting I figured out my
silly mistake: my package is called myclasses and I was referencing
'myclass'
apologies for wasting your time
> Hi,
>
> For nefarious javaesque reasons I've been trying to get started with
> jpype (http://jpype.sourceforge.
Hi,
For nefarious javaesque reasons I've been trying to get started with
jpype (http://jpype.sourceforge.net). This looks like a potentially
useful tool for integrating java classes into C-python, but
frustratingly I've run into immediate problems. The documentation on
the project really doesn't d
On Apr 17, 11:00 pm, Basilisk96 <[EMAIL PROTECTED]> wrote:
> On Apr 14, 8:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
>
> > Hello, after reading some of the book Programming Python it seems that
> > python is something I would like to delve deeper into. The only thing
> > is, I have no idea what I sho
On Apr 14, 8:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
> Hello, after reading some of the book Programming Python it seems that
> python is something I would like to delve deeper into. The only thing
> is, I have no idea what I should try and write. So I was hoping that
> someone here could help poi
James Stroud <[EMAIL PROTECTED]> wrote:
>py> t = timeit.Timer(stmt=s)
>py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
>40.88 usec/pass
7stud <[EMAIL PROTECTED]> wrote:
>What does this accomplish:
>
>100 * t.timeit(number=10)/10
>
>that the following doesn't acc
Steve Holden wrote:
> James Stroud wrote:
>> Steve Holden wrote:
>>> You'd be worth more if you'd used elif and omitted the continue
>>> statements, but for a first solution it's acceptable.
>>
>> Depends on what you are after.
>>
>> py> s = """
>> ... for i in xrange(1,101):
>> ... if not i % 1
7stud wrote:
> On Apr 15, 9:49 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>> py> t = timeit.Timer(stmt=s)
>> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
>> 40.88 usec/pass
>>
>
> What does this accomplish:
>
> 100 * t.timeit(number=10)/10
>
> that the fol
James Stroud wrote:
> Steve Holden wrote:
>> You'd be worth more if you'd used elif and omitted the continue
>> statements, but for a first solution it's acceptable.
>
> Depends on what you are after.
>
> py> s = """
> ... for i in xrange(1,101):
> ... if not i % 15:
> ... continue
> ...
On Apr 15, 9:49 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> py> t = timeit.Timer(stmt=s)
> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
> 40.88 usec/pass
>
What does this accomplish:
100 * t.timeit(number=10)/10
that the following doesn't accomplish:
10
The Python Papers (http://pythonpapers.org) is another resource for
Python developers, especially those interested in keeping tabs on the
various projects and articles out there in the community.
Cheers,
-T (Editor-In-Chief, The Python Papers)
--
http://mail.python.org/mailman/listinfo/python-li
On Apr 15, 8:05 pm, [EMAIL PROTECTED] wrote:
> On Apr 15, 9:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Apr 14, 7:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
>
> > > Hello, after reading some of the book Programming Python it seems that
> > > python is something I would like
Steve Holden wrote:
> You'd be worth more if you'd used elif and omitted the continue
> statements, but for a first solution it's acceptable.
Depends on what you are after.
py> s = """
... for i in xrange(1,101):
... if not i % 15:
... continue
... if not i % 5:
... continue
... if
James Stroud <[EMAIL PROTECTED]> writes:
> 1. This doesn't act according to the specification if you add, for
> example, (2, 'Zonk'). Now 30 gives 'ZonkFizzBuzz' and not 'FizzBuzz'
> according to the specification.
Correct, the original specification only had 3 and 5. I gave a longer
example to i
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>> You'd be worth more if you'd used elif and omitted the continue
>> statements, but for a first solution it's acceptable.
>>
>> For better readability I'd have used
>> if i % 5 == 0
>
> I think I'd be more concerned about getting
Steve Holden <[EMAIL PROTECTED]> writes:
> You'd be worth more if you'd used elif and omitted the continue
> statements, but for a first solution it's acceptable.
>
> For better readability I'd have used
> if i % 5 == 0
I think I'd be more concerned about getting rid of the i%15 test.
What i
On Apr 15, 9:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Apr 14, 7:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
>
> > Hello, after reading some of the book Programming Python it seems that
> > python is something I would like to delve deeper into. The only thing
> > is, I have no idea wh
1 - 100 of 160 matches
Mail list logo