Java and Python

Greetings
I would like to know about how to use python as script language for make java games. I mean to control some behavior for example as trigger in a scene. Someone knows about any tutorial.
Thanks in advance

For Python and C++
http://www.gamasutra.com/features/20020821/dawson_pfv.htm
The book "Developing Games in Java" from New Riders publishing.
Chapter 14: Game Scripting

Similar Messages

  • Compability problem with Java and Python  RSA algorithm implementation

    I have client server application. Server is writtein in python, client in java. Client receives messages from server encrypted with RSA (http://stuvel.eu/rsa), and I'm unable to decrypt it. It seems that this is RSA algorithm compatibility problem. I'm using algorithm from java.security package, instatinating Cipher object like this: c = Cipher.getInstance("RSA"); . I noticed that this algorithm produces for input blocks of lengtrh <=117 ouput block of length 128. Server I guess uses the most triviall impelentation of RSA ( (1 byte is encrypted to 1 byte) So i want to make my java algorithm compatibile with this one which server uses. How to do that ? Do i have to instatinate Cipher object in different way ? Or use another library ?

    azedor wrote:
    First you said it was no good because it could only handle <= 117 byte inputs, now you say it is no good because it produces a 128-byte output. You're not making sense.First i said that this two RSA implementations are not compatibile, and first reason i noticed firstly is that Python imlementation for input of length N produces cryptogram of the same length. Not true. In general, the RSA encryption of any number of bytes less than the length of the modulus will produce a result of length near that of the modulus. When N is less than the length of the modulus, it is rare that N bytes of cleartext produces N bytes of ciphertext.
    Java implementation for data block of length <=117 produces alwasy 128 bytes of output.Pretty much correct and very much desirable. This is primarily a function of the PKCS1 padding which is used to solve two basic problems. First, as I alluded to in my first response, it is the nature of the algorithm that leading zeros are not preserved and second when the cleartext is very small (a few bytes) the exponentiation does not roll over and it is easy to decrypt the result. Both these problems are addressed by PKCS1 padding.
    >
    >
    After what sabre150 said i think of giving up idea of translating Python code to Java and considering to use another assymetric cryptography algorithms on both sides. Can you recommend me sth what should be compatibile with Python ?This seems to be at odds with your statement in reply #3 "Also have acces only to client code so i have to change sth in java." ! This statement is why I said "I suspect ... you have dug a deep hole".
    In your position I would use the Python bindings for openssl. Once more, Google is your friend.

  • Socket communication between Java and Python aplications.

    I'm try to connect a pyhton client to a Java server through Socket. The problem is that the python client never receive anything. I'm using a ObjectOutputStream to send the msgs. Does anyone have any idea how make this works?!

    RicardoS wrote:
    So how do you do it?! What do you use?!Bytes! Normally I generate the bytes from XML.
    Edited by: sabre150 on Mar 24, 2008 5:10 PM

  • Oracle Java and Adobe

    I'm a newbie here, so please take this with a grain of salt. I have watched with great interest as Sun acquired MySQL and then as Oracle acquired Sun. While doing so, I have been researching various rich internet application frameworks for work and a side business. I have been very impressed with Adobe's RIA offerings and with Microsoft's latest rollout of Silverlight. Although I haven't been as impressed with the JavaFX framework, clearly there are some advantages to building RIA's with Java. I am at a cross-roads in terms of a decision as to where to invest most of my learning efforts. Should I dive into Adobe Flex (Flash), Microsoft Expression (which I can obtain free, as a student), or JavaFX? OK, so here is where I possibly expose the extent of my naiveté. I find myself having a kind of pipedream -- namely, that Oracle would make one additional major acquisition -- Adobe Systems Incorporated. In my pipedream, I imagine that the Adobe division of Oracle makes a business decision to transition ActionScript to Java (of course, with no issues concerning software licensing), to incorporate any useful concepts from JavaFX into the next release of their RIA-related software, and to become the UI framework for Oracle applications. Of course, in my pipedream, Oracle-Adobe also make some seemingly bad business decisions, such as making the standard version of Adobe Acrobat free (to save trees in the world); however, even in spite of such humanitarian sacrifices of the bottom-line, in my hypothetical world at least, I feel quite confident (even excited) about my intellectual investment in the new company. Is this pipedream really as ridiculous as it seems? Any advice in the context of reality?

    Billy  Verreynne  wrote:
    BluShadow wrote:
    One of our developers here is using Ajax with APEX. Not quite sure how he's done it as he's the APEX expert here, not me. I know he looked into it when there was a need for nested drop down lists within the application he was developing.Simple AJAX calls are not difficult to support - the problem using a proper AJAX framework where the callbacks (AJAX calls to your PL/SQL code) does not support the quirky APEX URL format. Also, many calls will have variable number of parameters. This means having to use the flexible 2 parameter call architecture - and as soon as you do this, the call can no longer be handled by the runtime system of APEX that receives and processes URLs.
    In order to have your AJAX callbacks run inside the APEX run-time system, you need to define "+on demand+" APEX process wrappers for them.. and this is one the major problems I have with trying to integrate proper AJAX frameworks with APEX. Either the framework needs to be modded or APEX... And these frameworks work as is with Java, PHP, Python, etc. - which begs the question why muck with the framework when it works for most languages? The shortcoming IMO is definitely with APEX.That seems fairy nuff. ;)

  • Java or Python?

    Hey, I'm not necessarily new to programming, I've tried but failed. But then again I tried jumping right into C++. Now programming has sparked my interest again, I want to teach myself so I can have at least a minimal background before I go into college. From what I've read so far, Python and Java and  great candidates to start off with. But what I'm wondering, where is each applied? Where would I have use for Python or Java? Also, for whichever I choose, where can I get good reliable online courses, and an IDE to wrap it all up in? My intentions of where I will apply my oncoming programming skills is more systematic programming. OOP I will indeed grasp over time, but I have more of a interest of the internal construction of programs.
    Thanks!

    If it's between Python and Java, definitely go with Python. I'd say start with Perl, but whatever you do, don't start with Java. And Python really doesn't need an IDE; just go with vim or nano, or gedit/geany/scite if you need something graphical.
    As for learning material, you could start with man python and work up from there. I'd also recommend Learning Python from O'Reilly, but that's just because I've had good experience with O'Reilly "Learning X" books. There are also free online PDF guides; Dive Into Python (http://diveintopython.org/) is a popular one.
    Last edited by wirenik (2008-10-24 06:09:26)

  • Where to download wlst.jar and python.jar for weblogic 10

    where to download wlst.jar and python.jar for weblogic 10 ? I am unable to find the links ..most of the prevoius ones point to dev2dev which are no longer valid

    Hi,
    I have written the below python script to list the user ,that was created in realms->myrealms->users.
    It's not working it.
    Kindly help to in this python script.
    from weblogic.management.security.authentication import UserReaderMBean
    from weblogic.management.security.authentication import GroupReaderMBean
    file_loc='MbeanValues.properties'
    file=java.io.File(file_loc)
    if file.exists():
         loadProperties(file_loc)
    connect(dwlusr,dwlspwd,dwlsurl)
    domain_name = cmo.getName()
    print 'UserName='+dwlusr
    print 'URL='+dwlsurl
    print 'DomainName='+ domain_name
    print 'welcome'
    print 'Checking if isMember of a group'realm=cmo.getSecurityConfiguration().getDefaultRealm()
    atns = realm.getAuthenticationProviders()
    for i in atns:
    if isinstance(i,UserReaderMBean):
    userReader = i cursor = i.listUsers("*",0)
    print 'Users in realm '+realm.getName()+' are: '
    while userReader.haveCurrent(cursor):
    print userReader.getCurrentName(cursor)
    userReader.advance(cursor)
    userReader.close(cursor)for i in atns:
    if isinstance(i,GroupReaderMBean):
    groupReader = i
    cursor = i.listGroups("*",0)
    print 'Groups in realm are: '
    while groupReader.haveCurrent(cursor):
    print groupReader.getCurrentName(cursor)
    groupReader.advance(cursor)
    groupReader.close(cursor)
    disconnect()

  • Events HUB and Python

    Hello,
    Does Events HUB works with Python?
    I saw in documentation only example for .NET, Java and C. 

    Hi,
    The Microsoft Azure Python SDK provides a set of Python packages for easy access to Azure storage services, service bus queues, topics and the service management APIs. Unfortunately there is no support for Event Hubs at this stage yet. Luckily Microsoft
    is embracing the open source community these days and is hosting the Python SDK on GitHub for public contribution, so hopefully this will be added soon.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • ABAP , JAVA And XSLT Mapping Doc's

    Hi,
    I am new to SAP XI Any body please send me the Doc's Related to ABAP, JAVA And XSLT Mappings. Thanks in Advance.
    Regards
    Kiran.B

    Hi
    Refer to
    ABAP mapping:
    How to Use ABAP Mapping in XI 3.0
    JAVA mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm (Java mapping)
    XSLT mapping:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20
    Regards,
    Kumar.
    Reward points if helpful!!

  • USB-6009, mac OS 10.6.8 and python

    Hello!
    I am using USB-6009 under mac OS 10.6.8 and python.
    I am trying to run the following commmand:
    analogOutputTask = nidaqmx.AnalogOutputTask(name='MyAOTask')
    I get the following message
    File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/nidaqmx/libnidaqmx.py", line 180, in CALL
    AttributeError: 'NoneType' object has no attribute 'DAQmxCreateTask'
    Any help would be very mch appreciated,
    Thanks 
    j.

    Hello Jamyamdy, 
    Honestly, I am not too sure about this, but were you able to acquire data before or is this your first trial? 
    From the usb-6009 product page, it says the following. 
    For Mac OS X and Linux users, download the NI-DAQmx Base driver software and program the USB-6009 with NI LabVIEW or C.
     http://sine.ni.com/nips/cds/view/p/lang/en/nid/201987
    Regards,

  • BI Java and BI ABAP -RSPLAN issue

    Hi All
    We are working with BI system ,using BI 7.0 Java and BI ABAP as separate systems on same host.
    Already run the template intaller for BI Java and ABAP integration.
    But facing some issue ,when going ot BI ABAP and RSPLAN and clicking the Start Mideller
    it is opening a browser as http://host:8000/sap/public/myssocntl?sap-client-XXX
    Since this is not correct and it should open BI Java portal instead of ABAP stack page.
    Instead this should open a Url like this http://host:5XX00/webdynpro/dispatcher/sap.com/biplanworkbench1/Modeler?
    I check on BI ABAP system under SAP Reference IMG -> SAP Customizing Implementation Guide-> SAP NetWeaver _> Business Intelligence-> BI Integrated Planning -> Settings for Starting the Planning Modeler.
    There the default Url is BEx Portal Server and the url is        
    http://host:5XX00/webdynpro/dispatcher/sap.com/biplanworkbench1/Modeler
    Can anybody let me know why this is going to ABAP server instead it should go to Java.
    Regards
    Ajay
    Edited by: Ajay Sandal on Mar 10, 2009 2:31 PM

    Hi Ajay ..
    Good news that ur issue is resolved ..
    I have somewhat similar issue .. Hopu u can put some light ..
    I have Bi 7.o with Add on java  ,
    In RSPLAN from ABAP system , modular page is not coming . if i click on start moduler button in RSPLAN ..portal page is coming up and i have to give logging details .
    Please suggest .
    Thanks

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Problem with java and javaw

    Hi,
    In running the following simple code, I have gotten different results using java and javaw.
    public class Test {
    public Test() {
    public static void main(String[] args) {
    int x =4;
    System.out.println("The value is "+ ((x > 5)?6.0:4));
    System.out.println("The value is "+ ((false)?6.0:4));
    System.out.println("The value is "+ ((true)?99:9.9));
    Using java, I get the following results:
    The value is 4.0
    The value is 4.0
    The value is 99.0
    But using javaw, I get the following results:
    The value is 4.0
    The value is 4
    The value is 99
    Any ideas why this is so?
    Thanks for any help.
    Gilbert

    I used JBuilder to run the following code and Jbuilder uses javaw.
    By the way, the correct answer is the one using java right?

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • Problem with java and pogo games

    i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?

    Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
    *https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
    See also:
    *http://kb.mozillazine.org/Java#Windows_installation_issues
    You can find the latest Java version on the Oracle website.
    See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

Maybe you are looking for

  • Once attribute price selected, updating the price on the large product layout?

    For my e-commerce site I need to setup, when a customer picks an attribute (such as 'Custom Artwork +£5.00') The price on the large product layout updates automatically before proceeding to the Shopping Cart for the price to update. Is this achievabl

  • Table for Profit center report grp

    Dear Sapgurs, in this t code GR55 system it showing list of Profit center report grps, can u please tell me what is the table for Table for Profit center report grp and how to create new profit center report group, Once we will click on F1 system it

  • Installed Security Update 2013-003 & now cannot see video

    Installed Security Update 2013-003 & now cannot see video. Snow Leopard. Corrected problem by updating Adobe Flash~ even though I just updated it two days ago~ but that solved the problem. Message was edited by: Black Cat Prowl

  • Select document window title bar, cursor jumps to other screen

    This has been going on for a few days now. I've restarted the Mac, etc Mac dual G4 1.25 GHz with OSX 10.4.11 This started suddenly. I have had a dual monitor system for months now, and have never had this problem before last week. If I have documents

  • Digital Audio Extraction (DAE) Qual

    How much variation is there in the "quality" of ripped raw WAV data from a CD? Forget about any encoding (MP3, WMA etc..). I'm talking about ripping the exact PCM data from a typical music CD-DA disk.Say I take the same music CD, and use several diff