On Sun, Jan 5, 2014 at 6:38 PM, luofeiyu wrote:
range(1,10)
> range(1, 10)
print(range(1,10))
> range(1, 10)
>
> how can i get 1,2,3,4,5,6,7,8,9 in python3.3 ?
Are you looking for a list? That's what Python 2 returned. In Python
3, you can get that like this:
>>> list(range(1,10))
[1,
>>> range(1,10)
range(1, 10)
>>> print(range(1,10))
range(1, 10)
how can i get 1,2,3,4,5,6,7,8,9 in python3.3 ?
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Jan 5, 2014 at 2:20 PM, Roy Smith wrote:
> I've got a new sorting algorithm which is guaranteed to cut 10 seconds
> off the sorting time (i.e. $0.10 per package). The problem is, it makes
> a mistake 1% of the time.
That's a valid line of argument in big business, these days, because
we'
Roy Smith wrote:
> I wrote:
>> > I realize I'm taking this statement out of context, but yes, sometimes
>> > fast is more important than correct.
>
> In article <52c8c301$0$29998$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>> Fast is never more important than correct.
>
> Sur
In article ,
Rustom Mody wrote:
> On Sun, Jan 5, 2014 at 8:50 AM, Roy Smith wrote:
> > I wrote:
> >> > I realize I'm taking this statement out of context, but yes, sometimes
> >> > fast is more important than correct.
> >
> > In article <52c8c301$0$29998$c3e8da3$54964...@news.astraweb.com>,
> >
On Sun, Jan 5, 2014 at 8:50 AM, Roy Smith wrote:
> I wrote:
>> > I realize I'm taking this statement out of context, but yes, sometimes
>> > fast is more important than correct.
>
> In article <52c8c301$0$29998$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>> Fast is never more i
Investigating possible using multiple ORMs in my project.
Toy project, want to make it as generic as humanly possible; whilst
still exposing abstract pythonic interfaces.
E.g.: support most number of backends, including SQL ones like:
Postgres, SQLite, MySQL, … and NoSQL ones such as Redis (using
Because I'm thinking that something with a much less expressive query
interface would serve me better in the long run... e.g.: Redis or
maybe Hadoop
On Sat, Jan 4, 2014 at 5:35 PM, Walter Hurry wrote:
> On Thu, 02 Jan 2014 16:40:19 +1100, Alec Taylor wrote:
>
>> I use the Python logger class; wit
I wrote:
> > I realize I'm taking this statement out of context, but yes, sometimes
> > fast is more important than correct.
In article <52c8c301$0$29998$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> Fast is never more important than correct.
Sure it is.
Let's imagine you're b
On Sun, Jan 5, 2014 at 1:41 PM, Steven D'Aprano
wrote:
> wxjmfa...@gmail.com wrote:
>
>> The very interesting aspect in the way you are holding
>> unicodes (strings). By comparing Python 2 with Python 3.3,
>> you are comparing utf-8 with the the internal "representation"
>> of Python 3.3 (the flex
wxjmfa...@gmail.com wrote:
> The very interesting aspect in the way you are holding
> unicodes (strings). By comparing Python 2 with Python 3.3,
> you are comparing utf-8 with the the internal "representation"
> of Python 3.3 (the flexible string represenation).
This is incorrect. Python 2 has ne
On 2014-01-05 02:32, Chris Angelico wrote:
On Sun, Jan 5, 2014 at 1:27 PM, Steven D'Aprano
wrote:
But regardless of how fast your path-finder algorithm might become, you're
unlikely to be satisfied with a solution that travels around in a circle
from A to B a million times then shoots off strai
On Sun, Jan 5, 2014 at 1:27 PM, Steven D'Aprano
wrote:
> But regardless of how fast your path-finder algorithm might become, you're
> unlikely to be satisfied with a solution that travels around in a circle
> from A to B a million times then shoots off straight to Z without passing
> through any o
Roy Smith wrote:
> In article ,
> Mark Lawrence wrote:
>
>> Surely everybody prefers fast but incorrect code in
>> preference to something that is correct but slow?
>
> I realize I'm taking this statement out of context, but yes, sometimes
> fast is more important than correct.
I know somebod
I'm using something like the following to display an image and refresh
it in the same window each time the image file is updated:
import cv
def display(filename):
"""Display scores as they are created"""
cv.NamedWindow(filename)
while 1:
... #wait for signal that filename has
On 2014-01-04 15:30, Igor Korot wrote:
> Does anybody here use django?
Yes. However there's also a Django-users mailing list[1] for
Django-specific questions. Folks there are friendly & helpful.
> Is it possible to display a data grid table with django?
The short answer is yes.
> Basically I
On Sat, Jan 4, 2014 at 6:30 PM, Igor Korot wrote:
> Hi, ALL,
> Does anybody here use django?
> I have a very basic question about it.
>
> Is it possible to display a data grid table with django?
>
Yes, using the django template language. If you learn django (perhaps 2
days of exploring), you wo
Hi, ALL,
Does anybody here use django?
I have a very basic question about it.
Is it possible to display a data grid table with django?
Basically I am looking for displaying a data from the db table on the
web interface thru django or some other web interface.
My main application is in Python, that
On Sun, Jan 5, 2014 at 9:46 AM, Terry Reedy wrote:
> On 1/4/2014 2:10 PM, wxjmfa...@gmail.com wrote:
>>
>> Le samedi 4 janvier 2014 15:17:40 UTC+1, Chris Angelico a écrit :
>
>
>>> any, and Python has only one, idiot like jmf who completely
>
>
> Chris, I appreciate the many contributions you make
On Sun, Jan 5, 2014 at 6:07 AM, Wiktor wrote:
> On Sat, 4 Jan 2014 01:16:14 +0100, Wiktor wrote:
> Idea is still the same. I start with 2d array
> And then I fill it up one number by one (exception: first row). At every
> step
> checking if current column is unique (0's not counted) and if al
I would definitely utilize y axis as an altitudinal derivative of time,x.
I'd go with more of a dart type of graphic, so you might be able to show a
peak in altitude from take off, and the rotate the graphic in relation to
the deceleration .
But, you could also depict the velocity, fuel rate, etc
Did you try to archive email list hosted on the Google Groups?
Were you endlessly frustrated by the black hole which is Google
Groups, conscpicious by its absence on the Data Liberation Front
website? Yes, I was too_
So, I have created a script webscrapping a google group and
created gg_scra
On 1/4/2014 2:10 PM, wxjmfa...@gmail.com wrote:
Le samedi 4 janvier 2014 15:17:40 UTC+1, Chris Angelico a écrit :
any, and Python has only one, idiot like jmf who completely
Chris, I appreciate the many contributions you make to this list, but
that does not exempt you from out standard of c
On 01/03/2014 10:32 PM, Sean Murphy wrote:
Hi everyone.
[snip]
The 2nd part of my original question still stands. I will expand upon this a bit more to
give more context. I want to print from the beginning of the paragraph to the end. Each
paragraph ends with "\n\n\n".
If I use "\n\n\n" in l
When printing the rows of the array/canvas you might add \n to the end of
each row and print the canvas all at once rather than a print statement for
each row.
Vincent Davis
720-301-3003
On Sat, Jan 4, 2014 at 3:10 PM, Vincent Davis wrote:
> You might think about using an array to represent the
You might think about using an array to represent the canvas. Starting with
it filled with "" and then for each point change it to "X".
The print the rows of the array.
You can make the array/canvas arbitrarily large and then plot multiple
different paths onto the same array.
Vincent Davis
720-3
PS to my previous response: please send plain text only, and not the
html in addition.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 1/4/2014 11:15 AM, Jason Friedman wrote:
I am teaching Python to a class of six-graders as part of an
after-school enrichment.
Great. I love seeing basic Python used for that sort of thing.
These are average students. We wrote a
non-GUI "rocket lander" program: you have a rocket some di
On Sat, 4 Jan 2014 09:15:39 -0700, Jason Friedman wrote:
> My concern is whether the average 11-year-old will be able to follow such
> logic. Is there a better approach?
Basically mine approach is the same, but maybe is easier to explain it to
kids.
max_height = max(measurement_dict.values
On 01/03/2014 08:03 PM, Sean Murphy wrote:
Hello all.
This is a newly question. But I wish to understand why the below code is
providing different results.
import os, sys
if len(sys.argv) > 2:
filenames = sys.argv[1:]
else
print ("no parameters provided\n")
sys.edit()
for filename
I am teaching Python to a class of six-graders as part of an after-school
enrichment. These are average students. We wrote a non-GUI "rocket
lander" program: you have a rocket some distance above the ground, a
limited amount of fuel and a limited burn rate, and the goal is to have the
rocket tou
On Sat, 4 Jan 2014 20:07:33 +0100, Wiktor wrote:
> I guess that some kind of you have done this before. ;-)
Damn it. This 'kind' shouldn't be there. Now it sounds silly,
even offensive. ;-) Normally I would supersede it, but probably attached
mailin
I first saw this when tring to run the command "py -3.4 -m ensurepip"
which gave me this lot.
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python34\lib\runpy.py", line 73, in _run_code
Le samedi 4 janvier 2014 15:17:40 UTC+1, Chris Angelico a écrit :
> On Sun, Jan 5, 2014 at 12:55 AM, Roy Smith wrote:
>
> > In article ,
>
> > Mark Lawrence wrote:
>
> >
>
> >> Surely everybody prefers fast but incorrect code in
>
> >> preference to something that is correct but slow?
>
>
On Sat, 4 Jan 2014 01:16:14 +0100, Wiktor wrote:
> Hi,
OK, another question. This time, I think, closer to the original subject
(recursive algorithm).
Thanks to Terry's and Chris' advises I refined script. Then I thought, that
with some changes and with minimal effort I can force this script
On 1/4/14 9:17 AM, Chris Angelico wrote:
On Sun, Jan 5, 2014 at 12:55 AM, Roy Smith wrote:
In article ,
Mark Lawrence wrote:
Surely everybody prefers fast but incorrect code in
preference to something that is correct but slow?
I realize I'm taking this statement out of context, but yes,
... and thanks to Chris too.
Now I got the better idea how the subprocess module works.
On Sat, Jan 4, 2014 at 11:29 AM, Beinan Li wrote:
> Thank you so much Jerry.
> I should have read though the man page more carefully.
> The available online cscope tutorials never mentioned the line-oriented
Thank you so much Jerry.
I should have read though the man page more carefully.
The available online cscope tutorials never mentioned the line-oriented
mode.
On Sat, Jan 4, 2014 at 1:35 AM, Jerry Hill wrote:
> On Fri, Jan 3, 2014 at 9:44 PM, Beinan Li wrote:
> > But some console programs have
On Sun, Jan 5, 2014 at 12:55 AM, Roy Smith wrote:
> In article ,
> Mark Lawrence wrote:
>
>> Surely everybody prefers fast but incorrect code in
>> preference to something that is correct but slow?
>
> I realize I'm taking this statement out of context, but yes, sometimes
> fast is more importan
In article ,
Mark Lawrence wrote:
> Surely everybody prefers fast but incorrect code in
> preference to something that is correct but slow?
I realize I'm taking this statement out of context, but yes, sometimes
fast is more important than correct. Sometimes the other way around.
--
https://
Le vendredi 3 janvier 2014 12:14:41 UTC+1, Robin Becker a écrit :
> On 02/01/2014 18:37, Terry Reedy wrote:
>
> > On 1/2/2014 12:36 PM, Robin Becker wrote:
>
> >
>
> >> I just spent a large amount of effort porting reportlab to a version
>
> >> which works with both python2.7 and python3.3. I h
On Sat, 4 Jan 2014 22:18:09 +1100, Chris Angelico wrote:
>> Thank you for all Your comments.
>
> My pleasure! Always happy to help out.
I'm aware, that at my point of education there's no sense in optimizing code
to squeeze from it every millisecond, but Project Euler gave me habit to
compar
On Sat, 4 Jan 2014 22:18:09 +1100, Chris Angelico wrote:
>>> This is the same as you have at the top of 'if not towers'. Can you be
>>> confident that row is None any time towers is None? If so, just move
>>> this up above the other check and save the duplication.
>>
>> row is None at start, but
On Fri, 03 Jan 2014 20:47:16 -0500, Terry Reedy wrote:
> [0]*size] is fine for one row
>
> towers = [[0]*size] for i in range(size)]
>
> should do what you want for a 2-d array instead of the above.
Right. Thank you also.
--
Best regards, Wiktor Matuszewski
'py{}@wu{}em.pl'.format('wkm'
Am 04.01.14 11:17, schrieb eneskri...@gmail.com:
So the issue is like this. I have to make a 2 x N grid like this:
o Radio - 1 o Radio - 2
o Radio - 3 o Radio - 4
...
o Radio - N - 1 o Radio - N
How to do so with a loop?
Create the buttons and append them into a list, so you can later refer
On Sat, Jan 4, 2014 at 10:09 PM, Wiktor wrote:
> On Sat, 4 Jan 2014 13:02:37 +1100, Chris Angelico wrote:
>> And in fact, you might want to turn this whole branch into something
>> that harks to a more functional programming style:
>>
>> return all((check(towers, i) for i in range(len(towers)))
>
On Sat, 4 Jan 2014 13:02:37 +1100, Chris Angelico wrote:
>> def check(towers, x=None):
>> column = [] # value added on pos. x
>> for i in range(len(towers)):
>> column.append(towers[i][c])
>> column = [x for x in column if x != 0]
>
On Sat, Jan 4, 2014 at 9:17 PM, wrote:
> So the issue is like this. I have to make a 2 x N grid like this:
> o Radio - 1 o Radio - 2
> o Radio - 3 o Radio - 4
> ...
> o Radio - N - 1 o Radio - N
>
> How to do so with a loop?
How far have you managed to get so far? Do you have a Tkinter program
t
So the issue is like this. I have to make a 2 x N grid like this:
o Radio - 1 o Radio - 2
o Radio - 3 o Radio - 4
...
o Radio - N - 1 o Radio - N
How to do so with a loop?
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Jan 4, 2014 at 8:52 PM, Sean Murphy wrote:
> Thanks for the tip on the function. I was not aware of that function, Grin.
> Creating the function as you mention makes a lot of sense.
>
> I am doing a lot of little bits and pieces focusing on things I need to
> eventually build a script th
On Sat, Jan 4, 2014 at 5:26 AM, Alec Taylor wrote:
> What is the highest performance REST microframework?
>
> Happy if it's mostly written in C or C++; as long as it provides a
> simple routes interface in Python.
>
> Currently using bottle and utilising its application, @route and
> app.merge(app
Chris,
Thanks for the tip on the function. I was not aware of that function, Grin.
Creating the function as you mention makes a lot of sense.
I am doing a lot of little bits and pieces focusing on things I need to
eventually build a script that is going to compile data from a router and
config
On Friday, January 3, 2014 12:00:05 PM UTC+1, Vlastimil Brom wrote:
> 2014/1/3 :
>
> > @Rick
>
> > I found some solutions for python 2.x, but still, as I am with the future,
> > I need a futuristic solution or 2, so if anyone else could help me, I'd be
> > grateful!
>
> > --
>
>
>
> Hi,
>
Thanks.. I think your 10% Python idea is the way to go. And you are right
that most of Python is not needed in an intro course.
--
https://mail.python.org/mailman/listinfo/python-list
54 matches
Mail list logo