Programming :: .py File To Run In Terminal As A Console Program
Sep 3, 2010
i create a file with .py extension and run it then on windows it opens up directly in command prompt, but wat to do if i wish to do the same in ubuntu, i.e. i want the .py file to run in terminal as a console program, which does not happen as such.
View 14 Replies
ADVERTISEMENT
Sep 8, 2010
How can I start a program from tty1 console text mode to be executed in tty2 console text mode? Actualy I would like to start a program (chat client cli program) in tty8 automaticaly when linux PC boots.
View 6 Replies
View Related
Jan 15, 2010
Ok so Basically i have 2 questions
1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux
Code:
2. i need to know how to run/execute/open a file in a c++ program im using and its not working
Code:
View 4 Replies
View Related
Mar 22, 2010
I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):
#!/bin/sh
clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"
View 5 Replies
View Related
Mar 23, 2010
Atleast I think it's a terminal program. I remember several years ago while using Redhat 7 when working in the terminal it would automatically complete the pathnames and filenames for you. If I was typing in the terminal "cd downloads" but I only typed "cd do" it would automatically complete my command with "cd documents" but if I continued to type "cd dow" it would know that I don't mean the documents folder and it would know the only other folder path with a dow in it is downloads. I'm not sure if my description is 100% accurate but I think you get the idea. Ubuntu doesn't seem to have this by default and I'm curious if I can get it. Is it a terminal program/client I need to use, or just an option? I don't know what it's called so I've had a hard time googling for it!
View 9 Replies
View Related
Apr 20, 2010
I have a script where I want to redirect stdout to the terminal and also to a log file aswell as redirecting stderr to the same log file but not the terminal.I have the following code which I found on the net which redirects both stderr and stdout to a file and the logfile,
Code: if [ -p $PIPE1 ]
then
rm $PIPE1
[code]...
View 3 Replies
View Related
Nov 11, 2010
i want to make a program to write the result of access to a file ,i mean for example a user wants to (open,delete,edit)a file but if he has no access to this file ,something write to a log file.so after that i can check which user got access denied by accessing to which file.or if any tools available that can do this?or if there is any built in log access file that record the permission denied to files?
View 4 Replies
View Related
Mar 14, 2009
i wanted to know how can I pars a xml file (read data from xml file) and from C program.is there any function to do this for me in C.
View 1 Replies
View Related
Mar 7, 2010
An error occured during running a code. I've made run configurations properly and I've chosen GNU Elf parser,Elf parser, Mach-O parser and Cygwin PE parser as a binary parser. Eclipse CDT can not find any error in the code and code runs in terminal properly. Here are the code:
Code:
/*
* pmutex.c
*
* Created on: Mar 7, 2010
*/
#include <stdio.h>
[Code]...
Eclipse denies to run it.I've made an investigation over the eclipse.org, but I can not find any solution.
View 2 Replies
View Related
Jun 26, 2011
I have the following problem. I call a C++ program from a Java servlet by using Runtime exec. The OS is ubuntu and I use Netbeans 7.0 with Glassfish 3.1 web server.The program executes but it does not open and write into a specified file in a specified folder. The same C++ program compiled under Windows opens and writes this file.How can I solve this problem in Linux?
View 2 Replies
View Related
Jul 19, 2011
how to detect if a file is being opened by any application so that i can block it just before opening it... Actually i am working on android and using iNotify in JNI to detect the OPENING of a file...but the file is getting opened before the iNotify detects it..and therefore its displaying the contents of the file unmodified .. The actual requirement is that if anyone is trying to open the file it should be modified by my program and then the modified file should be opened.
View 10 Replies
View Related
Mar 18, 2011
I am learning Linux daemon programming and write a simple daemon program. The issue is no data is written to the log file (/var/tmp/simpledeamon.log) though the file is successfully created (it's file size is zero from ls -l output). Could someone kindly point out the error in my program,The code is based on the Devin Watson's article at Here is the code:
// simplydaemon.cpp
// A simple Linux daemon.
#include <sys/types.h>
[code]...
View 2 Replies
View Related
Feb 18, 2010
The following script will work when I type the path to the file I want to checksum, but not when I drag the file to the terminal because the linux terminal (unlike the Mac) automatically puts quotes around the file path, which causes an error. (Clarification: am referring to gnome-terminal. Thanks, GrapefruiTgirl.) I did not find anything in gconf-editor or anywhere else to alter this behaviour, and my post in Launchpad is unanswered so far. (the script in itself is not very useful, I just stumbled upon this error when experimenting with bash).
So, is there a workaround for stripping the quotes from the input, or can I configure the terminal to not quote the input when I drag a file into it (which I would prefer?)
I am currently logged in from Mac OS, but the question refers to ubuntu karmic with which I dual boot.
View 6 Replies
View Related
Sep 2, 2010
I recently faced a problem. At my college, I linked my laptop with my friend's laptop with an ad-hoc wifi network. I wanted to send him a file. I was running Ubuntu, and he was running XP. Unfortunately, I could not find an easy way to send him the file. Another problem I faced was when I wanted to transfer the contents of my hard disk to another computer. I had to install Filezilla server on the other computer, and upload the files from one computer to the other.
I feel that its a really cumbersome method of transferring files in the same network. Mobile phones have bluetooth, and a file can be sent to another mobile very easily without any fuss. Does anyone know whether any such program exists already? If not, I want to write such a program that will allow one user to add another user to a personal network, and send or recieve files and/or communicate in other ways. The only language I know is Python (self-taught). I was wondering what GUI framework to use. I've never written a GUI program before, and would like to hear your opinions. This will be a very basic program, and must be able to run on many platforms.
View 6 Replies
View Related
Jan 14, 2011
When I try to run a program from the terminal, bash reports "No such file or directory", even though the file exists, is executable and I have permission to run it. The same program worked in the past.
View 7 Replies
View Related
Apr 7, 2010
i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming me if there is an alphabet in each line. My text file is formatted in this way...
[Code]....
View 2 Replies
View Related
Feb 8, 2011
I opened a text file and read some stuff. Then I (think) I closed it. Then I tried to open another one and it stopped working. It seemed to compile fine though. Why would this be?
Code:
#include <iostream>// Libraries included
#include <string>
#include <fstream>
#include <sstream>
#include <list>
[Code]....
View 3 Replies
View Related
Dec 12, 2010
I'd like to run a program [URL] from the GUI menu (yes, I know I can run it from the command line). I've gotten this to work by using a menu entry (see attached screenshot).The command is:
Code:
gksu chkrootkit
with the option for Type: was selected as Application in Terminal However, when chkrootkit is finished, the terminal immediately snaps shut according to the profile selection: When Commands Exits: Close terminal What I'd like to do is create another profile that causes the terminal to be held open (see screenshot) when the command exits and be able to choose that profile from the GUI Menu entry. I believe the command when using the CLI is:
Code:
gnome-terminal --profile=<profile_name>
how do I incorporate this within the Command entry line of the launcher?
View 1 Replies
View Related
Feb 10, 2011
i started using computer when it was all dos driven so thought i was going to be fine using the terminal in ubuntu the problem i am facing is i can not quite get my head round why is it if i load the terminal. and the first this i type is dir or ls it gives me a list off directories. So why is it if i type cd /pictures i get no such file or directory ? Confused
This also bugging the jebus out off me is i am trying to get into my usb pen drive from the terminal to run a program i have on there.
so i type cd /media
then typed ls
is displayed New Volume <-- This being the name off my pen drive
i have tried every this to get into there but the commands i would use in dos are not playing ball.
Can some one please explain how to get into my usb pen then tell me were i can go read on this as i really can not get my head around this at moment.
View 5 Replies
View Related
May 21, 2011
i am a new programer in c i have write a simple app and i have a problem with combiling my program include one header file and 2 c
fun.h
#include<stdio.h>
void f();
/******EOF*******/
fun.c
#include"fun.h"
void f(){
[Code].....
View 6 Replies
View Related
Jul 22, 2011
I am trying to write a bash script that installs a program fully automated for me. I am stuck at the one part where i need to change a line in one config file. I have tried various syntax for sed and none have worked. Maybe someone can suggest how to go about this. Since the line appears in the middle of the file, I can't use echo or cat. Also the file will be diffrent lengths depending on the install.
The line I need changed is:
I need that changed to:
the last syntax i tried is:
Yes this is for PNP4Nagios on centos 5.6 64bit. If i can get this figured out. I will be willing to post the whole thing for others to use. it will be used to install PNP after a working nagios install is done.
View 11 Replies
View Related
Mar 30, 2010
i have a seemingly simple desire but i cant get it right. my .xinitrc is as follows
openbox
sleep 5
xfce4-panel
since that only starts openbox
i would like to know how to get it to also start the xfce panel
also how can i run say firefox from a term and be able to close that term window without killig FF?
View 2 Replies
View Related
Mar 23, 2010
I would like to know if there is anyway of starting a program via console.
View 6 Replies
View Related
Mar 28, 2011
I would like to know whether there is a way of running a console program at startup. That means even before user login. My guess was that it would have to be run like a service but this idea comes from my ... windows" experience.
View 6 Replies
View Related
Jan 14, 2011
i was using a serial console program (not minicom) two weeks back but took a break and have no idea what it is! man, it was awesome, too. it had a nice gui, similar to hyperterminal...and from what i think i remember it came packaged with f14.
View 4 Replies
View Related
Jan 2, 2011
Fedora 14 xfce
HP Netbook 210
I am looking for a good and practical console application. I use midnight commander a lot, and I find it frustrating every time I press the F10 key it displays the drop menu items using the terminal. On occasions I make invisible the menu bar, by disabling in the view menu.
So I am looking for a good console application that when I use midnight commander if I press the function key buttons it doesn't display the drop down menu options.
View 5 Replies
View Related
Nov 24, 2010
I had a program print lot of data on the terminal. The terminal scrolled over and now I cannot see all the data. Some of it is lost. How do I get it back ?
View 3 Replies
View Related
Jan 9, 2011
What are the differences between shell , console & terminal?
This probably sounds like a stupid question but I'm having a lot of trouble clearly differentiating between a shell (such as Bourne or bash) and the Terminal application in GNOME. I realise that both are completely different but I can't seem to find a clear answer written in text. Could anyone clearly distinguish between both?
View 4 Replies
View Related
Jul 23, 2011
I have come across the use of the term terminal, virtual terminals/consoles, real-text terminals but do not understand what terminal refers to. Does it refer to the screen that is in-front of me whilst I post this question or does it refer to something specific?EDITI came across a similar post at What are the differences between shell , console & terminal? and it seems to be similar to the one I posted although am still confused about the use of the sentence Decades ago, this was a physical device consisting of little more than a monitor and keyboard. What does this device look like and how is different to a monitor?
View 2 Replies
View Related
Jun 23, 2010
1. Can you configure wifi while netmanager is running?
2. How do you do above in terminal? what commands do you use?
View 3 Replies
View Related