jython

Compiling Mysqldb for jython 2.5 on Solaris

I have used python2.6 + MySQL on Windows and there are binaries available. I wanted to get the whole thing working on Solaris Hence got the Mysql-Python package from here I had to get the setuptools installed which is done. Exploded the MySQL-python-1.2.3c1 When I this /jython2.5.1/jython setup.py build Error - `File "/opt/somepat...

Will shell scripts called from python persist after the python script ends?

As part of an automated test, I have a python script that needs to call two shell scripts that start two different servers that need to interact after the calling script ends. (It's actually a jython script, but I'm not sure that matters at this point.) What can I do to ensure that the servers stay up after the python script ends? At th...

Fading a picture gradually (Python, Jython)

Sorry, I'm obviously new at this, but the idea of this function is to fade the top half only of the picture (make it gradually darker). Here is what I have but it seems to be making all of the top half solid black. Any help would be appreciated. Correct code edited in. Question resolved. Thanks Justin and everyone else! def fadeDow...

Django MySql Raw Query Error - Parameter index out of range

This view is running fine on plain pyton/Django/mysql on Windows I'm porting this to run over jython/Django/mysql and it gives error - Exception received is : error setting index [10] [SQLCode: 0] Parameter index out of range (10 > number of parameters, which is 0). [SQLCode: 0], [SQLState: S1009] The Query is - cursor.execute(...

Jython and implementing HttpServlet.contextInitialized

I'd like my Jython servlet to implement the HttpServlet.contextInitialized method but I'm not sure how to express this in the web.xml. What I currently have is: from javax.servlet import ServletContextListener; from javax.servlet.http import HttpServlet class JythonServlet1 ( HttpServlet, ServletContextListener ): def contextI...

Can I use Sikuli as an Jython library in my project?

Sikuli is really cool, but it's working in its buildin Jython environment, the Sikuli IDE. So I m wondering is it possible to import Sikuli as an external library to my Jython library? I saw from Sikuli's website that they have this Python module which provides all Sikuli actions like click and type. Here is the link: http://sikuli.org...

Creating first Django project using jython.

I am trying to create my 1st project in django using jython. I am following this tutorial - http://docs.djangoproject.com/en/dev/intro/tutorial01/. As mentioned in tutorial, I navigate to the directory where i intend to create a django project and run 'jython C:\jython2.5.1\Lib\site-packages\django\bin\django-admin.py'. On pressing ent...

installing mysqldb for django (jython)?

I installed jython, django on my windows system. I successfully created a project mysite. Now after updating settings in settings.py. i ran 'manage.py' and got the error- Import error - "no module named mysqldb". now, i downloaded mysqldb (which is for python, but i thought it will work for jython also) and i tried to install it. but now...

Blurring a picture (Python, Jython, picture editing)

Trying to blur a picture in Jython. What I have does run but does not return a blurred picture. I'm kinda at a loss of what is wrong with it. FINAL (WORKING) CODE EDITED IN BELOW. THANKS FOR HELP GUYS! def main(): pic= makePicture( pickAFile() ) show( pic ) blurAmount=10 makeBlurredPicture(pic,blurAmount) show(makeBlurredPictur...

Compiling Jython for web apps in Eclipse

I have PyDev set up in Eclipse to do Jython web development. Instead of using the Jython interpreter to handle my servlets I prefer to use the Jython compiler instead for a particular project I'm working on. Within Eclipse I use Tomcat to test my web apps. The sort of process that I'm looking for is would be very similar to standard Jav...

JNDI Access from a Django app on Jython

Is it possible to access a JNDI value from Tomcat's config from a Django app running on Jython? My config has a web service URL, accessible via JDNI, that I need to get into the Django App at runtime. It's not a database connection, it's just the URL to a web service deployment. It might or might not be on the same Tomcat instance. ...

Is anyone successfully using django jython with SQL Server 2005?

I'm attempting to execute my Django 1.1 app, which accesses a SQL Server 2005 database, inside a Tomcat servlet container. I'm using Django-Jython 1.1.1 and Jython 2.5.1 to do this. In settings.py, I set DATABASE_ENGINE='doj.backends.zxjdbc.mssql2k' When I try to get the war file to deploy to Tomcat with: jython manage.py war I...

Jython image manipulation problem.

This program is supposed to take the outline of an image, then split it into different quadrants, then color it, such as the Andy Warhol Marilyn Monroe picture. Every function up to the "Warholize" function works but it gets stuck on c=getPixel(picEdge,x,y) under the warholize function at which I'm not sure what to do. Any help would...

When will Jython support Python 3?

According to Jython's documentation: Jython is an implementation of the Python language for the Java platform. Jython 2.5 implements the same language as CPython 2.5, and nearly all of the Core Python standard library modules. (CPython is the C implementation of the Python language.) Jython 2.5 uses the same regressio...

Python (Jython) Playing notes from pixels in picture.

This is from a class assignment: This program is about listening to colors. We will treat pictures as piano scores. Write a function called listenToPicture that takes one picture as an argument. It first shows the picture. Next, it will loop through every 4th pixel in every 4th row and do the following. It will compute the total of the ...

Web Server frameworks for Python Web Apps

Hi I'd like to get suggestions on the best way to serve python scripts up as web pages. Typically I'd like a way for me and my colleagues to write simple web pages with minimal effort ie we focus on the business logic eg creating simple forms etc. Possibly with some way to manage sessions but this is a nice-to-have. It doesn't have to b...

IDE for websphere/jython

I would like to develop administrative jython-scripts for WebSphere 7. Is there any IDE (or may be plugins for eclipse) which provides code auto-completition functions, ability to start/stop server, debug jython scripts? I know that there is the Application Server Toolkit 6.1 but it is for WebSphere 6.1 and couldn't be applied to WebSphe...

Jython webapp performance

I'm currently building a Jython web app but am concerned about Jython application performance. I take some comfort in that any compute intensive tasks I can write in a separate Java jar and invoke them from Jython. Has anyone had problems doing this, or forsee issues with such a setup? ...

Are jython & coldfusion compatible?

Are jython & coldfusion compatible? I mean, can I run both at the same time without trashing my server? Are there any overlapping conflictions with java? ...

String search and write into file in jython

hi Everyone , i wish to write a program that can read a file and if a particular str_to_find is found in a bigger string say AACATGCCACCTGAATTGGATGGAATTCATGCGGGACACGCGGATTACACCTATGAGCAGAAATACGGCCTGCGCGATTACCGTGGCGGTGGACGTTCTTCCGCGCGTGAAACCGCGATGCGCGTAGCGGCAGGGGCGATCGCCAAGAAATACCTGGCGGAAAAGTTCGGCATCGAAATCCGCGGCTGCCTGACCCAGATGGGCGACAT...