Results 1 to 3 of 3

Thread: PyQT application start

  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question PyQT application start

    Hello,

    I am writing my first PyQt application, a chat client and i need to find a way to run it, other than typing python app.py in the terminal. I am using Linux and I don't know how to make a script to run it.

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: PyQT application start

    You can add:
    Qt Code:
    1. #!/usr/bin/env python
    To copy to clipboard, switch view to plain text mode 
    as the first line of your script and then run "chmod 755 app.py" to make it executable.

  3. #3
    Join Date
    Jun 2008
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: PyQT application start

    Thanks, it worked!

    -> #!usr/bin/env python in my app.py file
    -> changed permissions
    -> and used this script:
    #!/bin/bash
    dir_name=$0
    if [ -L $dir_name ]; then
    dir_name=`readlink $dir_name`
    fi
    dir_name=`dirname $dir_name`
    cd $dir_name
    ulimit -s 1024
    python intro.pyw
    -> created a shortcut (drag and droped my sh file) on desktop and now I can run it with just one click

Similar Threads

  1. Start Qt application as Windows Service
    By ^NyAw^ in forum Qt Programming
    Replies: 12
    Last Post: 10th May 2008, 17:23
  2. Replies: 10
    Last Post: 10th March 2008, 12:28
  3. start application: Why this error and how to solve it?
    By Colx007 in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2008, 15:22
  4. Replies: 2
    Last Post: 20th November 2007, 20:00
  5. QProcess start automaticaly needed application
    By raphaelf in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 14:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.