Re: [Tutor] how do I use windows.h with python?

2008-04-01 Thread elis aeris
I know how to check msdn site, but I don't understand how things are organized under windll where do they have this ? On Tue, Apr 1, 2008 at 5:45 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "elis aeris" <[EMAIL PROTECTED]> wrote > > > this is a samp

[Tutor] how do I use windows.h with python?

2008-04-01 Thread elis aeris
this is a sample code that use window.h function i THINK. where can I read up on windll ? class RECT(Structure): _fields_ = [ ('left', c_ulong), ('top', c_ulong), ('right', c_ulong), ('bottom', c_ulong) ] # time.sleep(2) GetForegroundWindow = windll.user32.GetForegro

Re: [Tutor] decimal precision

2008-03-25 Thread elis aeris
what if i want it only to 2nd decimal? what if i want to cut off everything behind decimal? On Tue, Mar 25, 2008 at 6:30 AM, Michael Connors <[EMAIL PROTECTED]> wrote: > > On 25/03/2008, elis aeris <[EMAIL PROTECTED]> wrote: > > > x = 53 > > w = 1

[Tutor] decimal precision

2008-03-25 Thread elis aeris
x = 53 w = 192 for a in range ( x, (x+192) ): print (a-x)/w the problem is at (a-x)/w it's supposed to return a ratio between x and w, yet it 0 all the time. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python to C++

2008-03-25 Thread elis aeris
i personally write my python code with c++ in mind because i knew i am going to rewrite it over. so it's very easy to do that. it's fun to find out how many more lines of c++ is required for something done with 2 lines in python. On Tue, Mar 25, 2008 at 2:46 AM, Andreas Kostyrka <[EMAIL PROTECTED

Re: [Tutor] def_a

2008-03-23 Thread elis aeris
it works :D On Sun, Mar 23, 2008 at 6:40 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "elis aeris" <[EMAIL PROTECTED]> wrote > > > def_a =[ > > ["3.2.2.2.2.2.3.", "0.0.3.2.2.2.2.2.3.0.0.0.", "O"], >

[Tutor] def_a

2008-03-23 Thread elis aeris
def_a =[ ["3.2.2.2.2.2.3.", "0.0.3.2.2.2.2.2.3.0.0.0.", "O"], ["8.1.1.4.", "0.0.2.2.2.2.3.1.1.1.0.0.", "h"], ["1.2.", "0.1.1.1.0.0.0.0.0.0.0.0.", ","], ["2.7.2.", "0.0.3.1.1.1.1.1.3.0.0.0.", "I"], ["5.1.1.4.1.1.4.", "0.0.3.3.3.3.5.0.0.0.0.0.", "m"],

[Tutor] returning two values continued

2008-03-23 Thread elis aeris
def returning (): a = 1 b = 2 return a, b ab = returning() does this work? if it does, is ab a tuple of 2 and [0] being a and [1] being b? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I am reading the tutorial alright?

2008-03-23 Thread elis aeris
thanks for the reply, btw. On Sun, Mar 23, 2008 at 4:22 PM, Marc Tompkins <[EMAIL PROTECTED]> wrote: > On Sun, Mar 23, 2008 at 4:16 PM, elis aeris <[EMAIL PROTECTED]> wrote: > > > in c++ i use array[n][n] to store things. > > > > how do i create an array li

Re: [Tutor] I am reading the tutorial alright?

2008-03-23 Thread elis aeris
yone know what I was looking for? looking back to my first post, it seems to be a little weak. Can you suggest something that I could have said? On Sun, Mar 23, 2008 at 4:22 PM, Marc Tompkins <[EMAIL PROTECTED]> wrote: > On Sun, Mar 23, 2008 at 4:16 PM, elis aeris <[EMAIL PROTECT

Re: [Tutor] I am reading the tutorial alright?

2008-03-23 Thread elis aeris
in c++ i use array[n][n] to store things. how do i create an array like that? On Sun, Mar 23, 2008 at 4:13 PM, bob gailer <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > t = 12345, 54321, "hello!" > > print t[0] > > > > the way the 3 items are

[Tutor] I am reading the tutorial alright?

2008-03-23 Thread elis aeris
t = 12345, 54321, "hello!" print t[0] the way the 3 items are saved and access fits my need, now how do I make t have more than one entry so effectively I get this? t[n][n] ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listin

Re: [Tutor] x and y

2008-03-22 Thread elis aeris
I just need a way to key a list of tuples of 2 for referencing. On Sat, Mar 22, 2008 at 3:48 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "elis aeris" <[EMAIL PROTECTED]> wrote > > > on a different note, also on lists, I need to save two values, x

Re: [Tutor] windows: pop up window

2008-03-22 Thread elis aeris
sweet, I love built in functions. thanks ! On Sat, Mar 22, 2008 at 3:15 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > oh sorry, I should have been clear: > > > > how about just popping a prompt in the same window that is running the > >

Re: [Tutor] add to list

2008-03-22 Thread elis aeris
;, 'b'] Out[12]: '1' that does look like what I looking for, how does it work? On Sat, Mar 22, 2008 at 3:12 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > there is no pattern in the numbers. > > Then how do you expect to create

[Tutor] x and y

2008-03-22 Thread elis aeris
on a different note, also on lists, I need to save two values, x and y. list = { int, int int, int int, int but i am not sure of the syntax, is it possible to just read both values from the same entry in the list ? ___ Tutor m

Re: [Tutor] windows: pop up window

2008-03-22 Thread elis aeris
oh sorry, I should have been clear: how about just popping a prompt in the same window that is running the script? On Sat, Mar 22, 2008 at 3:09 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > how about console window input? > > You want to "pop up&

Re: [Tutor] add to list

2008-03-22 Thread elis aeris
ing. in short, given the first two strings, return the third string from the list. it's a dictionary. On Sat, Mar 22, 2008 at 2:59 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > chat_window_char_definition = { "2.7.1."

Re: [Tutor] windows: pop up window

2008-03-22 Thread elis aeris
how about console window input? On Sat, Mar 22, 2008 at 3:02 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > how do I pop up a window to ask user's input? > > Take a look at > http://www.ferg.org/easygui/ > > Kent > ___

[Tutor] add to list

2008-03-22 Thread elis aeris
chat_window_char_definition = { "2.7.1." : "1", "2.3.3.3.3." : "2", "2.2.3.3.4." : "3", "2.2.2.7.1." : "4", "4.3.3.3.4." : "5",

[Tutor] windows: pop up window

2008-03-22 Thread elis aeris
how do I pop up a window to ask user's input? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] list

2008-03-21 Thread elis aeris
arra = [0] * 10 ? On Fri, Mar 21, 2008 at 5:29 PM, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: > Empty? > > array = [] > > If you want to assign 10 "None", that would be: > > array = [None] * 10 > > Andreas > > Am Freitag, den 21.03.2008, 17:03

Re: [Tutor] returning two values

2008-03-21 Thread elis aeris
so just str(int) got it, thanks ! On Fri, Mar 21, 2008 at 5:11 PM, elis aeris <[EMAIL PROTECTED]> wrote: > > oh this is brillant, i LOVE python > > thank for replying > > > On Fri, Mar 21, 2008 at 5:11 PM, Gregor Lingl <[EMAIL PROTECTED]> wrote: > > >

Re: [Tutor] returning two values

2008-03-21 Thread elis aeris
oh this is brillant, i LOVE python thank for replying On Fri, Mar 21, 2008 at 5:11 PM, Gregor Lingl <[EMAIL PROTECTED]> wrote: > elis aeris schrieb: > > is it possible to return two values? > > Yes: > >>> def return2(): > return "this", "

[Tutor] int to string

2008-03-21 Thread elis aeris
how do I convert int to string? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] append string

2008-03-21 Thread elis aeris
how do I append to the end of strings? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] list

2008-03-21 Thread elis aeris
how do I create an empy int array of 10? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] returning two values

2008-03-21 Thread elis aeris
is it possible to return two values? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] c++::return

2008-03-18 Thread elis aeris
7;t return any particularly obvious answer. The funny thing is, i wrote that program last june and managed to not know/use a single return :) On Tue, Mar 18, 2008 at 6:11 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > "elis aeris" <[EMAIL PROTECTED]> wrote > > > how

Re: [Tutor] xrange

2008-03-18 Thread elis aeris
Oh i am good with range then, because it's not a real time program. On Tue, Mar 18, 2008 at 3:55 PM, Shrutarshi Basu <[EMAIL PROTECTED]> wrote: > I'm not entirely sure about this, but I think for range(), the entire > range of numbers is generated at one go, which could cause a > slow-down. But

Re: [Tutor] c++::return

2008-03-18 Thread elis aeris
i was reading it the second time 6months after and in fact i am working on version 3 of it with update to functionality. (and yes, it is MY code) how do I return a function? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo

Re: [Tutor] xrange

2008-03-18 Thread elis aeris
ok i need about 500~1000 is that ok? my pet practice works works fine with it,but what should I watch out for? sorry for double reply kent, forgot to reply all. On Tue, Mar 18, 2008 at 3:21 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Alan Gauld wrote: > > > Add a 3rd step-value argument to r

Re: [Tutor] xrange

2008-03-18 Thread elis aeris
ok. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] c++::return

2008-03-18 Thread elis aeris
and also, I didn't need to break function is that program, to which i am amazed of, now come to think of it. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] c++::return

2008-03-18 Thread elis aeris
what do I do if i want the program/function to end? in c++ of int main(){} I do a return 0; ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] xrange

2008-03-18 Thread elis aeris
x = 0 y = 0 for x in xrange (20, 0): print x this doesn't work because it goes from a big number to a small number, which does nothing but what if I need the for loop to go from a big number to a small number? ___ Tutor maillist - Tutor@python

Re: [Tutor] Anyone fancy giving me some tips and an expert opinion??

2008-03-18 Thread elis aeris
i am not sure if I am still in the mailing list of tutor@python.org so please use reply all to send me a email directly please! x = 0 y = 0 for x in xrange (20, 0): print x this doesn't work because it goes from a big number to a small number, which does nothing but what if I need the

Re: [Tutor] windows api

2007-12-02 Thread elis aeris
i know that site, i program in c++ on windows. however, the syntax in different. how do I find out python's way of using it? On Dec 2, 2007 11:36 PM, bob gailer <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > this code uses windows api, but where do I find documentat

Re: [Tutor] windows api (Out of office)

2007-12-02 Thread elis aeris
On Dec 2, 2007 11:28 PM, Pierre DeWet <[EMAIL PROTECTED]> wrote: > I will be out of the office until Monday 10 December. If your request is > urgent, please contact the helpdesk at: [EMAIL PROTECTED], > alternatively, please dial: 0207 566 8771 > > Cheers > Pierre > ___

[Tutor] windows api

2007-12-02 Thread elis aeris
this code uses windows api, but where do I find documentation about how to use them? import time import ImageGrab # Part of PIL from ctypes import * #time.sleep(5) # Load up the Win32 APIs we need to use. class RECT(Structure): _fields_ = [ ('left', c_ulong), ('top', c_ulong),

Re: [Tutor] pipeline - what is it and how do I use it?

2007-11-25 Thread elis aeris
any specific leads? any ready code would rock thankyou for responding On Nov 26, 2007 2:41 AM, bob gailer <[EMAIL PROTECTED]> wrote: > elis aeris wrote: > > I need to keep a bit of python code ready to run at anytime, in the > > ram, but this is what I need to do &

Re: [Tutor] pipeline - what is it and how do I use it?

2007-11-25 Thread elis aeris
thanks for the reply On Nov 26, 2007 2:38 AM, Evert Rol <[EMAIL PROTECTED]> wrote: > > I need to keep a bit of python code ready to run at anytime, in the > > ram, but this is what I need to do > > > > I am using two languages at the same time, because python doesn't > > really have any effective

[Tutor] pipeline - what is it and how do I use it?

2007-11-25 Thread elis aeris
I need to keep a bit of python code ready to run at anytime, in the ram, but this is what I need to do I am using two languages at the same time, because python doesn't really have any effective way of simulating keyboard and mouse events, so I need to run auto it 3, and then call my python code

Re: [Tutor] use my own code

2007-11-25 Thread elis aeris
ok, i can import them. how do I use them though? On Nov 26, 2007 1:42 AM, Evert Rol <[EMAIL PROTECTED]> wrote: > > I have some .py files that have things I need to use, sometimes > > it's the functions and sometimes it's the whole .py (they have no > > functions) > > > > how do I use them

[Tutor] use my own code

2007-11-25 Thread elis aeris
I have some .py files that have things I need to use, sometimes it's the functions and sometimes it's the whole .py (they have no functions) how do I use them in my other .py codes? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

[Tutor] network - send one line of text

2007-11-23 Thread elis aeris
is it possible to do this with python? a server script to listen for a client script, it sends a line of text to server when a given criteria is met. i just need to send text alone, and then code it best kept simple, is this possible to do with python?

[Tutor] python image libray - source to Mac OS X

2007-10-29 Thread elis aeris
http://www.pythonware.com/products/pil/#pil116 has anyone been able to compile this on Mac os x? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python image libray

2007-10-29 Thread elis aeris
http://www.pythonware.com/products/pil/#pil116 how do I distribute standalone python executable with some contents of this library? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] scite with python 2.51

2007-09-22 Thread elis aeris
how do I set up scite editor with python so that I can click check syntax and compile from the editor? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] odd bug

2007-07-19 Thread elis aeris
I ran the code attached at the end of the email, it' supposed to out put a string of characters, yet I got only this ### 2.4.3.3.8.5. definition check: 3 ### now, it's proper output, however, this part got run only once, when it's supposed to run multiple times to produce more portio

Re: [Tutor] python: how do I create a list of definitions?

2007-07-19 Thread elis aeris
oh, just to have some numerals translated into the later. array[n][0] = "this" array[n][1] = "= to this" On 7/20/07, Eric Brunson <[EMAIL PROTECTED]> wrote: elis aeris wrote: > like, I am doing string substitution: > > > if x = 2243: > string =

Re: [Tutor] python: how do I create a list of definitions?

2007-07-19 Thread elis aeris
I don't understand dict On 7/20/07, Eric Brunson <[EMAIL PROTECTED]> wrote: elis aeris wrote: > like, I am doing string substitution: > > > if x = 2243: > string = string + "e" > if x = 2234: >string = string + "p" If I'm fo

[Tutor] python: how do I create a list of definitions?

2007-07-19 Thread elis aeris
like, I am doing string substitution: if x = 2243: string = string + "e" if x = 2234: string = string + "p" and so forth. how do I create this: list = [ (2342,p) (4234,e) and so forth, ] so I can use it like this: for a in range(10): If x

[Tutor] if and things

2007-07-18 Thread elis aeris
# pixel[] is a list of tuples: (r,g,b) # pixel[1030*(y-a) + x][0] = r # pixel[1030*(y-a) + x][1] = g # pixel[1030*(y-a) + x][2] = b for a in range(0, 10): ifpixel[1030*(y-a) + x][1] > pixel[1030*(y-a) + x][0] and pixel[1030*(y-a) + x][1] > pixel[1030*(y-a) + x][2]: box = box

Re: [Tutor] if and things

2007-07-18 Thread elis aeris
given up? man i have a project to go live :) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] if and things

2007-07-18 Thread elis aeris
man that looks totally pythonic. On 7/19/07, Ian Witham <[EMAIL PROTECTED]> wrote: try this: for a in range(10): r, g, b = pixel[1030*(y-a) + x] if g > r and g > b: box += 1 This is an example of "unpacking" a tuple into separate variables, r, g and b.

[Tutor] if and things

2007-07-18 Thread elis aeris
full code below. # pixel[] is a list of tuples: (r,g,b) # pixel[1030*(y-a) + x][0] = r # pixel[1030*(y-a) + x][1] = g # pixel[1030*(y-a) + x][2] = b for a in range(0, 10): ifpixel[1030*(y-a) + x][1] > pixel[1030*(y-a) + x][0] and pixel[1030*(y-a) + x][1] > pixel[1030*(y-a) + x][2

[Tutor] odd

2007-07-18 Thread elis aeris
I ran this for x in range(5,10): print x and OP was 5 6 7 8 9 why is that? shouldn't it print t 6 7 8 9 10? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Image library

2007-07-18 Thread elis aeris
that's illustrative. On 7/19/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: Tiger12506 wrote: > You know the height and the width of the image, no? > > So you know that every 'width' number of pixels will start a new row. > So if you wanted say the fifth row down, second pixel, how would you

Re: [Tutor] Python Image library

2007-07-18 Thread elis aeris
ahh~ it goes horizontally first why didn't I think of that? thank you ~ On 7/19/07, Tiger12506 <[EMAIL PROTECTED]> wrote: You know the height and the width of the image, no? So you know that every 'width' number of pixels will start a new row. So if you wanted say the fifth row down, second

[Tutor] Python Image library

2007-07-18 Thread elis aeris
import time import ImageGrab # Part of PIL from ctypes import * # Load up the Win32 APIs we need to use. class RECT(Structure): _fields_ = [ ('left', c_ulong), ('top', c_ulong), ('right', c_ulong), ('bottom', c_ulong) ] # time.sleep(2) GetForegroundWindow = windll.user32.GetFo

Re: [Tutor] tutor

2007-07-14 Thread elis aeris
please think about your first programming class, and then think about how long it took the prof to teach the concept of array. yes, it's about a week, if he is really good. python is a very young language, prefered by professionals of its simplicity, as such, the number of character of the doc

Re: [Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
understood. On 7/14/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: elis aeris wrote: > I actually meant to type send, because the text file is then going to > read by auto it 3, which > has the function send > <http://www.autoitscript.com/autoit3/docs/functions/S

Re: [Tutor] interpreter restarts

2007-07-13 Thread elis aeris
ohhh, you are the greatest :)) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
I actually meant to type send, because the text file is then going to read by auto it 3, which has the function send I use that functions this way because I have this

Re: [Tutor] interpreter restarts

2007-07-13 Thread elis aeris
from a file, i click run from the IDLE interpreter On 7/14/07, elis aeris <[EMAIL PROTECTED]> wrote: IDLE On 7/14/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > > > "elis aeris" <[EMAIL PROTECTED]> wrote > > > why deos the interpreter restarts with

Re: [Tutor] interpreter restarts

2007-07-13 Thread elis aeris
IDLE On 7/14/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "elis aeris" <[EMAIL PROTECTED]> wrote > why deos the interpreter restarts with this? Which interpreter? Command prompt python? IDLE? PythonWin? PyCrust? And are you running them line by line manually or is

Re: [Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
def send(string): f.write("send( \"%s\"\n' % string )" ) f = open ("data.ini") send("string is very nice and all those things are pretty cool") this one is wrong, i guess i didn't ask you how to add things after this \"%s\"\n' % title) ___

Re: [Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
this one doesn't work; did I misread your string? f = open("data.ini","w") title = "taitle" f.write('title is \"%title\"\n ') f.close() ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
def winlist(title): f.write("winlist(\"title\")") how about if "title" is a variable? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] interpreter restarts

2007-07-13 Thread elis aeris
why deos the interpreter restarts with this? f = open("data.ini","w") f.write("yeahppe") f.close() ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
also, why does the interpreter restart when I run this? f = open("data.ini","w") f.write("yeahppe") f.close() ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] how do I input " as part of a string?

2007-07-13 Thread elis aeris
how do I input " as part of a string? f.write("my "car" has been a great one for me") I am trying to write the above lines into a file, including the " as part of a the single string how do I do that? ___ Tutor maillist - Tutor@python.org http://mai

Re: [Tutor] making aaa.txt in notepad focused.

2007-07-11 Thread elis aeris
is it possible to do patial window title? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] making aaa.txt in notepad focused.

2007-07-11 Thread elis aeris
import time from ctypes import * # Load up the Win32 APIs we need to use. GetForegroundWindow = windll.user32.GetForegroundWindow foreground_window = GetForegroundWindow() this is a part of a code I from a separate project. I am trying to find out it's possible to do this: handle = geso

Re: [Tutor] green brackets?

2007-07-11 Thread elis aeris
@_@ i see On 7/12/07, Paulo Nuin <[EMAIL PROTECTED]> wrote: Hi f.write("n\") should be f.write("\n") Paulo elis aeris wrote: > def mousemove(x,y): > f.write("n\") > f.write("command" + " =" + " mousemove\n")

[Tutor] green brackets?

2007-07-11 Thread elis aeris
def mousemove(x,y): f.write("n\") f.write("command" + " =" + " mousemove\n") f.write("parameter_1 = " + str(x) + "\n") f.write("parameter_2 = " + str(y) + "\n") f.write("n\") for some reason that last bracket of the 2nd and last line line in IDLE are green.\ why is that? _

Re: [Tutor] I/O error (?)

2007-07-11 Thread elis aeris
no, no, the values are coming from all over the place, so having to remember which member of the list that function is tied to may be more of a headache I get the technique though On 7/12/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: elis aeris wrote: > oh in this case they

[Tutor] strange output

2007-07-11 Thread elis aeris
def mousemove(): f.write("command" + " =" + " mousemove\n") f.write("parameter_" + str(number_1) + "=" + " 500\n") f.write("parameter_" + str(number_2) + "=" + " 500\n") f.write("parameter_" + str(number_3) + "=" + " 500\n") f.write("parameter_" + str(number_4) + "=" + " 500\n")

Re: [Tutor] I/O error (?)

2007-07-11 Thread elis aeris
oh in this case they actually aren't possible to be listized, because they are just place holders for quite a number of other names of variables and stuff :) ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] I/O error (?)

2007-07-11 Thread elis aeris
number_1 = 1 number_2 = 2 number_3 = 3 number_4 = 4 number_5 = 5 number_6 = 6 f = open("data.ini", "w") f.write("[1]") f.write("\n") f.write("command" + "=" + "mousemove\n") f.write("parameter_" + str(number_1) + "=" + " 500\n") f.write("parameter_" + str(number_2) + "=" + " 500\n") f.write("para

[Tutor] file methods

2007-07-09 Thread elis aeris
python 3.9 File Objects of Python Library Reference from the document i know that if I want to open a text file I do: f = open("text.txt", "r+") and thus create f as an file object i can then use. however, i don't understand these functions .readline .readlines .read .xlinesread I have a

Re: [Tutor] object names

2007-07-08 Thread elis aeris
ugh, i guess what I need is just to name variables, not objects. var_1 var_2 and so on. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] object names

2007-07-08 Thread elis aeris
or it's not an object but common variables. var_1 var_2 and so on ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] object names

2007-07-08 Thread elis aeris
I need to create object with numbers, for instance, i need to create 5 object of names like these object_1 object_2 and so on, how do I write a script that would do it when I specify that I need # number of it? ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Fastest way to iterate through a file

2007-07-05 Thread elis aeris
I need some of a something to be imported into python these are the functions I need, anyway know anything that might do any of the following? Eg: suppose the class' name is autowindow: autowindow.gainfocus(handle) put the window of that handle into focus. import autowindow autowindow.im

Re: [Tutor] Tutor Digest, Vol 41, Issue 7

2007-07-02 Thread elis aeris
they cancelled this class http://reg.cstudies.ubc.ca/course_info.cfm?courseid=IP468 due to low enrollment. I'd love to be in a class. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] pop up window

2007-07-02 Thread elis aeris
i won't do that again, i am a 2 day newbie (hello) uh, how about a less quick one that's built-in in python ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] optimization: faster than for

2007-07-01 Thread elis aeris
>> In [4]:import array >> In [5]:def f7(list): >>.5.: return array.array('B', list).tostring() >>.5.: >> >> In [6]:f7([97, 98, 99]) >> Out[6]:'abc' ugh the code it self is not generic python, that was an example of how to do this my project is OCR http://www.eternite.co.uk/gundam_

Re: [Tutor] Power Shells [WAS:] optimization: faster than for

2007-07-01 Thread elis aeris
uh, can i ask about something very quickly? how do i write a function to do a pop up window with designated window name, type (ok, cancel, those) and message? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Power Shells [WAS:] optimization: faster than for

2007-07-01 Thread elis aeris
http://memoryhacking.com/forums/viewtopic.php?p=1195#1195 On 7/1/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "elis aeris" <[EMAIL PROTECTED]> wrote > Use the best for-equivalent and run the code below, Elis, Can you tell us what exactly you are trying to do? I&#x

Re: [Tutor] Fastest way to iterate through a file

2007-07-01 Thread elis aeris
On 7/1/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: elis aeris wrote: > I found out that by making a copy of it, it can be load() ed ! ImageGrab returns an image instance. You can get the pixel data directly using getdata(). There's no reason to do

Re: [Tutor] Fastest way to iterate through a file

2007-07-01 Thread elis aeris
in that case, can we talk about what this is? import array def f7(list): return array.array('B', list).tostring() f7([97, 98, 99]) Out[6]:'abc' It's only one line, and it's faster than for(), getting through this one might just end my quest for optimized python source code. (then i ll be

Re: [Tutor] Power Shells [WAS:] optimization: faster than for

2007-07-01 Thread elis aeris
Oie, as if the battle for the best text editor is not enough ... Well, can you run a test for me? Use the best for-equivalent and run the code below, instead of 1024*768, scale to 800*600 , just so the window you are screen shotting from is small enough. import time import ImageGrab

Re: [Tutor] optimization: faster than for

2007-07-01 Thread elis aeris
x27;abc' searching with ipython search engine returns returns "parrel computing" ack, so i call the array.array function, and tostring() function, I have no idea how to read that. @_@ what a great one liner! On 7/1/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote:

Re: [Tutor] optimization: faster than for

2007-07-01 Thread elis aeris
my reply oh crancky! C# ! http://en.wikipedia.org/wiki/Iron_Python i better try to find the best way to do it with the official python genre before venturing into that world of pain without PIL ! Quote:- Hide quoted text - In [4]:import array In [5]:def f7(list): .5.: return arra

Re: [Tutor] optimization: faster than for

2007-07-01 Thread elis aeris
oh crancky! C# ! i better try to find the best way to do it with the official python genre before venturing into that world of pain without PIL ! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] optimization: faster than for

2007-07-01 Thread elis aeris
oh i get it, it's line number. import array def f7(list): return array.array('B', list).tostring() f7([97, 98, 99]) ## NOW, this looks python ! ___ Tutor maillist - Tutor@python.org http://mail.pyt

Re: [Tutor] optimization: faster than for

2007-07-01 Thread elis aeris
so this is the actual code? [4]:import array [5]:def f7(list): .5.: return array.array('B', list).tostring() .5.: [6]:f7([97, 98, 99]) Output on the screen: [6]:'abc'- Hide quoted text - ___ Tutor maillist - Tutor@python.org http://mail.pytho

Re: [Tutor] Fastest way to iterate through a file

2007-07-01 Thread elis aeris
I found out that by making a copy of it, it can be load() ed ! it runs 3 times faster now import time import ImageGrab from ctypes import * class RECT(Structure): _fields_ = [ ('left', c_ulong), ('top', c_ulong), ('right', c_ulong), ('bottom', c_ulong) ] GetFor

  1   2   >