On Sat, 8 Oct 2016 05:29 pm, Cai Gengyang wrote:
> Unfortunately, in this case, it is 100% of the information I am giving
> you.
Exactly. That's the problem. You need to give us more information, like how
you are trying to run this code. Are you using an IDE? Which IDE?
> You can try it yourse
This is the result when I copy and paste it one line at a time :
>>> rect_x = 50
>>> rect_y = 50
>>> while not done:
>>>
for event in pygame.event.get():
Xristos Xristoou wrote:
> hello
>
>
> i have one .txt file and i want to create python script with sys.argv or
> argparse or other package to define some variables in the txt file and i
> take some result.
>
>
>
> txt file maybe like this :
>
> input number 1= %var1%
> input number 2= %var2%
how to refactor nested for loop into smaller for loop assume each of them
independent?
because memory is not enough
for ii in range(1,2000):
for jj in range(1,2000):
for kk in range(1,2000):
print run(ii,jj,kk)
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird wrote:
> how to refactor nested for loop into smaller for loop assume each of them
> independent?
>
> because memory is not enough
>
> for ii in range(1,2000):
> for jj in range(1,2000):
> for kk in range(1,2000):
> print run(ii,jj,kk)
Since
On 08/10/2016 11:03, Chris Angelico wrote:
On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird wrote:
how to refactor nested for loop into smaller for loop assume each of them
independent?
because memory is not enough
for ii in range(1,2000):
for jj in range(1,2000):
for kk in range(1,2000):
On Sat, Oct 8, 2016 at 9:12 PM, BartC wrote:
> On 08/10/2016 11:03, Chris Angelico wrote:
>>
>> On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird
>> wrote:
>>>
>>> how to refactor nested for loop into smaller for loop assume each of them
>>> independent?
>>>
>>> because memory is not enough
>>>
>>>
On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote:
> This is the result when I copy and paste it one line at a time :
>
> >>> rect_x = 50
> >>> rect_y = 50
> >>> while not done:
> >>>
> for event in ...
Th
On 08/10/2016 11:54, Chris Angelico wrote:
On Sat, Oct 8, 2016 at 9:12 PM, BartC wrote:
On 08/10/2016 11:03, Chris Angelico wrote:
On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird
wrote:
how to refactor nested for loop into smaller for loop assume each of them
independent?
because memory is
On Sat, 8 Oct 2016 09:12 pm, BartC wrote:
> The OP's code however is a good demonstration of how crazy Python's
> original for-range loop was: you need to construct a list of N elements
> just to be able to count to N. How many years was it until xrange was
> introduced?
Python 1.4 (that's 1996)
meInvent bbird writes:
> how to refactor nested for loop into smaller for loop assume each of them
> independent?
>
> because memory is not enough
>
> for ii in range(1,2000):
> for jj in range(1,2000):
> for kk in range(1,2000):
> print run(ii,jj,kk)
n = 0
while n < 2000*2000*2000:
Τη Σάββατο, 8 Οκτωβρίου 2016 - 12:25:28 π.μ. UTC+3, ο χρήστης Xristos Xristoou
έγραψε:
> hello
>
>
> i have one .txt file and i want to create python script with sys.argv or
> argparse or other package to define some variables in the txt file and i take
> some result.
>
>
>
> txt file maybe
Somehow it still doesnt work --- it keeps giving the syntaxerror, inconsistent
use of tabs and indentation message EVEN though i use only the enter and space
buttons and never touched the tab button a single time. Im pretty sure there is
something wrong with the program itself. Gonna download py
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Dear subscribers,
I am pleased to announce the release of aioxmpp 0.7.1 (footnote 1). The
current release can be obtained from GitHub [1] (check out the v0.6.0 tag or
the master branch) or PyPI [2]. The HTML documentation can be found at [3].
Exa
Xristos Xristoou wrote:
> Τη Σάββατο, 8 Οκτωβρίου 2016 - 12:25:28 π.μ. UTC+3, ο χρήστης Xristos
> Xristoou έγραψε:
>> hello
>>
>>
>> i have one .txt file and i want to create python script with sys.argv or
>> argparse or other package to define some variables in the txt file and i
>> take some r
On Saturday, October 8, 2016 at 12:07:47 PM UTC+1, Rustom Mody wrote:
> On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote:
> > This is the result when I copy and paste it one line at a time :
> >
> > >>> rect_x = 50
> > >>> rect_y = 50
> > >>> while not done:
On Sat, Oct 8, 2016, at 06:12, BartC wrote:
> The OP's code however is a good demonstration of how crazy Python's
> original for-range loop was: you need to construct a list of N elements
> just to be able to count to N. How many years was it until xrange was
> introduced?
Python 1.4 had it, an
On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote:
> The oldest version I have access to is the *extremely* primitive 0.9. Not
> surprisingly, it doesn't have xrange -- but it lacks a lot of things,
> including globals(), map(), named exceptions, "" strings ('' is okay),
> exponentiation, and mor
On 10/8/2016 2:56 AM, Steve D'Aprano wrote:
Just copy and paste it into your Python IDLE and let me know what you get
I don't normally use IDLE, and you shouldn't assume that everyone does.
*That* is the extra information we need to solve the problem:
The IDLE interactive interpreter in Pyth
any idea how to delete pixel from the raster image with
specific range value using numpy/scipy or gdal?
for example i have a raster image with the
5 class :
1. 0-100
2. 100-200
3. 200-300
4. 300-500
5. 500-1000
and i want to delete class 1 range value
or maybe class 1,2,4,5
--
https://mail.pyt
Cai Gengyang wrote:
Somehow it still doesnt work --- it keeps giving the syntaxerror,
inconsistent use of tabs and indentation message EVEN though i use only the
enter and space buttons and never touched the tab button a single time.
There was another thread about this a short time ago.
It turn
On Sun, Oct 9, 2016 at 5:45 AM, Random832 wrote:
> On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote:
>> The oldest version I have access to is the *extremely* primitive 0.9. Not
>> surprisingly, it doesn't have xrange -- but it lacks a lot of things,
>> including globals(), map(), named excepti
On Sun, 9 Oct 2016 05:45 am, Random832 wrote:
> On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote:
>> The oldest version I have access to is the *extremely* primitive 0.9. Not
>> surprisingly, it doesn't have xrange -- but it lacks a lot of things,
>> including globals(), map(), named exceptions
On Sun, 9 Oct 2016 12:53 pm, Chris Angelico wrote:
>> They're caught by identity, though - "except 'type error'" fails to
>> catch TypeError, and vice versa.
>
> Fascinating! What about: except sys.intern('type error') ? Or does
> interning of strings not exist yet :)
>>> intern
Unhandled except
This is my latest result : I copy and pasted one line at a time into the IDLE
and used ONLY the "enter-return" button to move on to the next line and this
time I didnt get an indentation error but instead a traceback error
>>> rect_x = 50
>>> rect_y = 50
>>> while not done:
for event in
On Sun, 9 Oct 2016 01:51 pm, Cai Gengyang wrote:
> This is my latest result : I copy and pasted one line at a time into the
> IDLE and used ONLY the "enter-return" button to move on to the next line
> and this time I didnt get an indentation error but instead a traceback
> error:
> Traceback (mos
I defined both done and pygame in this piece of code, but now i get a new error
that i have never seen before, an AttributeError
>>> rect_x = 50
>>> rect_y = 50
>>> done = False
>>> pygame = True
>>> while not done:
for event in pygame.event.get():
if event.type == pygame.QUI
Well, I've made some progress. My program doesn't draw any 3D objects yet, but
it creates an OpenGL rendering window, binds the OpenGL functions, and
generates no errors. Here's the corrected initializeGL method:
def initializeGL(self):
c = self.context()
f = QSurfaceForma
On 10/8/2016 11:51 PM, Cai Gengyang wrote:
pygame = True
while not done:
for event in pygame.event.get():
Traceback (most recent call last):
File "", line 2, in
for event in pygame.event.get():
AttributeError: 'bool' object has no attribute 'event'
pygame == True and True ha
On Sun, 9 Oct 2016 02:51 pm, Cai Gengyang wrote:
> I defined both done and pygame in this piece of code, but now i get a new
> error that i have never seen before, an AttributeError
AttributeError usually means you have the wrong kind of object:
py> mylist = {} # oops, a dict not a list
py> myl
On Sunday, October 9, 2016 at 12:12:06 PM UTC+5:30, Steve D'Aprano wrote:
> On Sun, 9 Oct 2016 02:51 pm, Cai Gengyang wrote:
>
> > I defined both done and pygame in this piece of code, but now i get a new
> > error that i have never seen before, an AttributeError
>
> AttributeError usually means
31 matches
Mail list logo