call from pthon to shell

Discussion in 'Python' started by Bqsj Sjbq, Feb 12, 2013.

  1. Bqsj Sjbq

    Bqsj Sjbq Guest

    >>> import os
    >>> os.system("i=3")

    0
    >>> os.system("echo $i")


    0

    why i can not get the value of i?
     
    Bqsj Sjbq, Feb 12, 2013
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    6,963
    Jonathan Bromley
    Feb 18, 2005
  2. Ryan Gaffuri
    Replies:
    2
    Views:
    527
    Default User
    Oct 22, 2003
  3. Gerardo Herzig
    Replies:
    1
    Views:
    1,441
    Philipp Pagel
    Feb 27, 2008
  4. Samuel A. Falvo II
    Replies:
    0
    Views:
    686
    Samuel A. Falvo II
    Oct 8, 2008
  5. gaurav kashyap
    Replies:
    2
    Views:
    832
    gaurav kashyap
    Oct 30, 2008
  6. gaurav kashyap
    Replies:
    3
    Views:
    881
    gaurav kashyap
    Oct 31, 2008
  7. edwithad

    Bash shell to Python shell?

    edwithad, Sep 28, 2009, in forum: Python
    Replies:
    4
    Views:
    2,149
  8. moongeegee

    execute a shell script in a shell script

    moongeegee, Dec 3, 2007, in forum: Perl Misc
    Replies:
    2
    Views:
    488
    Ben Morrow
    Dec 4, 2007
Loading...