euglug.org

[작성자:] admin

  • [Think] sys.path question (Pythonwin)



    Bryan Kane (op)Tue May 18 20:54:02 PDT 2004

    Besides tinkering with python on my linux box here at home, I've started using it at work quite a bit.  I use Pythonwin there because I have a win2000 box.
    
    I created a directory to hold my scripts.  I do the dir.path.append('...') command to include my directory in the system path.  But when I shut down the Pythonwin application and restart it, it doesn't show my new directory in the sys.path.  Is there something I'm missing?  How can I do sys.path.append('') and have it stick?
    
    bryan
    
    
    -- 
    Bryan Kane (op) <r_bryan_kane at operamail.com>
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] postgresql database access for python



    Ben BarrettTue May 18 20:54:02 PDT 2004

    This project just had an update posted to freshmeat...
    
    http://initd.org/software/initd/psycopg
    
    from the page:
    
    
    psycopg is a PostgreSQL database adapter for the Python programming
    language. It was written from scratch with the aim of being very small
    and fast, and stable as a rock. The main advantages of psycopg are that
    it supports the full Python DBAPI-2.0 and being thread safe at level 2.
    
    psycopg is different from the other database adapter because it was
    designed for heavily multi-threaded applications that create and destroy
    lots of cursors and make a conspicuous number of concurrent INSERTs or
    UPDATEs. Every open Python connection keeps a pool of real (UNIX or
    TCP/IP) connections to the database. Every time a new cursor is created,
    a new connection does not need to be opened; instead one of the unused
    connections from the pool is used. That makes psycopg very fast in
    typical client-server applications that create a servicing thread every
    time a client request arrives.
    
    There are confirmed reports of psycopg compiling and running on Linux
    and FreeBSD on i386, Solaris, MacOS X and Windows (both MSC and cygwin).
    
    
    
    cheers!!
    -- 
    Ben Barrett <barrett at counterclaim.com>
    counterclaim
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] sys.path question (Pythonwin)



    Bryan Kane (op)Tue May 18 20:54:02 PDT 2004

    Thanks for all the very helpful replies.  I'll have to try it monday.
    
    bryan
    
    On Fri, 2003-03-14 at 14:14, Horst wrote:
    > Chris has sketched out two ways in class:
    > 	http://www.registerguard.com/cmeyers/class/week3/1.html
    > 
    > A) Using *.pth files
    > --------------------
    > The 'Python Library Reference' (docs of package)
    > 3.27 site -- Site-specific configuration hook
    > expands on the .pth approach.
    > 
    > I am not sure if that's the 'official' way, but if a file
    > .../sitepackages/myprojects.pth
    > contains
    > 	C:/TEMP/projectA
    > 	C:/TEMP/projectB
    > and a file
    > 	C:/TEMP/projectA/doit.py
    > exists you can directly write
    > 	import doit
    > Note 1) path names in *.pth don't require backslash under Win.
    > Note 2) the process is intelligent enough to not add directories to
    > sys.path that don't exist.
    > 
    > B) .../sitepackages and your own 'packages'
    > ---------------------------------------
    > If you don't want to clutter up .../sitepackages and use 'packages'
    > (sub-directories) like
    > 	.../sitepackages/myutils/
    > you want to have a file
    > 	.../sitepackages/myutils/__init__.py
    > in there. If package 'myutils' is just a container for unrelated modules
    > the __init__.py  can exist of just one comment like
    > 	# Dummy file to make this directory a package.
    > 
    > Then you need to pay attention to the package path: 
    > 	from myutils import mycooltool
    > or use the package.module notation
    > 
    > But Chris also had an example in that link above.
    > 
    >  - Horst
    > 
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > 
    > On 13 Mar 2003, Bryan Kane (op) wrote:
    > 
    > > Besides tinkering with python on my linux box here at home, I've started using it at work quite a bit.  I use Pythonwin there because I have a win2000 box.
    > > 
    > > I created a directory to hold my scripts.  I do the dir.path.append('...') command to include my directory in the system path.  But when I shut down the Pythonwin application and restart it, it doesn't show my new directory in the sys.path.  Is there something I'm missing?  How can I do sys.path.append('') and have it stick?
    > > 
    > > bryan
    > > 
    > > 
    > > -- 
    > > Bryan Kane (op) <r_bryan_kane at operamail.com>
    > > 
    > > _______________________________________________
    > > Think mailing list
    > > Think at zoneverte.org
    > > http://mail.zoneverte.org/cgi-bin/listinfo/think
    > > 
    > 
    > _______________________________________________
    > Think mailing list
    > Think at zoneverte.org
    > http://mail.zoneverte.org/cgi-bin/listinfo/think
    -- 
    Bryan Kane <r_bryan_kane at myrealbox.com>
    -- 
    Bryan Kane (op) <r_bryan_kane at operamail.com>
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] python MSSQL



    Ben BarrettTue May 18 20:54:02 PDT 2004

    Hmmm... not sure exactly (and not seeing anything obvious right off)...
    but here are some resources that might help:
    (Doesn't ODBC allow generic connections?  Or does there still have to be
    a MS SQL-specific implementation in python?)
    
    http://www.python.org/topics/database/modules.html
    http://www.python.org/windows/win32/odbc.html
    http://www.lemburg.com/files/python/mxODBC.html
    (plus http://www.iodbc.org/)
    http://www.easysoft.com/products/2002/tech_features.phtml
    (this one has a free 30-day trial, the rest are free afaik)
    
    bonne chance!
    
        Ben B
    
    PS - I'm sure the answer is "yes" python can be used with MS SQL; from
    what I've been seeing lately (just started doing a little testing with
    Java-MSSQL potentials) it seems that a lot of the drivers for the
    connection to MS SQL are commercial!  (aka, not Free or free)
    
    On Fri, 2003-04-18 at 10:08, Bryan Kane wrote:
    > I've been using python recently with a MySQL database here at work,
    > and it's been a lot of fun.  Sadly, we use too much microsoft stuff,
    > and some here would prefer that I use MS SQL Server 2000.
    > 
    > Can python be used with MS SQL server?	Is there something for MS
    > similar to the MySQLdb?
    > 
    > bryan
    
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] Pythonology and the story behind rackspace



    Ben BarrettTue May 18 20:54:02 PDT 2004

    I've been hearing that rackspace supports an inordinate number of
    spammers... nice to know that python works for them, too!!
    
    here are some pertinent links:
    http://news.spamcop.net/pipermail/spamcop-list/2001-July/thread.html#15644
    http://www.wired.com/news/rants/0,2350,56000,00.html
    and on....
    
    regardless of what rackspace themselves say:
    http://www.rackspace.com/aboutus/listings.php?hidelistings=1&detail=1094
    
    maybe they are getting better about it, though, given the rash of recent
    new legislation like Ohio's?
    
    -BB
    
    On Tue, 2003-03-18 at 16:02, Rob Hudson wrote:
    > http://pythonology.org/success&story=rackspace
    > _______________________________________________
    > Think mailing list
    > Think at zoneverte.org
    > http://mail.zoneverte.org/cgi-bin/listinfo/think
    -- 
    Ben Barrett <barrett at counterclaim.com>
    counterclaim
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] sys.path question (Pythonwin)



    Bryan Kane (op)Tue May 18 20:54:02 PDT 2004

    Thanks for all the very helpful replies.  I'll have to try it monday.
    
    bryan
    
    On Fri, 2003-03-14 at 14:14, Horst wrote:
    > Chris has sketched out two ways in class:
    > 	http://www.registerguard.com/cmeyers/class/week3/1.html
    > 
    > A) Using *.pth files
    > --------------------
    > The 'Python Library Reference' (docs of package)
    > 3.27 site -- Site-specific configuration hook
    > expands on the .pth approach.
    > 
    > I am not sure if that's the 'official' way, but if a file
    > .../sitepackages/myprojects.pth
    > contains
    > 	C:/TEMP/projectA
    > 	C:/TEMP/projectB
    > and a file
    > 	C:/TEMP/projectA/doit.py
    > exists you can directly write
    > 	import doit
    > Note 1) path names in *.pth don't require backslash under Win.
    > Note 2) the process is intelligent enough to not add directories to
    > sys.path that don't exist.
    > 
    > B) .../sitepackages and your own 'packages'
    > ---------------------------------------
    > If you don't want to clutter up .../sitepackages and use 'packages'
    > (sub-directories) like
    > 	.../sitepackages/myutils/
    > you want to have a file
    > 	.../sitepackages/myutils/__init__.py
    > in there. If package 'myutils' is just a container for unrelated modules
    > the __init__.py  can exist of just one comment like
    > 	# Dummy file to make this directory a package.
    > 
    > Then you need to pay attention to the package path: 
    > 	from myutils import mycooltool
    > or use the package.module notation
    > 
    > But Chris also had an example in that link above.
    > 
    >  - Horst
    > 
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > 
    > On 13 Mar 2003, Bryan Kane (op) wrote:
    > 
    > > Besides tinkering with python on my linux box here at home, I've started using it at work quite a bit.  I use Pythonwin there because I have a win2000 box.
    > > 
    > > I created a directory to hold my scripts.  I do the dir.path.append('...') command to include my directory in the system path.  But when I shut down the Pythonwin application and restart it, it doesn't show my new directory in the sys.path.  Is there something I'm missing?  How can I do sys.path.append('') and have it stick?
    > > 
    > > bryan
    > > 
    > > 
    > > -- 
    > > Bryan Kane (op) <r_bryan_kane at operamail.com>
    > > 
    > > _______________________________________________
    > > Think mailing list
    > > Think at zoneverte.org
    > > http://mail.zoneverte.org/cgi-bin/listinfo/think
    > > 
    > 
    > _______________________________________________
    > Think mailing list
    > Think at zoneverte.org
    > http://mail.zoneverte.org/cgi-bin/listinfo/think
    -- 
    Bryan Kane <r_bryan_kane at myrealbox.com>
    -- 
    Bryan Kane (op) <r_bryan_kane at operamail.com>
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] Re: [Think]



    Ben BarrettTue May 18 20:54:02 PDT 2004

    Chris, howdy -- I am interested, and am still on the laneopensource
    list, unless I have been dropped from it.  I enjoyed the opensourced.org
    website, and am wondering, does the group [only] meet at LCC's main
    campus?  I'm not sure what "Building 1" is, since I haven't been out
    there for years... 
    
    ciao,
    
       Ben B
    
    PS - I noticed I haven't gotten any laneopensource messages since Dec 6,
    can anyone confirm that it's been quiet, or that my sub was dropped?
    thanx.
    
    On Mon, 2003-01-27 at 11:00, chris calise wrote:
    > Speaking of all you Pythoners. Anyone who has taken Chris Meyers class
    > or any class at LCC is welcome to join the 
    > LCC Open Source Educational Group. We are doing fun things, planning
    > an LTSP project, an OS open house with Red Hat door prizes, plus we
    > have a mailing list. 
    >  
    > To subscribe go to: www.opensourced.org or email me at chris at oip.net
    >  
    >  
    > Check us out.
    >  
    No, *you* check *us* out  = ))
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Think] 2 new articles from IBM DeveloperWorks



    Ben BarrettTue May 18 20:54:02 PDT 2004

    these just slid into my inbox...
    (they are both in the "Linux articles" section, incidentally)
    
    Metaclass programming in Python: Pushing object-oriented programming to
    the next level  by David Mertz, Ph.D. and Michele Simionato, Ph.D.
    http://www-106.ibm.com/developerworks/library/l-pymeta.html?ca=dnt-48h
    
    Charming Python: Create declarative mini-languages : Programming as
    assertion rather than instruction  by David Mertz, Ph.D.
    http://www-106.ibm.com/developerworks/library/l-cpdec.html?ca=dnt-48h
    
    
    ciao, enjoy!
      -and see y'all at the last class tonight...
    
    -- 
    Ben Barrett <barrett at counterclaim.com>
    counterclaim
    
    _______________________________________________
    Think mailing list
    Think at zoneverte.org
    http://mail.zoneverte.org/cgi-bin/listinfo/think
    
    
  • [Eug-lug] OS X security vulnerability



    larry a priceTue May 18 20:49:58 PDT 2004

    execute a script from a url
    
    http://bronosky.com/pub/AppleScript.htm
    
    for a demon striation
    
    
    she includes a fix
    
    myself I am wondering if url-encoding the string would fix the issue with
    spaces in the exploit string not being recognised...
    
    ps. this concerns me too since I am getting my laptop back (Yay!)
    
    
  • [Eug-lug] What is EM.euglug_748.txt.zip and why did the list send it?



    larry a priceTue May 18 20:45:53 PDT 2004

    it is a virus spoofing as being from the list,
    
    post the full headers of the viral email and we will know where it came
    from...