Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a function inside a python file.

 
Raj Sikka
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a python file say sample.py .
There is one function in sample.py say abcd();
How to call abcd() ? what is the syntax that i need to give at the python prompt?
>>>
Pls answer .
Thanks,
Raj
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming sample.py contains a definition like:

You can call abcd in a couple of ways:

or:

or:
 
Raj Sikka
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for your reply.
Regds,
Raj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic