Re: Reading a directory

2015-03-27 Thread Mattes
 
Am Freitag, 27. März 2015 18:19 CET, Mattes r...@mh-freiburg.de schrieb: 
 

 you need the opendir-readdir-closedir combo:
 
  (let ((dir (opendir /etc/)))
(readdir dir) 
.
   (closedir dir))

Or use (ice-9 ftw)

RalfD

 HTH RalfD
 
 

  
  TIA
  Urs
  
  
  
  
 
 
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user
 
 
 
 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Reading a directory

2015-03-27 Thread David Nalesnik
On Fri, Mar 27, 2015 at 12:19 PM, Mattes r...@mh-freiburg.de wrote:


 Am Freitag, 27. März 2015 18:14 CET, Urs Liska u...@openlilylib.org
 schrieb:

  Hi,
 
  I think this should be easy, but I don't find it in the Guile reference.
 
  I want a list of filenames in a given directory, what
  os.listdir(dirname) would give me in Python.
 
  What should I use?

 Hi Urs,

 you need the opendir-readdir-closedir combo:

  (let ((dir (opendir /etc/)))
(readdir dir)
.
   (closedir dir))

 HTH RalfD


This is pretty well hidden in the 1.8 manual.  I found opendir in the
procedure index under its C name: scm_opendir.  Here's the page with
related stuff:
http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/File-System.html#index-scm_005freaddir-3063

DN
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Reading a directory

2015-03-27 Thread Mattes
 
Am Freitag, 27. März 2015 18:14 CET, Urs Liska u...@openlilylib.org schrieb: 
 
 Hi,
 
 I think this should be easy, but I don't find it in the Guile reference.
 
 I want a list of filenames in a given directory, what 
 os.listdir(dirname) would give me in Python.
 
 What should I use?

Hi Urs,

you need the opendir-readdir-closedir combo:

 (let ((dir (opendir /etc/)))
   (readdir dir) 
   .
  (closedir dir))

HTH RalfD


   
 
 TIA
 Urs
 
 
 
 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Reading a directory

2015-03-27 Thread Urs Liska

Hi David and Ralf,

thank you for the hints. Actually readdir was where I'd already landed, 
but I hadn't got it to run.


Now it's possible to do:

\include openlilylib
\useLibrary stylesheets
\displayNotationFonts

===

Installed notation fonts:

OpenType:

- arnold

- beethoven

- cadence (no brace font)

- emmentaler

- gonville

- gutenberg1939

- haydn

- improviso

- lilyboulez (no brace font)

- lilyjazz

- paganini (no brace font)

- profondo

- ross

- scorlatti (no brace font)

- sebastiano

SVG:

- beethoven

- cadence (no brace font)

- emmentaler

- gonville

- gutenberg1939

- haydn

- improviso

- lilyboulez (no brace font)

- lilyjazz

- paganini (no brace font)

- profondo

- ross

- scorlatti (no brace font)

- sebastiano


:-)

Best
Urs

Am 27.03.2015 um 18:32 schrieb David Nalesnik:



On Fri, Mar 27, 2015 at 12:19 PM, Mattes r...@mh-freiburg.de 
mailto:r...@mh-freiburg.de wrote:



Am Freitag, 27. März 2015 18:14 CET, Urs Liska u...@openlilylib.org
mailto:u...@openlilylib.org schrieb:

 Hi,

 I think this should be easy, but I don't find it in the Guile
reference.

 I want a list of filenames in a given directory, what
 os.listdir(dirname) would give me in Python.

 What should I use?

Hi Urs,

you need the opendir-readdir-closedir combo:

 (let ((dir (opendir /etc/)))
   (readdir dir)
   .
  (closedir dir))

HTH RalfD


This is pretty well hidden in the 1.8 manual.  I found opendir in the 
procedure index under its C name: scm_opendir.  Here's the page with 
related stuff:

http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/File-System.html#index-scm_005freaddir-3063

DN



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user