The problem is the order you are defining the functions. You must define the functions before you import them, try this:
#!/usr/bin/python
import client_side
username = "xxxxxx"
password = "123"
filename = "dfsdf.txt"
def server_order():
print "server side is running."
return
client_side.client(username,password,filename)
and
#!/usr/bin/python
def client_order():
import server_side
server_side.server_order()
return
def client(a,b,c):
print "client side function processing.."
client_order()
if __name__ == '__client__':
client()
return
Your initial problem was that client_side.client()
was being called before you defined server_order()
. Therefore when client_side.client()
tried to call it, it was not there!