Ubuntu :: How To Run A Python Program From The Command Line

Jun 14, 2011

i have ubuntu 10.04 and python 2.6 installed how do i run, stop or restart a .py file from the command line.

btw im using Putty from a windows computer

View 1 Replies


ADVERTISEMENT

Programming :: Python - Call Function From The Command Line After Compile The Program?

Dec 28, 2010

If i have a python file with a function call_me(a,b),how can I call this function from the command line ,after i compile the program?

View 5 Replies View Related

Fedora :: Run Python3 Scripts From Command Line And Call Up Python 2.6.2 Idle With The Command Idle From Command Line?

May 29, 2010

i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?

View 5 Replies View Related

Ubuntu :: Kill A Python Application From The Command Line?

Sep 27, 2010

How do I kill a python application from the command line? For an example I have 2 applications running. The first is bleachbit and the second is furiusisomount. They are both python applications so they both come up as python under process name. I could kill them by ID number but if there was another way to do it so that it could be automated in a bash script.

View 9 Replies View Related

Ubuntu Installation :: Python -> Upgrade 9.10 To 10.x From Command Line?

Oct 7, 2010

I had problems with python stuff and so update manager did not work. Also many other problems, PiTiVi was installed but did not start eg... After many trials of this and that I removed python-gtk2 and so also ubuntu desktop. But was unable to get it back. Now I cannot even shut down. While it is not possible to install desktop or anything else, would it be possible to fix this by upgrading the whole system to 10.04 (10.10?)? Would it fix python installation. How could I do it. Some info tells to change sources.list and run apt-get upgrade, but some tell not to do so.

t@t:~$ update-manager
Traceback (most recent call last):
File "/usr/bin/update-manager", line 26, in <module>

[code]....

View 9 Replies View Related

Ubuntu :: Box To Run A Command Line Program?

Sep 19, 2010

I have just installed pdfocr. Unfortunately it does not have a gui and so in time I will forget how to use it or not remember I have it.

Is there a simple generic program that will browse to where the file is and then run the command line? I suspect python will do it. Could someone point me to a suitable tutorial for this purpose.code...

View 2 Replies View Related

Ubuntu :: What Command Line Program Should Be Used

Jul 6, 2011

I am going to do a web based search for several thousand webpages which may or may not exist. I just want a list of the addresses which work. I dont want to load into firefox, and I'd preffer not to ping the url. I just want to test the URLs for validity and kick back a list of good URLs.
Any Ideas on a simple program to do this, which I can use in a bash script?

View 2 Replies View Related

General :: See All Installed Program In Ubuntu From Command Line?

Jun 16, 2010

How can I see all my installed program in Ubuntu from command line?

View 2 Replies View Related

Ubuntu :: Difference: Run Program From Rc2.d Or From Root Command Line?

Mar 26, 2010

Example: In rc2.d I have S99test. In it: Code: #!/bin/sh mplayer -playlist "/music/Thom Yorke - The Eraser" Reboot; hear the loveliness; press pause (lirc setup)...still loveliness.

Login as root; "pkill mplay";hear nothing; "/etc/rc2.d/S99test"; more loveliness; press pause...silence! I know that i the former case, mplayer is assigned (for lack of a proper term) to a session, e.g. tty1. Not so in the latter. But why should a program like mplayer not receive (or ignore?) input from lircd, simply because it doesn't have a session? And how can I get mplayer (or any program run from boot scripts) to work with other programs (like lircd)?

View 1 Replies View Related

Debian :: Install A Program Using The Command Line?

Jan 29, 2011

I tried to install Vlc using the terminal (terminal as root). I've used the command aptitude install vlc. Instead of installing only vlc, my gnome desktop environment was removed, gdm was removed, many more programs was removed! What's the command for installing just a single program using the command line? I was used under Ubuntu to use the command sudo apt-get install [***]

View 14 Replies View Related

Fedora :: Using Built In Command Line FTP Program?

May 13, 2010

Any relatively easy user guide for the built in command line ftp program?

View 10 Replies View Related

SUSE :: Unable To Get A Program To Run From The Command Line?

Nov 9, 2010

I have reinstalled Suse 10.1 as dual-boot with Windows XP. I am now unable to get a program to run from the Linux command line. I am familiar with the program and have had it running previously when the machine was Linux-only. Everything else, e.g.Firefox and Office, work fine in Suse.

[Code]...

The problem occurs with all commands - not just this one. isis3Startup.sh is in green on the screen so I assume I should be able to run it - I have never had any problem when it was installed previously.

View 2 Replies View Related

Software :: Command Line Program For IP Calculation?

Apr 8, 2011

ipcalc isn't the one I am thinking of. I remember another one that was a bit better, with more options -- easier to use.I remember that if you gave it a CIDR network /23 and an IP, it would list all of the address ranges, network, broadcast for that network..

View 2 Replies View Related

Programming :: Program That Activates A Command-line?

Feb 7, 2010

I am wanting to write a program that runs a program or command-line. Is there are way of making a program that activates a command-line (for example executing 'ps -a -f' or '/home/shared/fah').

In addition to that, I want the program to do a 'ps -a -f' and put the results in a buff, how could I do this.

View 5 Replies View Related

General :: Ubuntu - Command-line Program That Switches Consoles?

Jun 18, 2011

For whatever reason, the "Ctrl-Alt-Fn" sequence has no effect on one of my Ubuntu machines; the sequence is interpreted as ordinary input. I need to get the system to a console because I'm trying to do a dist-upgrade and that's going to bounce gdm etc.

Is there some command-line tool that can be used to switch consoles? I have some vague distant memory of that being possible.

(I'm running Ubunty Jaunty at the moment. Yes I know it's old; I'm trying to march forward.)

View 2 Replies View Related

Ubuntu :: How To Create A Shortcut To Open Command Line Program

Feb 21, 2010

I use a few command line programs quite often such as nano and mpc. I'd like to create a shortcut icon to open them rather than opening a terminal and then typing in the program name to open it. For example, how could i open konsole with nano opened in one step?

View 5 Replies View Related

Debian :: Any Program To Send Mail From Command Line?

Sep 9, 2010

Is there an easy to use program that I can use to send mail from the command line? I want to be able to create a batch script to send mail from different text files. What I'm looking for is something like:
mailapp mailserveraddress destinationmailaddress mymailaddress filetosend

View 11 Replies View Related

Programming :: Using Command-line Options With A Program That's Called Using Env

Oct 11, 2010

I thought about this a while ago when reading through a Python tutorial and I googled some and couldn't find an answer. Now I want to know it for Ruby, also, and it's more important now because I want to invoke Ruby with -w.

How can you use:

Code:

with a -w option to ruby, like:

Code:

This doesn't work and I can't find an explanation of how to do it.

Code:

View 1 Replies View Related

Software :: Program To Hibernate The Computer For A Set Time (from Command Line)?

May 9, 2011

Is there a program I can install and run from the Command Line that will hibernate the computer (pausing all running programs (like my Minecraft server)), cutting power usage TO A BARE MINIMUM, and the un-hibernate after a set time? The laptop this will be used on is SliTaz linux with the GUI disabled (unless i run startx)

View 3 Replies View Related

Debian Multimedia :: Finding A RSS Program That Can Run On The Desktop Command Line Style

Jun 8, 2010

I am looking for a good RSS program that can run on the desktop command line style.

View 3 Replies View Related

General :: High Level Command Line Program For Burning CDs And DVDs?

Mar 12, 2010

I'm sick of screwing around trying to script a clean solution to burn multiple files and folders to CDs and DVDs with wodim, growisofs and genisoimage.I'm looking for a high level command line program that uses sensible defaults and takes arguments something like this:[program-name] [cd|dvd] /path/to/dir1/ /path/to/dir2/ /path/to/file ...It should then do all the low level copying and ISO generation transparently and just burn the damn disk!Does anyone have any suggestions? I've looked at several programs but it seems there are too many choices to trawl through and not enough information about them online.

View 4 Replies View Related

General :: How To Program The Command Line To Run A Piece Of Code Multiple Time

Dec 4, 2010

So, I usually write/find a test case generator for any code that I write. This type of code generally leads to some file output. To be thorough, I try and generate many different files to test my code on.

Say the command is like this:

Is there a way to automate this for many different values of the parameters and generate many different files?

I tried:

I wasn't able to use the $i in the filename, and without it the command gave me no errors, but did nothing else either. I know the Unix command line is very powerful, and I have a feeling that this should be possible, but I just don't know how to do it.

View 3 Replies View Related

General :: CentOS Command-line Program To Randomly Change MAC Address?

Nov 7, 2009

OS: CentOS 5.3 Enterprise Server
Red Hat Nash Version 5.1.19.6

I need to find a command-line program to randomly change my MAC address. I know on Ubuntu there is a program called 'macchanger'. And on Windows another one called 'macshift'. I just can't find one for CentOS 5.3 Enterprise Edition.

View 3 Replies View Related

Ubuntu Networking :: Program Transmits Whole Graphical Interface Slowly - Command Line With Computers

Jan 18, 2011

I need to use some PCs located on my university from home through the internet. I am using a program called Teamviewer [URL]... The problem is that this program transmits the whole graphical interface, which is slow, but I just need to use the command line with these computers. I am aware of ssh, but my university won't give me access to theses computers over the internet.

View 9 Replies View Related

Ubuntu Servers :: Use The Mail Command Line Program To Occasionally Send Log Output To Email Aliases?

Jan 27, 2011

Can anyone tell me what the pros and cons are between heirloom-mailx vs mailutils? This is for ubuntu 10.04 LTS. AT this point my only purpose is to use the mail command line program to occasionally send log output to email aliases.

View 2 Replies View Related

Programming :: Make Python Programs Run Without Entering The Command Python?

Mar 22, 2009

I want to be able to do

sudo ./program.py

instead of always having to do

sudo python program.py

What do I need to change?

View 5 Replies View Related

Programming :: Using Python To Merge Two Text Files Line For Line

Jul 6, 2010

I'm a bit new to Python programming and hoped that someone might be able to help with a problem I'm having. What I essentially want to do is to combine two text files line for line. I know how to do this in a bash script so to give you a better idea here's the code for that:

Code:

This is basically for adding on values to the end of a CSV file that uses ';' as the delimiter. So say file1 said:

And file2 said:

Then running this command would create merged_file1_and_file2 which would be:

The code I'm using at the moment is:

Code:

As I'm sure any experienced python programmer will see, this prints out the first line of the file "csvraw" and then all of the lines of "stamps" and then the remainder of "csvraw".

What I'd like to do is something like: (pseudo code, I know it's not python ;-))

Code:

Is this possible? I've tried googling and my Python Pocket Reference hasn't been much help. I've looked at pickling but that doesn't seem appropriate.

View 1 Replies View Related

General :: Command Line - Unix - Program That Can Handle All Popular Compression/archiving Formats - E.g.tar, Gzip, Bzip2, Zip?

Jun 22, 2011

I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar).

Is there a program out there that can just Do What I Mean for common cases? For example:

View 2 Replies View Related

General :: ImageMagick's "import" Command Line Program Failing To Take A Screenshot From CRON Script

Feb 16, 2011

I wrote a simple command line script which is suppose to take my screenshot every 5 minutes.(using ImageMagick's "import" program)

Here is the script (shottr.sh):

This is working fine if I execute by hand i.e:

The script itself is being executed (I hear a voice saying: "Screenshot") but the actual screenshot is not taken.

Be assured that it is NOT permission issue (I placed a simple "touch" invocation and file was created)

May be if it's run from cron...it doesn't have a "window" so it can't take a screenshot from nowhere? If that is the case, then how can I workaround it?

View 1 Replies View Related

Ubuntu :: Escape Sequence For New Line In Python?

Apr 14, 2010

I am reading "A Byte of Python" and this is the 2nd time I've completely been confused about something:"What if you wanted to specify a two-line string? One way is to use a triple-quoted string asshown previously or you can use an escape sequence for the newline character - toindicate the start of a new line. An example is This is the first lineThis is thesecond line. Another useful escape sequence to know is the tab - There are many moreescape sequences but I have mentioned only the most useful ones here."In python:>>> "This is the first lineThis is the second"'This is the first lineThis is the second'>>>

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved