Newbie needs help
Eric Wertman
ewertman at gmail.com
Tue Aug 26 12:56:48 EDT 2008
Is the loginout file named loginout.py ? It needs to be for the
import to work. If the import works, you have to refer to those
variables within the right namespace, ie : loginout.url,
loginout.adminlogin, etc.
On Tue, Aug 26, 2008 at 12:46 PM, frankrentef <frankrentef at yahoo.com> wrote:
> Greetings all,
>
> I'm wanting to maintain what values in one file and call them in
> another. The purpose being to keep a single location where url's,
> login's and passwords can be maintained, then called as needed from
> another file.
>
> In file #1 I have...
>
> import time
> import os
> import sys
>
> url = 'http://zoo/'
>
> adminlogin = 'Zebra'
> adminpassword = 'Zebra12$'
>
>
> ---------------------------------------------
>
> In file #2 I have the following...
>
> from cPAMIE import PAMIE
>
> #Imports - used to setup / control finding files
> import time
> import os
> import sys
> import loginout #name of the file retaining all url/login info
> from log import log
>
> #Create New Pamie Object
> ie=PAMIE()
> ie=Visible =1
> t=time
>
> adminlogin (ie,url)
> if ie.findText ('Site Status: Active'):
> log ('PASSED -- ADMIN Module - ADMIN Login & Admin Tab Navigation
> Successful')
> else:
> log ('WARNING -- ADMIN Module Login & Admin Tab Navigation
> FAILED')
> time.sleep(2)
>
>
>
> What am I doing incorrectly to not have file two log in when
> executed. All files are in the same directory. Keep it simple...
> I'm new at this.
>
> THNX
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list