'IT'에 해당되는 글 152건

  1. 2010.12.07 python Function Description
  2. 2010.12.07 log 파일 생성 raw input
  3. 2010.11.30 samba error 로그에 대한 간단 tip
  4. 2010.10.26 mint linux 10 스샷
IT/인터넷 마케팅2010. 12. 7. 19:35
반응형

Function Description
dir([obj]) Display attributes of object or the names of global variables if no parameter given
help([obj]) Display object's documentation string in a pretty-printed format or enters interactive help if no parameter given
int(obj) Convert object to an integer
len(obj) Return length of object
open(fn, mode) Open file fn with mode ('r' = read, 'w' = write)
range([[start, ]stop[,step]) Return a list of integers that begin at start up to but not including stop
                            in increments of step; start defaults to 0, and step defaults to 1
raw_input(str) Wait for text input from the user, optional prompt string can be provided
str(obj) Convert object to a string
type(obj) Return type of object (a type object itself!)

반응형
Posted by Dream Come True
IT/인터넷 마케팅2010. 12. 7. 18:54
반응형
로그파일 생성 간다 팁이다.

import sys
print >> sys.stderr, 'Fatal error: invalid input!'
logfile = open('./mylog.txt', 'a')      #'a' 파일 초기화 하지 않고 지속적으로 update 연산자
print >> logfile, 'Fatal error: invalid input!'
logfile.close()

-rw-rw-rw- 1 park park     56 2010-12-07 18:47 mylog.txt

Fatal error: invalid input!
Fatal error: invalid input!
Fatal error: invalid input!



Raw input
>>> user = raw_input('Enter login name: ')
Enter login name: root
>>> print 'Your login is:', user
Your login is: root


반응형
Posted by Dream Come True
IT2010. 11. 30. 15:43
반응형

/var/log/samba/ 로그중 다음과 같은 error 가 산발적으로 발생시

printing/print_cups.c:cups_connect(68)




/etc/samba/smb.conf 의 아래행을 삽입하여
unix 프린터에 대해 load, show,printing 에 대한 권한을 수정해 주어야 한다.
[global]
load printers = no
show add printer wizard = no
printing = none
printcap name = /dev/null
disable spoolss = yes


그중에 선택적으로 허가해줄 client 에 대해서 다음과 같이 허가 진행
hosts allow = 192.168.1 127

samba 간타 tip 이었습니다.
반응형

'IT' 카테고리의 다른 글

cadence IC5033 실행 화면  (0) 2011.08.10
debian nfs 공유 및 받기  (0) 2011.07.27
mint linux 10 스샷  (0) 2010.10.26
debian lenny 한국 daum source List 입니다.  (0) 2010.10.21
Debian GNU/Linux 3.0 네트워크 부팅 HOWTO  (0) 2010.10.20
Posted by Dream Come True
IT2010. 10. 26. 00:28
반응형



mint linux 10 스샷
인스톨도 간단하고 이것 저것 신경 쓸것 없이 깔끔한 리눅스 입니다.
이제는 윈도우와 격이 틀려지는 느낌이 듭니다. 거이 맥의 osx 흡사해 지는 리눅스 입니다.

반응형
Posted by Dream Come True