Code Point
September 08, 2010, 05:20:38 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
Home
Help
Search
Login
Register
Code Point
>
Client Side
>
Python
(Moderator:
Alter Lobo
) >
Invoking python file from another python
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Invoking python file from another python (Read 2834 times)
iminusa
Jr. Member
Karma: 0
Offline
Posts: 1
Invoking python file from another python
«
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
Posts: 65
Re: Invoking python file from another python
«
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Announcements
-----------------------------
Client Side
-----------------------------
=> Python
-----------------------------
Server Side
-----------------------------
=> Web Python
=> PHP
-----------------------------
Test
-----------------------------
=> Test
Loading...