473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

stopping the sound server in PySol code -- how?

I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net
Jul 18 '05 #1
10 2182
Lynn wrote:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.


How did you install PySol? RPMs? Is there a PySol-sound package that you
can choose not to install? If PySol doesn't find its sound support
module, it won't bother with sound.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #2
Robert Kern wrote:
Lynn wrote:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if
PySol is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.


How did you install PySol? RPMs? Is there a PySol-sound package that you
can choose not to install? If PySol doesn't find its sound support
module, it won't bother with sound.


It is via an RPM. I think it's the one that came with SuSE 9.1. It
installed pysolsoundserver.so. I renamed that file to see if not finding
it would be enough. But the script failed because it couldn't find it.

I will try uninstalling the rpm and getting the PySol source.

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net
Jul 18 '05 #3
Lynn wrote:
Robert Kern wrote: It is via an RPM. I think it's the one that came with SuSE 9.1. It
installed pysolsoundserver.so. I renamed that file to see if not finding
it would be enough. But the script failed because it couldn't find it.

I will try uninstalling the rpm and getting the PySol source.


Nope. If I run from the src (grabbed frm www.pysol.org) I get this stack
trace:
File "pysol.py", line 47, in ?
from main import main
File "/data/apps/pysol-4.82/src/main.py", line 48, in ?
from app import Application
File "/data/apps/pysol-4.82/src/app.py", line 54, in ?
from images import Images, SubsampledImages
File "/data/apps/pysol-4.82/src/images.py", line 47, in ?
from pysoltk import tkversion, loadImage, copyImage, createImage
File "/data/apps/pysol-4.82/src/pysoltk.py", line 81, in ?
exec "from " + m + " import *"
File "<string>", line 1, in ?
File "/data/apps/pysol-4.82/src/tk/soundoptionsdialog.py", line 44, in ?
from pysolaudio import pysolsoundserver
File "/data/apps/pysol-4.82/src/pysolaudio.py", line 44, in ?
import pysolsoundserver
ImportError: No module named pysolsoundserver

If I strip out every instance of importing that module, it eventually dies
with a tk box alerting me thatg the global pysolsoundserver is not defined.

I'm farther along than I've ever been though. :)

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net
Jul 18 '05 #4
Lynn wrote:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.


What sound server do you use? I run kde and thus artsd. There is a wrapper
called artsdsp. When putting that in front of your program, it will ensure
that access to /dev/dsp and the like are rerouted through the soundserver.

for example

artsdsp enigma

lets me play enigma along with xmms. Of course you have to use xmms arts
plugin for output, as otherwise xmms shows the same annoying behaviour.
--
Regards,

Diez B. Roggisch
Jul 18 '05 #5
Lynn wrote:
Lynn wrote:
File "/data/apps/pysol-4.82/src/pysolaudio.py", line 44, in ?
import pysolsoundserver
ImportError: No module named pysolsoundserver

If I strip out every instance of importing that module, it eventually dies
with a tk box alerting me thatg the global pysolsoundserver is not defined.


This is Python: just make your own pysolsoundserver module
with dummy do-nothing functions. It's possible that the
use of pysolsoundserver is too complex for this to be easy,
but often all you need to do is run the program repeatedly,
watching for each exception and then implementing dummy
functions/objects that basically trick the calling routines
into thinking everything is working fine. No need to edit
the original source at all!

Consider it your first foray into test-driven development,
since in effect that's what you would be doing. ;-)

-Peter
Jul 18 '05 #6
Lynn wrote:
Lynn wrote:

Robert Kern wrote:


It is via an RPM. I think it's the one that came with SuSE 9.1. It
installed pysolsoundserver.so. I renamed that file to see if not finding
it would be enough. But the script failed because it couldn't find it.

I will try uninstalling the rpm and getting the PySol source.

Nope. If I run from the src (grabbed frm www.pysol.org) I get this stack
trace:
File "pysol.py", line 47, in ?
from main import main
File "/data/apps/pysol-4.82/src/main.py", line 48, in ?
from app import Application
File "/data/apps/pysol-4.82/src/app.py", line 54, in ?
from images import Images, SubsampledImages
File "/data/apps/pysol-4.82/src/images.py", line 47, in ?
from pysoltk import tkversion, loadImage, copyImage, createImage
File "/data/apps/pysol-4.82/src/pysoltk.py", line 81, in ?
exec "from " + m + " import *"
File "<string>", line 1, in ?
File "/data/apps/pysol-4.82/src/tk/soundoptionsdialog.py", line 44, in ?
from pysolaudio import pysolsoundserver
File "/data/apps/pysol-4.82/src/pysolaudio.py", line 44, in ?
import pysolsoundserver
ImportError: No module named pysolsoundserver

If I strip out every instance of importing that module, it eventually dies
with a tk box alerting me thatg the global pysolsoundserver is not defined.

I'm farther along than I've ever been though. :)


My version has

try:
from Pysol import pysolsoundserver
except ImportError:
pysolsoundserver = None

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #7
In <iqAnd.69632$SW3.42915@fed1read01>, Lynn wrote:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.


Do you have KDE and its sound server running? Then you can try to start
PySol with the ``artsdsp`` wrapper. The program intercepts access to the
low level sound devices in /dev/* and passes the data to the sound server.
See ``artsdsp --help`` for options.

Ciao,
Marc 'BlackJack' Rintsch
Jul 18 '05 #8
Marc 'BlackJack' Rintsch wrote:
In <iqAnd.69632$SW3.42915@fed1read01>, Lynn wrote:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if
PySol is running.


Do you have KDE and its sound server running? Then you can try to start
PySol with the ``artsdsp`` wrapper. The program intercepts access to the
low level sound devices in /dev/* and passes the data to the sound server.
See ``artsdsp --help`` for options.

Ciao,
Marc 'BlackJack' Rintsch

Alas, this produces a "artsdsp works only for binaries" error.
--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net
Jul 18 '05 #9
Lynn wrote:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.


Solved. Not elegant, but solved.

I found several places in the scripts where tests for the presense of
pysolsoundserver were being made. And a couple more places where the
option for sound was being tested. The test returns what ever it returns,
but I just force the answer to always be "failed" and "nosound."

I think there were five places to change an assignment statement.

Thanks to everyone for your responses. It helped. I learned more about
python than I intended. And that can't be bad. :)

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net
Jul 18 '05 #10
# chmod 000 /usr/lib/python2.3/site-packages/pysolsoundserver.so
crude but very effective.

carl

Jul 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ivan Van Laningham | last post by:
Hi All-- I've been using PySol-4.40 for years, because that was the last Windows installer version I could find. My wife's been using it for almost the same length of time. That version's worked...
1
by: Lam | last post by:
how can I play sound file in a .aspx page written in C#? I try to use the code like the following. But whenI call the play function play("sound.wav", this.SND_ASYNC) my computer give out "be"...
6
by: D | last post by:
I have a simple file server utility that I wish to configure as a Windows service - using the examples of the Python Win32 book, I configured a class for the service, along with the main class...
3
by: illmagination | last post by:
Hi, I recently received a task to have a .wav file play only once when home page is 1st loaded and only play again when the user re-visits the page by opening a new browser. I am using...
0
by: Tshepang Lekhonkhobe | last post by:
Hi, On Python docs, on faq/installed.html, it's mentioned that PySol is the most common Python application. Is this a platform-specific fact?
6
by: blaine | last post by:
Hello, I'm currently overriding function keys (F1 to F4) to perform other actions. In order to do this the default popup windows of Help (F1), Seach(F3) etc must be turned off. In FF it's easy...
6
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I have an application that is designed for using with a bar code scanner. I want the user to know that the scan was complete and the data was entered, so I am playing a system sound after data...
14
by: > Adrian | last post by:
Is there a way of stopping text from highlighting in textbox? Many thanks, Adrian.
10
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have the following three files. 1. Users.aspx is a webpage that uses the <asp:ObjectDataSourcecontrol to populate a simple <asp:ListBoxcontrol. 2. The UserDetails.cs file creates a Namespace...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.