Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to run another python script?

Reply
Thread Tools

How to run another python script?

 
 
Dan Lee
Guest
Posts: n/a
 
      02-14-2011
Hi.

I just knew what python is.
Now I'm about to write backup script.Now I got 2 scripts.

AAA : generate zip file
BBB : delete old file.

AAA is done.
Now I'm going to code BBB file. and I will fix AAA to call BBB to
delete dump file at the end.
Please let me know How can I call the BBB file from AAA file.

Thanks in advance.
Dan
 
Reply With Quote
 
 
 
 
rantingrick
Guest
Posts: n/a
 
      02-14-2011
On Feb 14, 9:51*am, Dan Lee <(E-Mail Removed)> wrote:

> AAA : generate zip file
> BBB : delete old file.
>
> AAA is done.
> Now I'm going to code BBB file. and I will fix AAA to call BBB to
> delete dump file at the end.
> Please let me know How can I call the BBB file from AAA file.


Simple: Make a call using the underlying os from the aptly named "os"
module (or other!). OR import BBB and execute the code.
 
Reply With Quote
 
 
 
 
Jean-Michel Pichavant
Guest
Posts: n/a
 
      02-14-2011
Dan Lee wrote:
> Hi.
>
> I just knew what python is.
> Now I'm about to write backup script.Now I got 2 scripts.
>
> AAA : generate zip file
> BBB : delete old file.
>
> AAA is done.
> Now I'm going to code BBB file. and I will fix AAA to call BBB to
> delete dump file at the end.
> Please let me know How can I call the BBB file from AAA file.
>
> Thanks in advance.
> Dan
>

In that case, code the delete function in AAA => No BBB file, problem
solved.
There is of course plenty of ways to execute BBB from AAA but that would
be overkill.

If you really want to write the BBB file, then write it, import it in
AAA and call the BBB.deleteOldFile function.

JM
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Run a python script as an exe and run a new process from it venutaurus539@gmail.com Python 9 02-27-2009 05:22 PM
EMBEDDING > Run Python & Run C Function anonymisiert85@mymail.ch Python 3 06-23-2007 04:15 AM
How to get inputs for a python program that run from another python program pradeep nair Python 2 06-12-2007 01:20 PM
how to run a python file with another file as an argument! se7en Python 2 02-05-2004 09:52 PM



Advertisments