Running script in Linux Xubuntu 11.10.? (python 2.7)

A forum for general discussion of the Python programming language.

Running script in Linux Xubuntu 11.10.? (python 2.7)

Postby lostman » Wed Nov 13, 2013 6:13 pm

hey guys, I'am new here and I am not so good whit English language. I decided leran about python, I have problem with python script. I readed and watced a few tutorials and 7 days I can't solve my problem.
how run python script on Linux Xubuntu 11.10.? (python 2.7) and I am total beginer in this. my scripts name is skripta.py and it's located on my destop.
Last edited by Mekire on Wed Nov 13, 2013 11:56 pm, edited 2 times in total.
Reason: First post lock. Added more descriptive title.
lostman
 
Posts: 3
Joined: Wed Nov 13, 2013 5:37 pm

Re: hello

Postby Yoriz » Wed Nov 13, 2013 6:40 pm

Hi, welcome to the forum.
Please read 'new users read this' link in my signature.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 831
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: hello

Postby metulburr » Wed Nov 13, 2013 8:11 pm

how run python script on Linux Xubuntu 11.10.? (python 2.7) and I am total beginer in this. my scripts name is skripta.py and it's located on my destop.

well python2.x is already in ubuntu. You just give python the file path as its first argument and python will run it.
Code: Select all
python ~/Desktop/skripta.py


if you change directory to the desktop you do not need the whole path:
Code: Select all
cd Desktop

Code: Select all
python skripta.py


if you have any more questions or still confused, you can read the tutoiral describing such tasks here
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1469
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: hello

Postby lostman » Thu Nov 14, 2013 11:47 am

metulburr wrote:
how run python script on Linux Xubuntu 11.10.? (python 2.7) and I am total beginer in this. my scripts name is skripta.py and it's located on my destop.

well python2.x is already in ubuntu. You just give python the file path as its first argument and python will run it.
Code: Select all
python ~/Desktop/skripta.py


if you change directory to the desktop you do not need the whole path:
Code: Select all
cd Desktop

Code: Select all
python skripta.py


if you have any more questions or still confused, you can read the tutoiral describing such tasks here


metulburr wrote:
how run python script on Linux Xubuntu 11.10.? (python 2.7) and I am total beginer in this. my scripts name is skripta.py and it's located on my destop.

well python2.x is already in ubuntu. You just give python the file path as its first argument and python will run it.
Code: Select all
python ~/Desktop/skripta.py


if you change directory to the desktop you do not need the whole path:
Code: Select all
cd Desktop

Code: Select all
python skripta.py


if you have any more questions or still confused, you can read the tutoiral describing such tasks here
few pictures: GONE . I tryed more things what I saw on youtube and forums, but I don't know what is problem.
Last edited by stranac on Thu Nov 14, 2013 3:20 pm, edited 1 time in total.
Reason: Removed the pictures. They were fucking huge.
lostman
 
Posts: 3
Joined: Wed Nov 13, 2013 5:37 pm

Re: Running script in Linux Xubuntu 11.10.? (python 2.7)

Postby metulburr » Thu Nov 14, 2013 1:12 pm

There are a lot of problems with what you are doing.

1) the >>> is the python interpreter, and when i said
Code: Select all
python path/to/file.py

i meant you put that into your terminal not python interpreter.

where you executed python to get into the interpreter,
^here you type
Code: Select all
ja@ubuntu:~$python path/to/file.py


2) your code is invalid. You just have strings and numbers, but you are not saving them to any variables, nor printing them for display.

Code: Select all
"hello world"
"how are you"
2+2

change to:
Code: Select all
a = "how are you"
b = "hello world"
c = 2+2
print(a)
print(b)
print(c)


3) you can just copy and paste the text instead of posting images. Plus even if for some reason we did need an image, we do not need you markers circling things to figure out the problem.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1469
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: Running script in Linux Xubuntu 11.10.? (python 2.7)

Postby Kebap » Thu Nov 14, 2013 2:24 pm

i like the circle markers :mrgreen: welcome to the forums & python!
Learn: How To Ask Questions The Smart Way
Join the #python-forum IRC channel on irc.freenode.net and chat with uns directly!
Kebap
 
Posts: 396
Joined: Thu Apr 04, 2013 1:17 pm
Location: Germany, Europe

Re: Running script in Linux Xubuntu 11.10.? (python 2.7)

Postby stranac » Thu Nov 14, 2013 3:25 pm

In the future, if you think posting pictures is necessary, please make them smaller...

I was just recently talking to a friend about how few people from this region there are doing python, glad to see the number rise(even if it's by 1).
Welcome to the forums.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1143
Joined: Thu Feb 07, 2013 3:42 pm

Re: Running script in Linux Xubuntu 11.10.? (python 2.7)

Postby lostman » Thu Nov 14, 2013 8:30 pm

thank you all, now it work, thanks metulburr. I wont help whit pictures, because I can't explain my problems on English so good. :D
stranac pozdrav.
lostman
 
Posts: 3
Joined: Wed Nov 13, 2013 5:37 pm


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests