Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageLynn 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 rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Post Follow-up to this messageRobert Kern wrote: > Lynn wrote: > > 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
Post Follow-up to this messageLynn 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
Post Follow-up to this messageLynn 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
Post Follow-up to this messageLynn 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.[/color ] 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
Post Follow-up to this messageLynn wrote: > Lynn wrote: > > > > > > > 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 rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Post Follow-up to this messageIn <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
Post Follow-up to this messageMarc 'BlackJack' Rintsch wrote: > In <iqAnd.69632$SW3.42915@fed1read01>, Lynn wrote: > > > 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
Post Follow-up to this message# chmod 000 /usr/lib/python2.3/site-packages/pysolsoundserver.so crude but very effective. carl
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.