Re: [Tutor] pywinauto for OS X and Linux?

2007-05-19 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote > Originally AppleScript could only perform actions that were > intentionally exposed by the authors of an application. OK, Like a COM interface in Windoze? > IIUC What happened in 10.3 is that the accessibility hooks were > exposed > to AppleScript all

Re: [Tutor] PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv'

2007-05-19 Thread Kent Johnson
ShivKumar Anand wrote: > dear all, > > I am trying to run turbogears application using Apache on windows and > the start_prj.py is > > from os.path import * > import sys > PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv' Do you have a module somewhere called sys.py

Re: [Tutor] pywinauto for OS X and Linux?

2007-05-19 Thread Kent Johnson
Alan Gauld wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote > >> I wasn't aware that AppleScript could be used for general UI >> scripting > > Its all I was aware it could do! > > What else does it have up its sleeve? Originally AppleScript could only perform actions that were intentionally

Re: [Tutor] two input acceptions

2007-05-19 Thread Kent Johnson
Bob Gailer wrote: > Alan Gauld wrote: >> input() by contrast reads the string input by the user and tries >> to evaluate it as a Python expression. Thus if the user typed >> >> import os;os.system('format c:\') >> > Err... are you confusing eval with exec? > > input([prompt]) > >

Re: [Tutor] PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv'

2007-05-19 Thread Alan Gauld
"ShivKumar Anand" <[EMAIL PROTECTED]> wrote > I am trying to run turbogears application using Apache > on windows and the start_prj.py is Have you tried the TurboGears forums? I suspect you'll get an answer there faster and more reliably than here. I use TurboGears but not with Apache on XP

Re: [Tutor] I want some help with arrays...

2007-05-19 Thread Luke Paireepinart
[snip my calendar example about fake 1-based indexing] > > if you want something like a calendar i thin is beter to use > adictionary where you can do this > agenda = > { > 'month' : > { > 'day': > { ... > }, > }, > } > > so you don't have to deal whit indexes you jut wet what yo

Re: [Tutor] Help with excetion handing and making my code more efficient needed please

2007-05-19 Thread Matt Smith
On Fri, 2007-05-18 at 17:03 -0500, Luke Paireepinart wrote: > see my other reply, Matt. > -Luke Apologies Luke, I have found your earlier post in the tutor archives - I don't seem to have received it from the list yet. Thanks for the help. Matt ___

Re: [Tutor] Help with excetion handing and making my code more efficient needed please

2007-05-19 Thread Luke Paireepinart
Matt Smith wrote: >> the possible combinations of values from the two tuples? >> see my other reply, Matt. >> -Luke >> > > Hi Luke, > > Sorry if I'm missing something but which other reply? > All the info in my other reply Alan reiterated, I believe. You can just subtract 1 from the total a

Re: [Tutor] how to seed up?

2007-05-19 Thread Andreas Kostyrka
Check the permissions, python does not emit any warnings if it cannot write the pyc files Andreas -- Ursprüngl. Mitteil. -- Betreff:Re: [Tutor] how to seed up? Von:"Alan Gauld" <[EMAIL PROTECTED]> Datum: 19.05.2007 17:53 <[EMAIL PROTECTED]> wrote > when i have many module

Re: [Tutor] I want some help with arrays...

2007-05-19 Thread alejandro varas
2007/5/18, Luke Paireepinart <[EMAIL PROTECTED]>: James Matthews wrote: > When the CPU writes to the RAM the 0th location can be written to also. When > you alter components of a language for example changing the way an list is > indexed you have to be careful because you can accidently jump out

Re: [Tutor] encryption for files/passwords

2007-05-19 Thread Alan Gauld
"Rohan Deshpande" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks, but I want to be able to encrypt *files* with passwords in > them.. the passwords being the sensitive data :) > > Any other ideas? Have you any more specific requirements that prevents the use of the modules

Re: [Tutor] how to seed up?

2007-05-19 Thread alejandro varas
hi list this is an answer to your first question I put two attachments, both python code main.py is the file you have to run and script.py is the file that must contain your code Howto: 1.- run main.py and your code will be executed 2.- then you will be answered to do it again, don't a

[Tutor] PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv'

2007-05-19 Thread ShivKumar Anand
dear all, I am trying to run turbogears application using Apache on windows and the start_prj.py is from os.path import *import sys #if len(sys.argv) > 1:#update_config(configfile=sys.argv[1], modulename="wiki30.config") sys.argv[0]="d:/web/Wiki-30"sys.argv[1]="d:/web/Wiki-30/dev.conf"

Re: [Tutor] how to seed up?

2007-05-19 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote > when i have many modules in my script (eg. 'import pylab, > os, sys'), python loads them very slow ... You could try putting all the imports into a single module and them importing that module. The new imported module should be compiled into Python byte code the fir

Re: [Tutor] pywinauto for OS X and Linux?

2007-05-19 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote > I wasn't aware that AppleScript could be used for general UI > scripting Its all I was aware it could do! What else does it have up its sleeve? I keep meaning to dig into Aopplescript properly. I downloaded the applescript development IDE from Apples

[Tutor] how to seed up?

2007-05-19 Thread emilia12
hi list when i have many modules in my script (eg. 'import pylab, os, sys'), python loads them very slow ... so is there a way to run same script many times (with small changes in the code), without reloading/parsing all modules each time ? and 2nd question - in case of CGI script - is there a w

Re: [Tutor] two input acceptions

2007-05-19 Thread Bob Gailer
Alan Gauld wrote: > "Rolando Pereira" <[EMAIL PROTECTED]> wrote > >> what did you mean when you were talking about the raw_input( )? >> How can the regular input( ) be used evilly? >> > > raw_input() is the preferred way to read input from a user. > It only reads the raw input as typed

Re: [Tutor] encryption for files/passwords

2007-05-19 Thread Rohan Deshpande
Thanks, but I want to be able to encrypt *files* with passwords in them.. the passwords being the sensitive data :) Any other ideas? On 5/19/07, Ben Sherman <[EMAIL PROTECTED]> wrote: > On 5/18/07, Rohan Deshpande <[EMAIL PROTECTED]> wrote: > > > Hey all, > > > > I am writing a small python scrip

Re: [Tutor] Help with excetion handing and making my code more efficient needed please

2007-05-19 Thread Matt Smith
> the possible combinations of values from the two tuples? > see my other reply, Matt. > -Luke Hi Luke, Sorry if I'm missing something but which other reply? Matt ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] pywinauto for OS X and Linux?

2007-05-19 Thread Kent Johnson
Alan Gauld wrote: > "John" <[EMAIL PROTECTED]> wrote > >> few hours. Pywinauto allows you to use python to automate the GUI of >> Windows using Python in very intuitive ways. What are the closest >> analogs for this under OS X and Linux? > > Applescript on MacOS could be used. > You can call Pyt

Re: [Tutor] (no subject)

2007-05-19 Thread Rikard Bosnjakovic
On 5/19/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Please be gentle and forgiving of mistakes > so beginners feel welcome as they learn. My intention was not to be harsh or rude in any manner, I was just trying to hint to encourage the use of subjects for posts. Should Teresa feel hurt, my hu

Re: [Tutor] pywinauto for OS X and Linux?

2007-05-19 Thread Alan Gauld
"John" <[EMAIL PROTECTED]> wrote > few hours. Pywinauto allows you to use python to automate the GUI of > Windows using Python in very intuitive ways. What are the closest > analogs for this under OS X and Linux? Applescript on MacOS could be used. You can call Python from within Applescript (a

Re: [Tutor] Continue Matching after First Match

2007-05-19 Thread Alan Gauld
"Tom Tucker" <[EMAIL PROTECTED]> wrote > The below code snipet works as designed, however the regex matches > once and > exits. I want it to continue matching and printing until EOF. Any > suggestions? Does re.findall() help? Alan G. ___ Tutor m

Re: [Tutor] two input acceptions

2007-05-19 Thread Alan Gauld
"Rolando Pereira" <[EMAIL PROTECTED]> wrote > what did you mean when you were talking about the raw_input( )? > How can the regular input( ) be used evilly? raw_input() is the preferred way to read input from a user. It only reads the raw input as typed by the user so it always returns a st