aspose file tools*
The moose likes Jython/Python and the fly likes Jython: Very basic question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Jython: Very basic question." Watch "Jython: Very basic question." New topic
Author

Jython: Very basic question.

Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 273
Guys,

I have written a function in jython:

def call():
print "Hello Guru..."
return 1

I am calling this function:

call()

But this gives me the following exception:
NameError: call

How to call this function?

Thanks,
Guru
Gurumurthy Ramamurthy
Ranch Hand

Joined: Feb 13, 2003
Posts: 273
Sorry, I did a mistake in my program. I have defined the function later and called before the function definition.

So, it should be:

1. Define the function first
2. Call this function next

This problem got solved.

Thanks,
Guru
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jython: Very basic question.