Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'encoding': 0.05; '-*-': 0.07; 'subject:file': 0.07; 'subject:skip:s 10': 0.07; 'utf-8': 0.07; 'advance': 0.07; 'coding:': 0.09; 'except:': 0.09; 'try:': 0.09; 'subject:python': 0.16; 'trying': 0.19; 'passing': 0.19; 'import': 0.22; 'fine': 0.24; 'pass': 0.26; 'tried': 0.27; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'didnt': 0.31; "skip:' 40": 0.31; 'skip:r 60': 0.31; 'file': 0.32; 'could': 0.34; 'skip:s 30': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'unable': 0.39; 'skip:p 20': 0.39; 'how': 0.40; 'read': 0.60; 'information': 0.63; 'skip:r 40': 0.68; 'special': 0.74; 'stat': 0.84; '*best': 0.91; 'regards*': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geekschicago.com; s=google; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=eN/FRoD8w91er9M62F9E36Ly61ykzLhE+s2aMAq8Bcw=; b=J5fCzdR6V4ec2vm2x0aXroQv6w9fYUirPKSl42vWbj7KfsYX3EmYlYvclc/Y1b/Xiv O6q+KdQGaeZKkEhX1Zk0wm8aMTi1NzuDmnnzmytuEeioapTSXtggU/Nlu0ACoAjFx2J/ SHIPTRua7ZcnHuafCKN3wCoJiLOdV2B69+qjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-type; bh=eN/FRoD8w91er9M62F9E36Ly61ykzLhE+s2aMAq8Bcw=; b=fx8CpihQ3ovuzg7dRY7Tk8F3svlWg1r8qiY9q3D3ZKaMf8VQJKetemHxFEPoSaKNql cNTBwC15Pvtud6ASrXnyxbxRE04ndEDNLg3ffru4NxHi67iiILHlGVSeVqFJPE5TWChx Q/82psPebbYpgqjo6ZHNi8ne1q8ZdgpSHHnQsNr7fIHVg48UTsEuOoXjHOd9EbrU90yp MzsUs66Xbl/D4aPOUawPOdZYNXKdBMAn4pkuoxFjxOPg8pWmYJtV/UTpebCKnL+FCNDW Bax9e4n1YiDNXCRs3LUejJ/QxP6LNO6vI0eBH2laQVCfk9UTIGvXcKTzIHld0lUmkkPN k6yg== X-Gm-Message-State: ALoCoQkHWto3NAJ4InlF/NxR3XhAYMO0CaS+Q3w0Akm650mFoVp2POJTDqZ3Yyvz2cmwCeddjA1J X-Received: by 10.140.95.241 with SMTP id i104mr54189790qge.6.1408376086741; Mon, 18 Aug 2014 08:34:46 -0700 (PDT) MIME-Version: 1.0 Sender: furqan@geekschicago.com X-Originating-IP: [202.166.163.98] From: Furqan wasi Date: Mon, 18 Aug 2014 20:34:06 +0500 X-Google-Sender-Auth: z1SRrIsZfd7q-KP8Sl-wlZYWJV0 Subject: python scikits.audiolab Sndfile special chars in file name To: python-list@python.org Content-Type: multipart/alternative; boundary=001a11c169ae5c5fad0500e91c5c X-Mailman-Approved-At: Mon, 18 Aug 2014 18:46:09 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 231 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408380370 news.xs4all.nl 2913 [2001:888:2000:d::a6]:49486 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76484 --001a11c169ae5c5fad0500e91c5c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi , Could you help me out on this , or guide me to some how can thanks I am trying to get a wav file information but Sndfile is unable to read file with special characters in path and file name(=E6=9F=A5=E6=89=BE=E5=95= =8F=E9=A1=8Cdaw.wav) and i am unable to get information in any way , i tried passing file path to Sndfile with diferent encoding to but didnt work , but if i pass this 'C:\Users\Furqan\Desktop\test\DAW\1.wav' it works fine , Thanks is advance My Code is # -*- coding: UTF-8 -*- from scikits.audiolab import Sndfile from os import walk, path, stat track1 =3D r'C:\Users\Furqan\Desktop\test\=E6=9F=A5=E6=89=BE=E5=95=8F=E9= =A1=8Cdaw\=E6=9F=A5=E6=89=BE=E5=95=8F=E9=A1=8Cd.wav' #track2 =3D r'C:\Users\Furqan\Desktop\test\DAW\1.wav' try: track_one_file_obj =3D Sndfile(track1, 'r') except: print('Simple didnt work') pass try: track_one_file_obj =3D Sndfile(track1.decode('cp1252'), 'r') except: print('cp1252 didnt work') pass try: track_one_file_obj =3D Sndfile(track1.encode('utf-8'), 'r') print(track_one_file_obj) except: print('encode didnt work') pass try: track_one_file_obj =3D Sndfile(track1.encode('utf8'), 'r') print(track_one_file_obj) except: print('encode didnt work') pass try: track_one_file_obj =3D Sndfile(track1.decode('utf-8'), 'r') print(track_one_file_obj) except: print('decode didnt work') pass --=20 *Best Regards* Furqan Wasi *AVPreserve * --001a11c169ae5c5fad0500e91c5c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Could you help me out = on this , or guide me to some how can thanks=C2=A0

I am trying to get a wav file info= rmation but Sndfile is unable to read file with special characters in path = and file name(=E6=9F=A5=E6=89=BE=E5=95=8F=E9=A1=8Cdaw.wav) and i am unable = to get information in any way , i tried passing file path to Sndfile =C2=A0= with diferent encoding to but didnt work , but if i pass this 'C:\Users= \Furqan\Desktop\test\DAW\1.wav' it works fine , Thanks is advance=C2=A0=

<= font face=3D"comic sans ms, sans-serif">My Code is=C2=A0
# -*- coding: UTF-8 -*-
from scikits.audiolab import Sndfi= le
from os imp= ort walk, path, stat

<= font face=3D"comic sans ms, sans-serif">track1 =3D =C2=A0r'C:\Users\Fur= qan\Desktop\test\=E6=9F=A5=E6=89=BE=E5=95=8F=E9=A1=8Cdaw\=E6=9F=A5=E6=89=BE= =E5=95=8F=E9=A1=8Cd.wav'
#track2 =3D r'C:\Users= \Furqan\Desktop\test\DAW\1.wav'

try:
=C2=A0 =C2=A0 track_one_file_obj = =3D Sndfile(track1, 'r')
except:
=C2=A0 =C2=A0 print('S= imple didnt work')
=C2=A0 =C2=A0 pass

try:
=C2=A0 =C2=A0 track_one_file_obj =3D Sndfil= e(track1.decode('cp1252'), 'r')
except:
=C2=A0 =C2=A0 print('cp1252 = didnt work')
=C2=A0 =C2=A0 pass<= /div>

try:
=C2=A0 =C2=A0 track_one_file_obj = =3D Sndfile(track1.encode('utf-8'), 'r')
=C2=A0 =C2=A0 print(track_one_fi= le_obj)
except:
=C2=A0 =C2=A0 print('encode = didnt work')
=C2=A0 =C2=A0 pass<= /div>


try:
=C2=A0 =C2=A0 track_one_file_obj =3D Sndfil= e(track1.encode('utf8'), 'r')
=C2=A0 =C2=A0 print(track_= one_file_obj)
except:
=C2=A0 =C2=A0 print('encode didnt wo= rk')
=C2=A0 =C2=A0 pass<= /div>

try:
=C2=A0 =C2=A0 track_one_file_obj = =3D Sndfile(track1.decode('utf-8'), 'r')
=C2=A0 =C2=A0 print(track_one_fi= le_obj)
except:
=C2=A0 =C2=A0 print('decode = didnt work')
=C2=A0 =C2=A0 pass<= /div>

--

Best Regards

Furqan Wasi

AVPreserve=C2=A0

--001a11c169ae5c5fad0500e91c5c--