101 questions
0 votes
0 answers
26 views
Write a CSV based on another CSV file creating an additional empty row? [duplicate]
I have a system that creates csv files nightly and sends them off to a SMTP server. Customer has requested that we make a separate text file with differently formatted timestamps, this time to ISO ...
1 vote
1 answer
1k views
Jython - Convert Java array with Java Strings to Python list with Python strings
I'm using some Oracle API with Jython2.5. Once of the methods returns: array(java.lang.String) I would like to convert this to a python list, with strings as the elements in the list. e.g. ['some', '...
0 votes
1 answer
391 views
Changing a folder in a path for writing using re and glob libraries
I have two directories: path/to/folder and path/to/otherfolder which both have several sub-directories inside them: path/to/folder/TEST1, path/to/folder/TEST2, path/to/otherfolder/TEST1, path/to/...
0 votes
1 answer
240 views
How can I get PythonInterpreter to recognize datetime and other modules such as psutils in python?
I am running a python program called diagnostics.py from a java class called PyInterpreter that intializes a jython PythonInterpreter object and a file to use and can run methods from that python ...
3 votes
1 answer
8k views
Converting a MSSQL varbinary to a base64 string
The goal Take the data in mssql, an image, convert to base64 and embed in an email. Deets I have an image, stored in a varbinary column in a mssql database. 0xFFD8FFE00.... On the other end, I'm ...
1 vote
1 answer
417 views
Executing subprocess cannot find specified file on Windows
I'm working inside a system that has Jython2.5 but I need to be able to call some of Google's apis so I wrote an offline script that I wanted to call from my Jython environment and return to me small ...
1 vote
0 answers
95 views
NullPointerException while using struct.unpack() in Jython
I'm trying to use Jython in order to achieve struct.unpack() method of python. I've a String which is packed using python and I want to unpack it in java (using jython) I've added the following ...
1 vote
0 answers
134 views
how to bring the actor moving on the y-axis?
Im programming a Jump&Run in TigerJython (Python). I implemented the formulas so the actor jumps up(when pressing up-button) and then the actor should go down automatically thanks to the ...
0 votes
1 answer
131 views
Jython: where is itertools?
In Jython 2.5.3, trying to import itertools: >>> from itertools import product Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import ...
0 votes
0 answers
109 views
Import globally installed module
I am trying to execute my python script which imports globally installed modules through pip. (Module like nltk) Below is my code. interpreter.execfile("/home/roy/eclipse-workspace/geospatial-...
0 votes
1 answer
287 views
How to fix PyException error in Sikulix 1.1.1?
I am facing the below error in my sikuli script +++ running this Java java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) Client VM (build 23.21-b01, mixed ...
0 votes
0 answers
110 views
Jython : Issues executing XSLT
Ignoring identation, below Jython code when executed from command line produces, output with self-closing tags(No data), as shown in the picture below from java.io import * import javax.xml from java....
1 vote
0 answers
531 views
ImportError: No module named etree in Jython
I am trying to parse a text file and convert it to xml file. For that i got one code(python3) which got executed successfully on my windows machine. But, the same code when i wanted to execute on my ...
-2 votes
1 answer
268 views
Python (Jython) - can I access variable names in property setter and getter functions?
I have the following class. The behavior for self.value and self.name are identical. Only the variable names are different. How can I rewrite this so that I don't have to define two essentially ...
0 votes
1 answer
1k views
FDMEE. Exception when I try to load data by fdmAPI.executeQuery
I'm trying to retrieve data during AftLoad event: RSet = fdmAPI.executeQuery("SELECT * FROM HYP_CST.dbo.STAGING", []) while RSet.next(): do_something() And get the following exception: FATAL [...