473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

basic jython question

Hello all

I have a 'logger' module which is essentially just a facade over the
'logging' standard module. Can this be called from jython, and how is
this acheived? This is a colleague's question but I have no knowledge
of jython or java, and I can't install them at present in order to
figure it out.

It appears that the CPython logging builtin is not implemented in
Jython, is this correct?

The source for CPython's logging says that it should work with Python
>1.5.2, so given everything from Python2.4/Lib/Logging and my own
facade module, is there any way to get it working from a jython
script? I presume they just can't be dropped in to a "site-packages"
directory? I'm completely in the dark, any help?

Gerard

Feb 15 '07 #1
3 1276

"Gerard Flanagan" <gr********@yahoo.co.ukwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...
I have a 'logger' module which is essentially just a facade over the
'logging' standard module. Can this be called from jython, and how is
this acheived? This is a colleague's question but I have no knowledge
of jython or java, and I can't install them at present in order to
figure it out.
Since the CPython module is heavily influenced by the native Java logging
framework (and/or log4j), I would have thought that it would be easier
to create a Jython wrapper for those.
Feb 15 '07 #2
On Feb 15, 1:53 pm, "Richard Brodie" <R.Bro...@rl.ac.ukwrote:
"Gerard Flanagan" <grflana...@yahoo.co.ukwrote in message

news:11**********************@m58g2000cwm.googlegr oups.com...
I have a 'logger' module which is essentially just a facade over the
'logging' standard module. Can this be called from jython, and how is
this acheived? This is a colleague's question but I have no knowledge
of jython or java, and I can't install them at present in order to
figure it out.

Since the CPython module is heavily influenced by the native Java logging
framework (and/or log4j), I would have thought that it would be easier
to create a Jython wrapper for those.
Ok, thanks. I'll suggest that.

Gerard

Feb 15 '07 #3
On Feb 15, 1:53 pm, "Richard Brodie" <R.Bro...@rl.ac.ukwrote:
Since the CPython module is heavily influenced by the native Javalogging
framework (and/or log4j), I would have thought that it would be easier
to create a Jython wrapper for those.
Agreed, but if you copy the logging folder from the CPython Lib folder
to the jython lib folder, it should work (except for use of other
modules which wouldn't perhaps be available under Java, such as
syslog, win32 etc.) - so files, console streams etc. should be OK.

Clearly, a facade over an existing system such as log4j or
java.util.logging would have the potential to perform better.

Regards,

Vinay Sajip

Feb 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tennessee James Leeuwenburg | last post by:
Hi all, Sorry for the newb question, but Googling and FAQing didn't work. Is it correct that Jython can only access Java classes which are inside JAR archives in the JYTHON_HOME directory? IT...
4
by: Michael Chermside | last post by:
Ype writes: > For the namespaces in Jython this 'Python internal thread safety' > is handled by the Java class: > > http://www.jython.org/docs/javadoc/org/python/core/PyStringMap.html > > which...
6
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
0
by: Charles Griswold | last post by:
I'm just starting to learn jython prior to embedding it in a larger lava application. On my first try I get the following message C:\Downloaded Files\Jython>java -cp . jython-21 -o jython-2.1...
1
by: Nandan | last post by:
hello, can I ask a jython question here? when I use the jython interpreter I have no problem with the statement: from java import lang from javax import swing but when I put this in a...
1
by: scott | last post by:
I installed darwinports and did a "sudo port install jython" ------------------------- scott$ which jython /opt/local/bin/jython ------------------------- Jython works in interactive...
1
by: Mark Fink | last post by:
Hi there, unfortunately I am new to Jython and my "Jython Essentials" book is still in the mail. I looked into the Jython API Doc but could not find the information. I am porting a Python...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
1
by: Gregor Stich | last post by:
Dear all, I hope my question is here in the right place... What I want to achieve is a communication between Java and Python. We have a pretty strong framework of existing python scripts and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.