Title: I have written two separate files, one containing classes and the other calling them but calling one makes object of all. Why?
Tags: python;python-2.7
Question: separate.py
class foo():
print 'a bunch of time consuming work'
class tryme():
print 'try me'*
main.py
from separate import *
It however printed both:
a bunch of time consuming work
try me
Comment: Just a tip: You should use print like a function (print("...") ) to prepare for python 3.

Here is the accepted answer: When you call from separate import *
you execute the print command !
If you want to just make an instance do something like :
class foo():
def my_print(self):
print 'a bunch of time consuming work'
and call my print from main !
f = foo()
f.my_print

Here is another answer: You should write an init for your classes then it wont happen anymore!
class foo():
def __init__(self):
print('a bunch of time consuming work')
class tryme():
def __init__(self):
print ('try me')

Here is another answer: Because commands in the scope of the class are statically defined, when importing a module it also initiate the static fields when binding everything.
@Tino A gave a nice solution for you, but if you want to read some more material regarding imports in python try this.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 3, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:06/21/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><python-2.7>', 'Title': 'I have written two separate files, one containing classes and the other calling them but calling one makes object of all. Why?', 'ViewCount': 49, 'id': 37937231, 'user_AboutMe': None, 'user_AccountId': 8652235.0, 'user_DisplayName': 'Ulsa Minor', 'user_Reputation': 89.0, 'user_Views': 30.0, 'user_id': 6477511.0}}