Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User mdop's Avatar
    Join Date
    Aug 2007
    Location
    Czech Republic
    Posts
    7
    Could you please explain me what does the "Package As: Bytecode / Source code" feature in PyS60 application packer do?

    From http://developer.symbian.org/wiki/in...hon_on_Symbian)
    Package As (Byte or Source code)

    Whether or not your scripts are converted to byte code before packaging. Byte code will run somewhat faster and additionally provide some anti-piracy protection for your script.

    Default value: Scripts are converted to byte code.
    I tought it converts py to pyc but after running dumpsis, the code is still not converted (default.py).

  2. #2
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,636
    dumpsis does not convert the code to bytecode. For byte code conversion lookup for py_compile or compileall (for Python for PC).

    We have it explained here.
    http://developer.symbian.org/wiki/in...ne_Application
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User mdop's Avatar
    Join Date
    Aug 2007
    Location
    Czech Republic
    Posts
    7
    I know what dumpsis is for - unpacking installation sis files.
    I know how to compile python code to byte code.

    But I don't understand what is the setting Bytecode/source code in application packer for if it doesn't work / doesn't compile py files for you...

  4. #4
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,636
    Quote Originally Posted by mdop View Post
    I know what dumpsis is for - unpacking installation sis files.
    I know how to compile python code to byte code.

    But I don't understand what is the setting Bytecode/source code in application packer for if it doesn't work / doesn't compile py files for you...
    Oh, it should have worked. But I tested and it doesn't work.

    But hopefully they have fixed this in PyS60 2.0 Application packager.

    You may still want to add it as a confirmed bug!
    Pankaj Nathani
    www.croozeus.com

  5. #5
    Registered User uhm57's Avatar
    Join Date
    Dec 2008
    Posts
    35
    It compiles to bytecode every .py file you have in your project BUT default.py. So if you want to hide your code, you can write it in a separate .py file, and just use default.py as a wrapper.

  6. #6
    Nokia Developer Champion marcelobarrosalmeida's Avatar
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    752
    Quote Originally Posted by croozeus View Post
    Oh, it should have worked. But I tested and it doesn't work.

    But hopefully they have fixed this in PyS60 2.0 Application packager.

    You may still want to add it as a confirmed bug!
    When I tried to use this feature I did not worked for me. So I compiled each file by myself. That time I was not worried about hiding the code but I was looking for more performance. As the performance improvement was not a big deal, I gave up and decided to use original .py files.

    However, in my opinion, python bytecodes are not safe enough. For instance, search for decompyle. I tested it some months ago when it had a free decompiler for small codes. The result is astonish.

Similar Threads

  1. GeoSpatial Application in PyS60 ?
    By SoulBlade in forum Python
    Replies: 4
    Last Post: 2009-10-30, 11:53
  2. GeoSpatial Application in PyS60 ?
    By SoulBlade in forum Python
    Replies: 2
    Last Post: 2009-10-20, 17:17
  3. Do Symbian rejects the Express Signing request on any Business Development ground?
    By arpit2agrawal in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 23
    Last Post: 2009-02-19, 10:46
  4. Replies: 8
    Last Post: 2009-01-20, 13:47
  5. filtering application as a recipient?
    By aidj in forum General Messaging
    Replies: 1
    Last Post: 2002-11-12, 06:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved