Thread: Installing

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11

    Installing


    Hey I have searched this on google so don't come with that.

    But I really don't understand what the hell the installing script is.
    Please could u post one for me!

    Thanks for any construktive responses.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Monkey, could you provide us with some more detail as to what exactly you want? I'm sure I'm not the only one who doesn't have much of a clue here .

    Anyway, if your talking about installing modules via a setup.py file then you should check out the "Installing Python Modules" section of Pythons docs. You may also be interested in "Distributing Python modules".

    http://www.python.org/doc/2.3.4/inst/inst.html
    http://www.python.org/doc/2.3.4/dist/dist.html

    Just a guess,

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Ya. I don't have a clue either. Do you mean like where you can open something and install your program onto a users computer? I'm still not sure what you were asking for, but maybe this link will help. Installing Python Modules
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    Well okay I want to install a program that I made meaning modules using windows installer for those people with windows, and the Distutils "I don't get it". Because the way I do it at the moment is really primitive. I copy and paste it on then just run it! So how would I make a connection to the registery and links to desktop and all that.Like a big game or something.
    Don't be that harsh netytan Hey happy news I am changing to Linux totaly I am getting pissed at M$.

    Edit:
    Okay well I have looked at this:
    http://www.python.org/doc/2.3.4/dist/simple-example.html
    But the problem is when I insert the name and py_modules different name at the top then there is an error. There is not file created!
    I tried with making a file called foo.py but it still does not work.

    This is how it looks:

    from distutils.core import setup
    setup(name="foo",
    version="1.0",
    py_modules=["foo"])

    And I made a file called foo.py in teh same directory but it said it does not have function or nothing is run.
  8. #5
  9. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    The last line makes it seem like foo.py is empty, is this the case? Give me a few to make a working example . You want to install a module with Distutils right, not a Python program?

    Mark.
    programming language development: www.netytan.com Hula

  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    Originally Posted by netytan
    The last line makes it seem like foo.py is empty, is this the case? Give me a few to make a working example . You want to install a module with Distutils right, not a Python program?

    Mark.
    It is one foo.py file and trhe inside is " print "Foo" "
  12. #7
  13. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Ok heres the sample. With a simple "foo" module, ready for distribution. It has one function called printHello(), use it wisely . Download the attached zip file and open the files setup.py and foo.py to see how these work.

    Inside the zip file you'll also find a ./dist directory and the tar.gz archive, created by running the "python setup.py sdist" command:

    Mark-Smiths-Computer:~/Desktop/Dist Mark$ python2.4 setup.py sdist
    running sdist
    warning: sdist: missing meta-data: if 'author' supplied, 'author_email' must be supplied too
    warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
    warning: sdist: standard file not found: should have one of README, README.txt
    writing manifest file 'MANIFEST'
    creating Foo-0.1
    making hard links in Foo-0.1...
    hard linking foo.py -> Foo-0.1
    hard linking setup.py -> Foo-0.1
    creating dist
    tar -cf dist/Foo-0.1.tar Foo-0.1
    gzip -f9 dist/Foo-0.1.tar
    removing 'Foo-0.1' (and everything under it)
    Not surprisingly, creating a Windows installer is just as easy! All you need to do is replace sdist with bdist_wininst, so the full command becomes "python setup.py bdist_wininst". This is described in full at:

    http://www.python.org/doc/2.4/dist/postinstallation-script.html

    Hope this helps,

    Mark.
    Attached Files
    programming language development: www.netytan.com Hula

  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    Okay thanks
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    40
    Rep Power
    10
    how about if i want to install a program which written in Python (note:1) and use MySQL serve as the DBMS ?
    Note:1 -- A Python program that get staff details (name, ic, age, etc) from user input (keyboard) & save those info into the database (MySQL)
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Colorado, USA
    Posts
    68
    Rep Power
    11

    Installer??


    I am thinking monkey is wanting to create an installer that installs his 'program' to any pc using an installer.

    For ease of use , I have been using py2exe to create an exe, and then using NSIS(Nullsoft Scriptable Install System-winamp guys-free) to create a pretty windows installer.

    NSIS lets you do registry stuff,create uninstall,create icons, etc., and uses a pretty simple scripting language to do it.

    Monkey--Check out the sticky's at the top of the forum for py2exe info, and check http://nsis.sourceforge.net/ for the NSIS installer.

IMN logo majestic logo threadwatch logo seochat tools logo