954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

launching an application

someone knows how to launch an app in mac??

import os

class LaunchApp:
   
   def launch(self):
      os.startfile("/Applications/QuickTime Player.app")

s = LaunchApp()
s.launch()

this code works on windows and

os.system('gnome-open ' + /path)


on linux

but in mac, it returns this error "AttributeError: 'module' object has no attribute 'startfile'"

bettersaid
Light Poster
34 posts since Jul 2010
Reputation Points: 10
Solved Threads: 2
 

no one replied, thanks :) got it

os.system("open " + appName)
bettersaid
Light Poster
34 posts since Jul 2010
Reputation Points: 10
Solved Threads: 2
 

1.
#include
2.

3.
void main()
4.
{
5.
//Define the arrays for angle and sine
6.
int a[25];
7.
double s[25];
8.

9.
//Grab the filename
10.
char* name = new char[];
11.
printf("Load Sine Values\nFile Name: ");
12.
gets(name);
13.

14.
//Create the file pointer and open it
15.
FILE* in = fopen(name,"rt");
16.

17.
//Read from the file
18.
int n = 0;
19.
while(fscanf(in, "%i%lf", &a[n], &s[n]) == 2) n++;
20.

21.
//Display Proof
22.
printf("\nLoaded %i entries from %s\n", n, name);
23.
printf("---------------------------------------\n");
24.
for(int k=0; k

nathan099
Newbie Poster
1 post since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: