-2
def sss(request):
handle=open('b.txt','r+')
handle.write("I AM NEW FILE")
var=handle.read();
return HttpResponse(var)
urlpatterns = patterns('',
('^$',sss),
)
1.my b.txt無關爲什麼我的代碼打印此當我讀,寫
2.當我運行我的代碼,它打印:
I AM NEW FILE7 鴯?; ??x 鴯鴯v1鴯pZ€0 鴯鴯燛?鴯8N鴯鴯p 坮 愵) 犭 ?`16鴯鴯 S6鴯鴯榑 鴯? 鴯@ 鴯鴯p疊 {鴯€1鴯鴯 V 鴯鴯 @+ 爏 鴯 職 鑮 鴯鴯鴯`埤 >?) ?鴯鴯@? Z!x`%鴯p?鴯? 鴯鴯鄧鴯鴯@?`7鴯鴯鴯`? 櫃 鴯鴯鑎1X 鴯鴯鴯鴯鴯?#鴯餷?鴯€0鴯(Q?鴯H?鴯P?#鴯 ' 鴯(5 ?, 7鴯啵6H宏 0??+噌? k%8除 `烋 鴯爐"繳` 鴯埻 鴯0?郤 鴯鴯鴯?爛/啊 鴯鴯鴯睾8S1`?`?鴯鴯悀0鴯 ?`??鴯繧爅 鴯餡 鴯些 鴯鴯鴯鴯鴯@]鄡HE,鴯鴯?癉+?+鴯鴯鴯p戙 @O鴯?? 鴯鴯 37€P6蠯7鴯@= 鴯嘣 囗 ?+xP?x?如?70暡 鴯鴯鴯鴯鴯鴯 €鴯鴯鴯€ h *??x 纙1鴯鴯鴯€K 疊 鴯鷂8? ?鴯 鴯萰 鴯`?辣 @?饆 鴯鴯鴯鴯? 鴯€?鴯鴯鴯鴯鴯鄧鴯8(鴯P⒊ ?鴯? p(0B?鴯鴯嗨鴯鴯鴯鴯李 鴯鴯鴯邪 P?鴯鴯鶇 爛/爦+鴯蜣 9 鴯 楈 ?鴯鴯怱1鴯鴯恏鴯鴯鴯鴯袖 ; 鴯€?鴯€札 `?(?鴯ㄈ 鴯鴯+ 鴯櫛0鴯愵 鴯鴯恾谿6 ?1谹,鴯鴯鴯 {0鴯鴯? X?鴯€D 鴯&?€?` 鴯H{ ?鴯葉Xw鴯鴯鴯皢 鴯狑 鴯鄩0縕0堩)€Q 鴯? ?鴯 ④ @?鴯鴯鴯鴯鴯 ?XA6鴯鴯? O 鴯0 h 鴯 鴯鴯李 鴯 ? j鴯鴯鴯鴯0昌 57極[email protected]?H+ 鴯鴆 尛 `?鴯 18戙 鴯P ?噍6嗤0鴯鴯鴯楧6鴯坆 鴯a 鴯` 鴯鴯鴯鴯鴯鴯鴯惍礫 pG8s鴯鴯鴯@ ? (, 蠵 (鄭? 鴯╒&鴯縗鴯鐽圡7鴯繮!0[ 0m 鴯鴯鴯鴯@?発0鴯鴯鴯鴯鴯? ?鴯饗 p?pZ爦+鴯@?€\1鴯犎 0如 ?艾 鴯棱? 鴯€;鴯? 鴯鴯`? 褶 ? 鴯鴯鴯給*`7鴯@嵀 6 R 恈鴯鴯鴯鴯p?鴯饇鴯埪00^#燽 鴯鴯8褶 h €,h ? 鴯鴯x+ 鴯鴯€37鴯鴯鴯鴯`+鴯P?鴯 1 杞 鴯鴯鴯鴯惥*鴯郔6鴯李 鴯鴯h: 鴯鴯83 ? 哀犎鴯鴯0s 鴯鴯鴯鴯? 蠍p篆 鴯鴯鴯鴯鴯纞" s找(??x Q s l??x ndies".
* If value is 1, cand{{ value|pluralize:"y,ies" }} displays "1 candy".
* If value is 2, cand{{ value|pluralize:"y,ies" }} displays "2 candies".
u ,i u i ( RE RG R5 R3 R4 ( R R< R t singular_suffixt
plural_suffix( ( s? D:\Python25\lib\site-packages\django\template\defaultfilters.pyt pluralize4 s$
c C s d d k l } | | ? S( sD Takes a phone number and converts it in to its numerical equivalent.i( t
phone2numeric( Rc R ( R R
爲什麼呢?
感謝