|
|
...making Linux just a little more fun! The Mailbag
Submit comments about articles, or articles themselves (after reading our guidelines) to The Editors of Linux Gazette, and technical answers and tips about Linux to The Answer Gang.
Fri Jul 22 11:43:02 2005
|
|
............... But both sides of WSGI must be in the same process, for the simple reason that the spec requires an open file object in the dictionary, and you can't pickle a file object and transmit it to another process. ............... |
Actually, the spec requires a file-like object, so an emulation like StringIO is allowed. StringIO is pickleable:
>>> from StringIO import StringIO
>>> sio = StringIO("abc")
>>> p = pickle.dumps(sio)
>>> p
"(iStringIO\nStringIO\np0\n(dp1\nS'softspace'\np2\nI0\nsS'buflist'..."
>>> sio.read()
'abc'
>>> sio.read()
" # End of file.
>>> sio2 = pickle.loads(p)
>>> sio2.read()
'abc'
cStringIO, however, is not pickleable.
Debian kernels without devfs
Fri Jul 8 21:15:29 2005
Kapil Hari Paranjape (kapil at imsc.res.in)
This is regarding Hugo Mills query on how to build a Debian initrd without devfs.
<flamebait>
Now why would you be wanting to build a Debian kernel without devfs.
Surely you haven't bought all that stuff by Greg K.-H. about devfs
being bad design?
</flamebait>
[Rick] Surely, it would be rude to speak ill of the dead. As we say in Norwegian, "Aluv ha sholem."![]()
I assume that you are planning to use Debian's kernel-package (make-kpkg) utility to build the kernel. This you can do without worrying about anything. Just build a kernel without devfs and other options as you want them.
The initrd that is installed along with the kernel is built (providing you specified that you wanted it to be built) at the time when you install the kernel-image-x.x.x-y package.
This initrd is build by a set of tools called (what else) initrd-tools; the principal among them being "mkinitrd". Now "mkinitrd" takes a conf file /etc/mkinitrd/mkinitrd.conf so you can make some changes there.
I haven't tried this but you would need to create a script in /etc/mkinitrd/scripts that would setup the necessary device files in the $INITRDDIR/dev.
More importantly, the script /usr/share/initrd-tools/init is the "init" that is put on the initrd image. You would need to replace this with your own version as the default one makes use of devfs.
If you are keen on sorting out all these issues you should probably contact the maintainer of initrd-tools as Debian's initrd will have to give up "devfs" at some stage since Linux 2.8 won't have "devfs".
Re: [LG 116] mailbag #1
Fri Jul 8 16:08:00 2005
Dan Linder (dan from linder.org)
Just a thought, but how about if he compiles a plain-jane Pentium I kernel? It could be that the more recent kernels (and GCC?) might be putting in CPU instructions that didn?t get called before, or they are called more often now and are causing other errors. My experience is if the system is locked hard like he implies, then it's probably a hung CPU not answering interrupts (as he alluded to).
[Heather] Except for the part about how it answers them just fine under 2.4.x kernels, this seems plausible. It'll be tried.
He might also try limiting his use to the 768MB of RAM that his MB officially supports. Either by using the kernel command line "mem=768M" or put in only 768MB of RAM.
As a side note, he might want to run "MEMTest86+" (http://www.memtest.org/) and see if that sees any RAM errors.
There just might be a reason the MB manufacturer didn't recommend >768MB RAM.
[Heather] The full gig worked under 2.4.x kernels however some time has passed. So, this is a very worthy suggestion. Also a current 2.4.x kernel will be tried, if the hardware is failing in this sense that might be affected too. Note to readers: the good folk at MEMTEST do occasionally update their test suite. Looks like the last update was in 2004 sometime - but some of the rescue disks might have an older edition in them.
TAG "playmidy plays silently" LG#116
Sat Jul 16 22:38:29 2005
Walt Reinemer (wmreinemer at tns.net)
Midi plays, but it is not easy. I am running Slackware 9.1 with a 2.4.28 kernel on a K6III 400.
I am using sfxload from the awesfx-0.5.0d package to load soundfonts on to a SBLive soundcard
- the awesfx-0.5.0d package is available at:
- http://www.alsa-project.org/~iwai/awedrv.html
If you load the soundfonts and play a midi, you may have to download the soundfonts from the SBLive card prior to playing a wav file. The soundfonts do not stay loaded very long, so you have to check the available SBLive memory prior to playing a midi.
Perhaps this will help.
Latest Gazette Issue
Wed Jul 6 06:02:15 2005
Martin Hooper (martinjh_linux at blueyonder.co.uk)
A tickler about last month's issue taking so long to publish... -- Heather
Any news on the when the latest Gazette is out? Or have I missed the announcement... Being subscribed on both of my accounts to the announcement list...
[Ben] I figured we'd get mail from our readers about now.The new issue should be out tonight, Martin; the problem was that - this being summer - many of our authors are on vacation, and we were a bit thin on articles. Several of the folks in The Answer Gang had, very capably, scrambled their jets and kicked in a bunch of material, and I've been working to get it all organized. Blame the delay on me.
For all our readers, if you've ever wanted to try your hand at writing - we're always looking for new authors. In the worst case, if your submission gets rejected - and this is part of my commitment to LG - you'll get a note explaining exactly why it was rejected, along with suggestions on how to improve your writing. That is, at the very least, you'll get to learn something useful - and you may well end up getting published, which is not a bad thing to have on your resume.So don't be shy, folks - read our Authors' FAQ and send'em in!
It is our preference to ship an issue somewhere around the first of the month. Our lives including work in the weekdays have led the last several issues to come out somewhere around the weekend that's nearest; with the articles that came in late, we ran a bit overtime even by that standard. Sorry. But I also encourage people with good articles that they feel need some work, to contact us and get into the sequence. You needn't always publish in the same month - we won't write your article for you, but our Articles@ staff may be able to point out some directions for improvement, and we get a new author out of the deal, too. So everyone wins
-- Heather
London explosions
Fri Jul 8 14:23:39 2005
Benjamin A. Okopnik (ben at linuxgazette.net)
I know that Thomas, at least, is away from the City, but - just for my own peace of mind - are all the Answer Gangsters from England OK? That would be Mike Martin and Neil Youngman that I recall; if anyone else can think of others, I'd appreciate it if you could ping them and CC the list.
[Thomas] Aww, thanks, Ben. Actually, I was only 33 miles from London at the time. I was in Stevenage, a town around London visiting my Grandparents. Would you believe they have broadband? Heh. More modern than my parents.
But I'm well, and accounted for.![]()
And I'm very glad to hear it!
[Thomas] I just hope Neil is, although as I know Neil is around the Pin-Green area (where my grandparents are), I would surmise he too is just as well.![]()
Yes indeed; he's emailed me (and as I recall, cc'd the Gang on it.) I
haven't heard back from Mike yet, though - it's a bit worrying. Since
you live in the same small island, could you perhaps walk over and knock
on his door?
[Neil] Ben your concern is appreciated. I was working from home that day, fortunately miles away from all the incidents. My wife was working in London as usual, and the first bomb was on her route in. Luckily she was already at work when it went off. Although she had a very unpleasant journey home, we are lucky it was no worse than an inconvenience for us. With 49 confirmed dead and more than 25 missing, our thoughts are with their families.
[Thomas] Small? Hehehe, Ben, sail your boat round these waters, I'll show you around this place.![]()
[Jimmy] There was a lot of off-topic chat in here too: enjoy the Launderette if you're interested
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/