Thread: Newby questions

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    2
    Rep Power
    0

    Newby questions


    I am re-writing a large program I made in Visual Basic to Python . . . and have a few questions.

    First, can you create an exe from your python code, and, likewise compile it to run on Linux and Mac. What I am really asking, is, do I need to have the user install python and all the related packages or can I make it easier for them to download and install my program, by compiling it in the form that best fits the OS?

    Second . . . the program I will be writing in Python is going to be multi-lingual . . . it can write documents in the text with, for example, Russian, English, and Greek, all in one single text document, and print them out. Does python have good support for multiple-language programming, and are there any particular packages that would be helpful for that? Thanks in advance!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Usually Japan when not on contract
    Posts
    240
    Rep Power
    12
    You can compile Python, but its usually not worth it in my experience. The target audience has a lot to do with how this goes, though.

    If you want to make it dead easy for anyone to download and install your program I find it best to either write a package for the target system that includes a python runtime with it (that installs to a location that won't conflict with a system-wide installation), or write in a deliberately compiled language with widely used cross platform libraries (C/Gtk or C++/Qt) and distribute a binary.

    But its nearly always easier to just write in Python and then package it for each platform with a runtime bundled for it than to deal with the details of C/C++.

    Oh yeah... translation. You're looking for GNU gettext. Its really easy to use in C or Python. Just do a search for the Python docs on gettext.
  4. #3
  5. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,931
    Rep Power
    481
    Python has extensive unicode support.
    Python is an integral part of linux.
    [code]Code tags[/code] are essential for python code and Makefiles!
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    153
    Rep Power
    5
    If you want to create executables, take a look at the cx_freeze package. This is generally not necessary on Linux or OSX because both (usually, in the case of Linux) ship with a python interpreter.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0
    ข้อมูลเยี่ยมมากเลยค่ะได้ความรู้เพิ่มเลยค่ะ
  10. #6
  11. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,931
    Rep Power
    481
    Originally Posted by google translation
    We too have great knowledge to me.
    This is an English forum. Perhaps that matters less these days as the Babel tower falls.
    [code]Code tags[/code] are essential for python code and Makefiles!
  12. #7
  13. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Posts
    616
    Rep Power
    65
    If you use IronPython, you can compile to a Windows .exe program.
    (Should work on Linux Mono too)
    Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25

IMN logo majestic logo threadwatch logo seochat tools logo