Hello everyone, can somebody tell me what is wrong with this code:
while true
do
java myTime > myTime.log
sleep 60
done
I get the following error:
./myTime: Syntax error at line 1 : `while' is not matched.
Thanks in advance! (6 Replies)
Hello all,
Can someone tell me why I'm getting an error in the following code:
export return_code="$?"
if then
echo "load_shaw.sas failed."
exit
else
echo "Trigger the next script..."
# /path/to/next/script
fi
I get an error... (3 Replies)
I just wanted to assign the filename to a variable
filename="abc"
datestrng=`date +%Y%m%d`
filextn="txt"
"LOCAL_FILE"${i}=${filename}"_"${datestrng}"."${filextn}
echo "LOCAL_FILE"${i}
I get the following error on 2nd last line
ksh: LOCAL_FILE1=abc_20081114.txt: not... (3 Replies)
Trying to do a file count on files between a specific date. I entered the following command, but it's not working:
find . -type f \( -newer startdate -a ! -newer enddate \) -exec "ls -l | wc -l" {} \;
lil help? :D (4 Replies)
1) I have the below code in concattxnrecords.sh shell script and it is calling the genericVars.sh shell script which is mentioned as below has some code inside it which would intialize some variables in it, now my question is will this shell script would inherit those variable definitions or not... (3 Replies)
Hello, all
Suppose my current directory has 3 files:
file_1 file_2 file_3
I wrote the following codes:
awk 'BEGIN{while("ls"|getline d) {myarray++}}; END{close("ls");for (i in myarray){print i, myarray}}' /dev/null
I expect the output be like:
1 file_1
2 file_2
3 file_3
... (7 Replies)
Hi,
In multi-level inheritance:
class A {
public:
void fun() { cout << "A" << endl; }
};
class B : public A {
public:
void fun() { cout << "A" << endl; }
};
class C : public B { };
int main() {
C c;
c.fun(); // Ans: A
} (1 Reply)
All,
I have a basic buzz program written in python with return function. If i change return with print,it works fine but i want to know whats wrong with return statement.Can anyone help me whats wrong with this
#!/usr/bin/python
def div4and6(s,e):
for i in range(s,e+1):
if... (5 Replies)
Discussion started by: oky
5 Replies
LEARN ABOUT DEBIAN
pympg
PYMPG(6)PYMPG(6)NAME
pykaraoke - free CDG/MIDI/MPEG karaoke player
SYNOPSIS
pympg mpegfilename.mpg
OVERVIEW
pykaraoke is a free karaoke player for Linux, FreeBSD and Windows.
pymng is an MPEG player built using python. It was written for the PyKaraoke project but is in fact a general purpose MPEG player that
could be used in other python projects requiring an MPEG player.
The player uses the pygame library (www.pygame.org), and can therefore run on any operating system that runs pygame (currently Linux, Free-
BSD, Windows and OSX).
You can use this file as a standalone player, or together with PyKaraoke. PyKaraoke provides a graphical user interface, playlists, search-
able song database etc.
For those writing a media player or similar project who would like MPG support, this module has been designed to be easily incorporated
into such projects and is released under the LGPL.
USAGE
To start the player, pass the MPEG filename/path on the command line:
python pympg.py /path/song.mpg
You can also incorporate a MPG player in your own projects by importing this module. The class mpgPlayer is exported by the module. You can
import and start it as follows:
import pympg
player = pympg.mpgPlayer("/path/song.mpg")
player.Play()
If you do this, you must also arrange to call pympg.manager.Poll() from time to time, at least every 100 milliseconds or so, to allow the
player to do its work.
The class also exports Close(), Pause(), Rewind(), GetPos().
There are two optional parameters to the initialiser, errorNotifyCallback and doneCallback:
errorNotifyCallback, if provided, will be used to print out any error messages (e.g. song file not found). This allows the module to fit
together well with GUI playlist managers by utilising the same GUI's error popup window mechanism (or similar). If no callback is provided,
errors are printed to stdout. errorNotifyCallback should take one parameter, the error string, e.g.:
def errorPopup (ErrorString):
msgBox (ErrorString)
doneCallback can be used to register a callback so that the player calls you back when the song is finished playing. The callback should
take no parameters, e.g.:
def songFinishedCallback():
msgBox ("Song is finished")
To register callbacks, pass the functions in to the initialiser:
mpgPlayer ("/path/song.mpg", errorPopup, songFinishedCallback)
These parameters are optional and default to None.
If the initialiser fails (e.g. the song file is not present), __init__ raises an exception.
SEE ALSO
You can find PyKaraoke's home page at: http://www.kibosh.org/pykaraoke/
AUTHOR
PyKaraoke was written by Kelvin Lawson <kelvinl@users.sourceforge.net> and William Ferrell <willfe@gmail.com>.
This manual page was written by Miriam Ruiz <little_miry@yahoo.es>, for the Debian project (but may be used by others).
july 16, 2006 PYMPG(6)