Code Point
September 08, 2010, 08:21:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Invoking python file from another python  (Read 2835 times)
iminusa
Jr. Member
*

Karma: 0
Offline Offline

Posts: 1


« on: April 09, 2008, 02:02:38 AM »

Hi...

I am trying to invoke one python file from another python with arguments...I want to use arguments in second python..I tried exec and execfile but when I am passing argument as local I am getting value there but I am not able to use variable AdminControl, AdminConfig in second python. I am declaring this variable in both python file...I want variable to be in sys.arg..

Can anyone help me out...

Thanks!!
Logged
Alter Lobo
Global Moderator
Jr. Member
*****

Karma: 10
Offline Offline

Posts: 65


« Reply #1 on: April 09, 2008, 09:59:06 AM »

The arguments will be available to the called program in the sys.argv list. The first element of the list, sys.argv[0] is the program name.

If this does not solve your problem please post the code of both programs.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!