aspose file tools*
The moose likes Jython/Python and the fly likes Calling a function  inside a python file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Calling a function  inside a python file." Watch "Calling a function  inside a python file." New topic
Author

Calling a function inside a python file.

Raj Sikka
Ranch Hand

Joined: Apr 11, 2003
Posts: 34
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

Joined: Aug 03, 2002
Posts: 7729
Assuming sample.py contains a definition like:

You can call abcd in a couple of ways:

or:

or:


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Raj Sikka
Ranch Hand

Joined: Apr 11, 2003
Posts: 34
Hi,
Thanks for your reply.
Regds,
Raj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a function inside a python file.