[Tutor] curses

2007-07-11 Thread max .
hello all sorry but i just cant seem to get my head around curses iv read a few of the tuts out there and get what there saying but i cant write my own if any one can point me in the right direction easer is better i only need something very simple right now just writting and refreshing thanks __

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

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

2007-07-11 Thread Bill Burns
elis aeris wrote: > 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 t

Re: [Tutor] How do you install EGG files

2007-07-11 Thread Terry Carroll
On Wed, 11 Jul 2007, Eric Brunson wrote: > Add the full path of the egg to a .pth file in a directory in your > python path. Cool, thanks. To Shawn: So all I did was create a text file called "myeggs.pth" in my site-packages directory, with the following content: >cat c:\Python25\Lib\site-pa

[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] How do you install EGG files

2007-07-11 Thread Eric Brunson
Terry Carroll wrote: > On Wed, 11 Jul 2007, shawn bright wrote: > > >> Hey there all, >> i got the news that storm was released as open source. Storm is a db orm for >> python. >> i have a downloaded package and i would like to play with it, but it does >> not come with any install instructions.

[Tutor] How do you install EGG files (was: storm anyone?

2007-07-11 Thread Terry Carroll
On Wed, 11 Jul 2007, shawn bright wrote: > Hey there all, > i got the news that storm was released as open source. Storm is a db orm for > python. > i have a downloaded package and i would like to play with it, but it does > not come with any install instructions. > i found the package here https:

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

2007-07-11 Thread Tiger12506
> 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 Would you do us a huge favor in helping you and send us your code, the code where these values are comi

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

2007-07-11 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > 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 That makes sense provided you are using more decriptive names that number_1 etc. Thats just as

Re: [Tutor] strange output

2007-07-11 Thread Luke Paireepinart
Alan Gauld wrote: > "elis aeris" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> def mousemove(): >>f.write("command" + " =" + " mousemove\n") >>f.write("parameter_" + str(number_1) + "=" + " 500\n") >>f.write("parameter_" + str(number_2) + "=" + " 500\n") >>f

Re: [Tutor] please add me

2007-07-11 Thread Luke Paireepinart
Alan Gauld wrote: > You need to add yourself. > Technically, he doesn't need to add himself. We could just add his e-mail address for him. But that might violate some ToS or something. -Luke ___ Tutor maillist - Tutor@python.org http://mail.python.

Re: [Tutor] strange output

2007-07-11 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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(numbe

Re: [Tutor] please add me

2007-07-11 Thread Alan Gauld
You need to add yourself. Go to the Python web site, Community, Mailing Lists. Navigate to the tutor list and fill in the registration form. HTH, Alan G. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Please add me to the mailing list > > Samar Mohamed ---

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

2007-07-11 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > 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 :) OK, But you could still use a dictionary and get the same effect... Alan G.

Re: [Tutor] green brackets?

2007-07-11 Thread John
This is how you put a newline or linebreak in a string: \n -just adding that for someone's search later on, since 'newline' and 'linebreak' hadn't been mentioned yet ;) (Should I be doing something else!?) ___ Tutor maillist - Tutor@python.org http:/

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") > f.write("parameter_1 = " + str(x) + "\n") > f.write("parameter_2

Re: [Tutor] green brackets?

2007-07-11 Thread Paulo Nuin
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") > f.write("parameter_1 = " + str(x) + "\n") > f.write("parameter_2 = " + str(y) + "\n") > f.write("n\") > > > > > > for some re

Re: [Tutor] green brackets?

2007-07-11 Thread Luke Paireepinart
elis aeris wrote: > def mousemove(x,y): > f.write("n\") n\ and \n are different. n\ means "an n character and then an escaped character" because the n\ was followed by a ", then the string literally contains n\" for example, "my momma always said \"life is like a box of chocolates. you never

[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? _

[Tutor] please add me

2007-07-11 Thread samar . mohamed
Please add me to the mailing list Samar Mohamed___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

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 actually

[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 Luke Paireepinart
elis aeris wrote: > 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 :) That is untrue. You can put any variables into a list that you want. For example: x = 'hello' b = 42 abba = 0xABBA

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

Re: [Tutor] _ function

2007-07-11 Thread Paul W. Frields
> > On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: > > > I'm editing some code from Mailman and seeing: > > > > > > legend = _("%(hostname)s Mailing Lists") > > > > > > > The outter parenthese are a function call. The underscore > > is a name that has a callable as a value, I supp

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

2007-07-11 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > 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.w

Re: [Tutor] Question regarding syntax

2007-07-11 Thread Alan Gauld
"John Morris" <[EMAIL PROTECTED]> wrote > So, any really good tutorials on FP and map, filter, zip, lambda ? > I'm trying to wrap my mind around those better... You can try my FP topic in my tutor. Its not the last word but there are an excellent series of FP articles on the IBM Python 'blog'

Re: [Tutor] Question regarding syntax

2007-07-11 Thread Andre Roberge
On 7/11/07, Eric Brunson <[EMAIL PROTECTED]> wrote: > Michael Klier wrote: > > Dave Kuhlman wrote: > > > >> On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: > >> > >>> I'm editing some code from Mailman and seeing: > >>> > >>> legend = _("%(hostname)s Mailing Lists") > >>> > >>> > > > >

[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

Re: [Tutor] Question regarding syntax

2007-07-11 Thread Eric Brunson
Michael Klier wrote: > Dave Kuhlman wrote: > >> On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: >> >>> I'm editing some code from Mailman and seeing: >>> >>> legend = _("%(hostname)s Mailing Lists") >>> >>> > > I am no python pro but I guess that funtction _() ist just a

Re: [Tutor] Question regarding syntax

2007-07-11 Thread Michael Klier
Dave Kuhlman wrote: > On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: > > I'm editing some code from Mailman and seeing: > > > > legend = _("%(hostname)s Mailing Lists") > > I am no python pro but I guess that funtction _() ist just a wrapper function around gettext.gettext from the

Re: [Tutor] Question regarding syntax

2007-07-11 Thread John Morris
On 7/11/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: > I'm editing some code from Mailman and seeing: > > legend = _("%(hostname)s Mailing Lists") > The outer parentheses are a function call. The underscore is a name that has a callab

Re: [Tutor] Question regarding syntax

2007-07-11 Thread Dave Kuhlman
On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote: > I'm editing some code from Mailman and seeing: > > legend = _("%(hostname)s Mailing Lists") > The outter parenthese are a function call. The underscore is a name that has a callable as a value, I suppose. I believe that the value o

Re: [Tutor] Module imports

2007-07-11 Thread Dave Kuhlman
On Wed, Jul 11, 2007 at 08:24:17PM +0900, kevin parks wrote: > but my kp module also uses happens to call on certain things from the > random, time, and sys modules and so kp.py also has > > import random > import sys > import time > > Now so far this seems to be working fine and without error (a

Re: [Tutor] Module imports

2007-07-11 Thread Noufal Ibrahim
kevin parks wrote: > With sincere apologies for such a basic question, and one i will > admit that i asked once before, moons ago. But even after googling > around a bit i don't understand what the right answer is, or if i > once did, can't recall it now.. [..] > > For some reason i feel li

[Tutor] storm anyone?

2007-07-11 Thread shawn bright
Hey there all, i got the news that storm was released as open source. Storm is a db orm for python. i have a downloaded package and i would like to play with it, but it does not come with any install instructions. i found the package here https://storm.canonical.com/FrontPage there is a makefile i

[Tutor] Question regarding syntax

2007-07-11 Thread John Morris
I'm editing some code from Mailman and seeing: legend = _("%(hostname)s Mailing Lists") Can anyone tell me what the _( means in that context? Thanks, John ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Question about code reviews

2007-07-11 Thread Tino Dai
Hi there, Do you know of any service or person that could do a code review for me? Thanks, -Tino ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Module imports

2007-07-11 Thread kevin parks
With sincere apologies for such a basic question, and one i will admit that i asked once before, moons ago. But even after googling around a bit i don't understand what the right answer is, or if i once did, can't recall it now.. I have a script, let's call it foo.py This script loads sever

Re: [Tutor] An interesting case... of east vs. west

2007-07-11 Thread Albert Weiss
John: One way to handle the situation of longitude is to make everything west of the Greenwich meridan a negative value until -180 degrees and everything east of Greenwich a positive value. HTH. Albert John <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 07/10/2007 04:22 PM To tutor

Re: [Tutor] Bundle help!

2007-07-11 Thread Alan Gauld
"Sara Johnson" <[EMAIL PROTECTED]> wrote > but I don't suppose there are any design documents available? > Structure charts, class diagrams? Even plain text or pseudo > code? > > Not sure I follow what you mean by those specific documents > or diagrams, I guess that answers the question!