Re: copying files through Python

2008-02-15 Thread James Matthews
Basically copying a file is reading a character or string from one file and writing it to the other. On Fri, Feb 15, 2008 at 3:06 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Feb 13, 10:50 pm, Lalit <[EMAIL PROTECTED]> wrote: > > > I need to write a program which would transfer files und

Re: urllib slow on Leopard

2008-02-24 Thread James Matthews
Try running the script when python is running as root. I has issues like this also! On Sun, Feb 24, 2008 at 8:57 PM, mark <[EMAIL PROTECTED]> wrote: > I've recently switched from Ubuntu to OS X Leopard. I have some python > scripts which download info from the web. The scripts were working fine >

Re: Fwd: Problem with threads in python????????

2008-02-27 Thread James Matthews
Yes On Wed, Feb 27, 2008 at 3:56 AM, <[EMAIL PROTECTED]> wrote: > On Feb 26, 7:56 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > En Tue, 26 Feb 2008 01:46:48 -0200, Manikandan R <[EMAIL PROTECTED]> > > > escribió: > > > > > Hai, > > > > > Is it possible to share a single varia

Re: Book Recomendations

2008-03-02 Thread James Matthews
I liked Core Python Programming 2nd edition! On Sun, Mar 2, 2008 at 4:27 PM, Ken Dere <[EMAIL PROTECTED]> wrote: > Ira Solomon wrote: > > > I am an experienced programmer (40 years). I've done Algol (if you've > > heard of that you must be old too), PL/1, VB,VBA, a little C, and a > > few other

Re: template inheritance

2009-01-11 Thread James Matthews
Not always sometimes you want to show some template code (You have a blog about web dev) and sometimes you want to nest some code. On Sun, Jan 11, 2009 at 10:04 PM, Diez B. Roggisch wrote: > Alex K schrieb: > >> While building a website using template inheritance one usually does >> the following

Re: [Web 2.0] Added-value of frameworks?

2009-02-04 Thread James Matthews
They provide a nice framework that will handle most of the annoying things. With Django you don't need to write SQL (in a sense). etc.. On Wed, Feb 4, 2009 at 6:08 PM, Gilles Ganault wrote: > Hello > > If I wanted to build some social web site such as Facebook, what do > frameworks like Django o

Re: simple web app, where to start

2009-02-08 Thread James Matthews
I use Django for all simple apps and it works great! On Sat, Feb 7, 2009 at 6:16 AM, Vincent Davis wrote: > I have a simple script that takes a few input values and returns a csv file > and a few stats. If I wanted to host this on the web how would I. I have no > idea where to begin. If someone c

Re: Rapidshare to Megaupload script

2009-02-14 Thread James Matthews
This can be used as a great guide on writing pythonic code. Don't look at the specific code that is being corrected but look at how the improvements are being presented. I would recommend someone who is learning python read this guide. On Sun, Feb 15, 2009 at 12:17 AM, MRAB wrote: > aiwarrior w

Re: ANN: New Book: Programming in Python 3

2008-12-04 Thread James Matthews
I am going to be checking Amazon now and ordering the book. Thanks James On Thu, Dec 4, 2008 at 9:42 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > Mark Summerfield wrote: > >> "Programming in Python 3: >> A Complete Introduction to the Python Language" >> ISBN 0137129297 >> http://www.qtrac.eu/p

Re: Why shouldn't you put config options in py files

2008-12-04 Thread James Matthews
I am going to have to agree with your colleague. I use Django a lot and you are editing config.py and urls.py which are all python code. On Thu, Dec 4, 2008 at 10:30 PM, Bruno Desthuilliers < [EMAIL PROTECTED]> wrote: > HT a écrit : > >> A colleague of mine is arguing that since it is easy to wri

Re: python is great

2009-01-06 Thread James Matthews
I agree but please enlighten us what caused you to say that python is great? On Sat, Jan 3, 2009 at 3:30 PM, Nomen Nescio wrote: > python is great. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://www.astorandblack.com -- http://mail.python.org/mailman/listinfo/python

Re: ANN: Shed Skin 0.1, an experimental (restricted-)Python-to-C++ Compiler

2009-02-23 Thread James Matthews
Nice! I was looking for one of these for a while On Mon, Feb 23, 2009 at 1:54 PM, Mark Dufour wrote: > Hi all, > > I have recently released version 0.1 of Shed Skin, an experimental > (restricted-)Python-to-C++ compiler. > > Please see my blog for more info about the release: > > http://shed-ski

Re: Unix Change Passwd Python CGI

2009-02-24 Thread James Matthews
IMHO That sounds like the biggest security hole I can think of. Anyways you can open a pipe to passwd. to have the change there password. James On Tue, Feb 24, 2009 at 5:19 PM, Derek Tracy wrote: > I am using python version 2.5.1 and need to create a python cgi application > to allow a user to

Re: What functions, other than sleep(), can be interrupted by Ctrl-C?

2009-02-27 Thread James Matthews
You can hook the it on the main thread and just pass it. And let the threads execute. On Thu, Feb 26, 2009 at 10:47 PM, Gabriel Genellina wrote: > En Thu, 26 Feb 2009 16:17:42 -0200, Maxim Khitrov > escribió: > > > I'm looking for a function in the standard library or pywin32 package >> that wi

Re: ANN: updates to Python-by-example

2009-02-28 Thread James Matthews
Thanks for adding this. I needed to show someone some examples... On Fri, Feb 27, 2009 at 5:35 PM, steven.oldner wrote: > On Feb 27, 8:40 am, pyt...@bdurham.com wrote: > > Rainy, > > > > Great stuff! Thanks for your examples with the community!! > > > > Regards, > > Malcolm > > Let me add my than

Re: What's so wrong about execfile?

2009-02-28 Thread James Matthews
It is considered one of the big holes in PHP (Remote file include...) However in Python things can be done securely On Sat, Feb 28, 2009 at 7:15 AM, Carl Banks wrote: > On Feb 27, 7:21 pm, Sammo wrote: > > Given that execfile has been removed in py3k, I want to understand > > exactly why. > > >

Re: Email Program

2009-03-02 Thread James Matthews
You can look at Digsby for an example of an email program. On Mon, Mar 2, 2009 at 8:34 PM, Mike Driscoll wrote: > On Feb 28, 7:56 pm, J wrote: > > Is it possible to make a GUI email program in Python that stores > > emails, composes, ect? Also, could I create my own programming > > language in

Re: Email Program

2009-03-02 Thread James Matthews
There is always the issue of packaging at the end but Python is your programming language. On Mon, Mar 2, 2009 at 10:19 PM, Wayne Cannon wrote: > The Twisted package (http://twistedmatrix.com/) has some examples of > interacting with e-mail servers. Twisted supports interaction between > as

Re: What happened to NASA at Python? :(

2009-03-12 Thread James Matthews
>From what I see most startups are jumping to Python to rapidly setup their prototypes. On Thu, Mar 12, 2009 at 10:38 AM, Mikael Olofsson wrote: > s...@pobox.com wrote: > >> In fact, graphics were added for several organizations. I believe they >> will >> be chosen randomly. NASA is still ther

Re: VMware and pywin32 error...

2009-03-16 Thread James Matthews
The issue seems to be with your windows installation. Try getting another copy etc... There shouldn't be any issues I have tried and used both seamlessly On Mon, Mar 16, 2009 at 7:55 AM, dash dot <""wernermerkl\"@fujitsu(dash) siemens.com"> wrote: > Joshua Kugler schrieb: > >> dot wrote: >> >>> h

Re: PyPy Progress (and Psyco)

2009-03-16 Thread James Matthews
Everything starts out small. I am sure that things will grow if there is a demand for it... On Mon, Mar 16, 2009 at 5:55 AM, JanC wrote: > andrew cooke wrote: > > > Fuzzyman wrote: > >> On Mar 15, 3:46 pm, Gerhard Häring wrote: > > [...] > >>> Me too. I doubt it, though. From an outside view, t

Re: Run on Startup

2009-03-18 Thread James Matthews
You may also add it to the registry or make it a windows service. Both will startup. On Wed, Mar 18, 2009 at 8:09 AM, Gabriel Genellina wrote: > En Tue, 17 Mar 2009 00:16:53 -0200, MRAB > escribió: > >> Ian Mallett wrote: >> >>> I'd like to make a program that automatically runs on startup (rig

Re: read web page that requires javascript on client

2009-03-19 Thread James Matthews
You can try and use wxpythons broswer to execute the javascript On Wed, Mar 18, 2009 at 10:01 PM, Greg wrote: > Hello all, I've been trying to find a way to fetch and read a web page > that requires javascript on the client side and it seems impossible. > I've read several threads in this group

Re: getting linux distro used...

2009-04-27 Thread James Matthews
You can always pipe the information for the command line. On Mon, Apr 27, 2009 at 8:59 AM, David Lyon wrote: > > perphaps platform.uname()? > > On Sun, 26 Apr 2009 22:35:29 -0700 (PDT), deostroll > wrote: > > Hi, > > > > I just found that you could use platform.system() to get the > > underlying

Re: Concurrency Email List

2009-05-17 Thread James Matthews
I second this. Google groups are annoying! Just request that it be added to python.org James On Sun, May 17, 2009 at 12:22 PM, David M. Besonen wrote: > On 5/16/2009 5:26 PM, Aahz wrote: > > > On Sat, May 16, 2009, Pete wrote: > > > >> python-concurre...@googlegroups.com is a new email list > >

Re: Your Favorite Python Book

2009-05-17 Thread James Matthews
For me it's any book on Django, Core Python 2nd Edition (which I will buy if updated) and Python Power. On Fri, May 15, 2009 at 7:05 PM, Lou Pecora wrote: > In article > , > Mike Driscoll wrote: > > > On May 11, 4:45 pm, Chris Rebert wrote: > > > > > > > I like "Python in a Nutshell" as a re

Re: Generic web parser

2009-05-17 Thread James Matthews
I don't see the issue of using urllib and Sqllite for everything you mention here. On Sat, May 16, 2009 at 4:18 PM, S.Selvam wrote: > Hi all, > > I have to design web parser which will visit the given list of websites and > need to fetch a particular set of details. > It has to be so generic tha

Fwd: [python-win32] Fwd: Autosizing column widths in Excel using win32com.client ?

2009-05-17 Thread James Matthews
-- Forwarded message -- From: Tim Golden Date: Sun, May 17, 2009 at 1:00 PM Subject: Re: [python-win32] Fwd: Autosizing column widths in Excel using win32com.client ? To: Cc: Python-Win32 List James Matthews wrote: > -- Forwarded message -- > From: >

Re: Advanced Python books?

2009-05-19 Thread James Matthews
I found Core Python Programming to cater to my needs as a Pro book. On Tue, May 19, 2009 at 6:48 PM, Thomas Guettler wrote: > kj schrieb: > > I have read a couple of "learn Python"-type books, and now I'm > > looking for some more advanced books on Python, > ... > > Basically I'm looking for a b

Re: How to get Form values in Python code and Send Email

2009-05-20 Thread James Matthews
Why don't you use Django? If you get the form information from Django you can send an email using the send_mail (or even if you don't you can still import the function. On Wed, May 20, 2009 at 8:52 AM, Kalyan Chakravarthy < kalyanchakravar...@hyit.com> wrote: > Hi All, > > I have one doubt,

Re: URGENT! Changing IE PAC Settings with Python

2009-05-20 Thread James Matthews
HI forwarded it to the Python Win32 list On Thu, May 21, 2009 at 12:11 AM, Tim Golden wrote: > K-Dawg wrote: > >> Thanks for any response. I am in a crisis where one of our networking >> guys >> moved where our PAC file is housed. There was a group policy set in >> Active >> Directory that set

Re: Hello,who can help me!

2008-07-22 Thread James Matthews
I would recommended on asking on the pywin32 mailing list. On Tue, Jul 22, 2008 at 2:26 AM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > I have implemented a C++ COM,which contains two interface in one > > coclass. > > when i use this COM in python: > > dll=win32co

Re: Python for Blackberry mobile phones

2008-08-11 Thread James Matthews
It would be also nice to see python on an iPhone On Mon, Aug 11, 2008 at 8:29 AM, Timothy Grant <[EMAIL PROTECTED]>wrote: > On Sun, Aug 10, 2008 at 9:54 PM, <[EMAIL PROTECTED]> wrote: > > I'm looking for a version of Python for Blackberry mobile phones - has > > anyone heard of such a thing? I'v

Re: Prevalent Python/Django academic software

2008-08-20 Thread James Matthews
I have sent this to the Django Mailing list so you can get it from two sources On Wed, Aug 20, 2008 at 9:07 PM, Daniel Bickett <[EMAIL PROTECTED]> wrote: > Is anyone working on any software at present, using django or python > in general, which serves various academic/course functions, or else >

Re: How to make xss safe strings

2008-08-20 Thread James Matthews
If you are using a framework there should be a urlencode feature within the framework. On Wed, Aug 20, 2008 at 8:58 PM, Dan Bishop <[EMAIL PROTECTED]> wrote: > On Aug 20, 10:10 pm, Roopesh <[EMAIL PROTECTED]> wrote: > > Hi, > > > > How can I make a string XSS safe? Will > > simply .replace('<','<

Re: Storing Passwords

2008-08-20 Thread James Matthews
Try using a salted SHA1 Hash On Wed, Aug 20, 2008 at 7:39 PM, Paul Rubin <"http://phr.cx"@nospam.invalid>wrote: > Paul Rubin writes: > > AF_UNIX sockets under Linux support these > > operations but I think the standard Python socket module > > currently d

Re: TRying to read sercah results from googles web page

2008-08-20 Thread James Matthews
I use this code. import urllib2 def urlopen(url): request = urllib2.Request(url) opener = urllib2.build_opener() request.add_header('User-Agent','Mozilla/5.0 (compatible;JewelersLoungeBot/1.0)') web_page = opener.open(request) return web_page On Wed, Aug 20, 2008 at 6:58 AM,

Re: Read PDF content

2008-08-21 Thread James Matthews
You can also use pdflib http://www.pdflib.com/download/pdflib-family/pdflib-7/ On Thu, Aug 21, 2008 at 6:47 AM, William Purcell <[EMAIL PROTECTED]>wrote: > Sorry, this last email was meant to be to the list. > > On Thu, Aug 21, 2008 at 8:41 AM, William Purcell < > [EMAIL PROTECTED]> wrote: > >> I

Re: Python one-liner??

2008-08-22 Thread James Matthews
What i use them for is to test for packages. e.g python -c "import django" On Fri, Aug 22, 2008 at 2:03 PM, Matimus <[EMAIL PROTECTED]> wrote: > > Do we have python one-liner like perl one-liner 'perl -e'?? > > > The answer is python -c... > > but python -h is useful too. > > Matt > -- > http://

Re: Interrupt python thread

2008-08-24 Thread James Matthews
Group all the threads in a list and call the stop method on all of them. On Sun, Aug 24, 2008 at 1:48 AM, BlueBird <[EMAIL PROTECTED]> wrote: > Hi, > > I have a program with a master thread and several slave threads. > > Whenever an exception occurs, in the master thread or in one of the > slave

Re: Interrupt python thread

2008-08-24 Thread James Matthews
def __stop(self): self.__block.acquire() self.__stopped = True self.__block.notifyAll() self.__block.release() On Sun, Aug 24, 2008 at 11:59 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote: > James Matthews wrote: > > Group all the threads in a li

Re: What's your first choice if you have to write a C module for python?

2008-08-26 Thread James Matthews
ctypes and swig for me On Tue, Aug 26, 2008 at 9:04 AM, Ulrich Eckhardt <[EMAIL PROTECTED]>wrote: > 一首诗 wrote: > > I read this interesting post comparing Boost.Python with Pyd: > > > > http://pyd.dsource.org/vsboost.html > > > > What's your opinion about it? > > > > What's your first choice when

Re: GUI programming with python

2008-08-26 Thread James Matthews
wxPython is a very rich toolkit it includes a nice GUI bulider and you can also try an IDE called Boa On Tue, Aug 26, 2008 at 10:49 AM, John Fabiani <[EMAIL PROTECTED]> wrote: > Alan Franzoni wrote: > > > zamil was kind enough to say: > > > > [cut] > > > > If your needs are very basic, you can st

Renaming Excel Spreadsheets

2008-08-26 Thread James Matthews
-- Forwarded message -- From: Waldemar Osuch <[EMAIL PROTECTED]> Date: Tue, Aug 26, 2008 at 7:59 PM Subject: Re: [python-win32] Fwd: Renaming Excel Spreadsheets To: Python-Win32 List <[EMAIL PROTECTED]> On Tue, Aug 26, 2008 at 12:57 PM, James Matthews <[EMAIL PR

Re: Books about Python.

2008-08-27 Thread James Matthews
I really liked Core python programming 2nd edition On Wed, Aug 27, 2008 at 9:49 AM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : >> >> I'm up to write a 20-30 research paper for my computer science course, >> and I was considering choosing to do mine on Python. I w

Re: eval() == evil? --- How to use it safely?

2008-08-28 Thread James Matthews
I had an issue once that i was getting true and false statements in text and needed to convert them into Python boolean objects. So i wrote a function to parse the text. and return True or False based on the text. On Thu, Aug 28, 2008 at 3:09 PM, Guilherme Polo <[EMAIL PROTECTED]> wrote: > On Thu

Re: Learning Python

2008-09-08 Thread James Matthews
I like two 1. www.diveintopython.com and 2. Core Python Programming. On Mon, Sep 8, 2008 at 6:15 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On 9/6/2008 5:17 AM James Pilling apparently wrote: > >> Hi im currently starting to learn python in sixth form at school any tips? >> > > The books sugge

Re: locks

2008-09-17 Thread James Matthews
You might also want to paste the output into a pastbin such as dpaste.com On Wed, Sep 17, 2008 at 10:58 AM, <[EMAIL PROTECTED]> wrote: > >kalin> mailman has been locking one list out. the web interface just >kalin> hangs and it generates a bunch of locks. it seems that it can not >ka

TCP Server

2008-09-18 Thread James Matthews
Dear List, I am looking to write a TCP socket server and was wondering what are the pros and cons of using twisted over the sockets modules bundled in python? Thanks James -- http://www.goldwatches.com/ -- http://mail.python.org/mailman/listinfo/python-list

Twisted vs Python Sockets

2008-09-18 Thread James Matthews
Hi I am wondering what are the major points of twisted over regular python sockets. I am looking to write a TCP server and want to know the pros can cons of using one over the other. Thanks James -- http://www.goldwatches.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow?

2008-09-26 Thread James Matthews
+1 QOTW... On Tue, Sep 23, 2008 at 7:13 AM, George Sakkis <[EMAIL PROTECTED]>wrote: > On Sep 23, 9:57 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2008-09-23, sturlamolden <[EMAIL PROTECTED]> wrote: > > > > [...] > > > > > After having a working Python prototype, I resorted to rewrite th

Re: Web programming in Python.

2008-09-28 Thread James Matthews
If you are considering using a framework try Django. I enjoy using it! On Sun, Sep 28, 2008 at 6:40 PM, Michael Crute <[EMAIL PROTECTED]> wrote: > On Sun, Sep 28, 2008 at 6:39 PM, Kurda Yon <[EMAIL PROTECTED]> wrote: > > I am totaly newbie in the Python's web programming. So, I dont even > > know

Re: Interesting Problem

2010-01-20 Thread James Matthews
Also as a side point... It's best to anonymize the code as best you can so people cannot attach your code to your site (IP theft and security risk) On Wed, Jan 20, 2010 at 8:38 AM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> I think I finally have an interesting problem for y'all. I need to

Re: Python book

2009-09-30 Thread James Matthews
I like core python programming and dive into python. On Wed, Sep 30, 2009 at 11:57 AM, Patrick Sabin wrote: > My favorite book is "Python Essential Reference" from David M. Beazley. > It is not a beginner book. It is about the python language and not about a > framework or third-party library. I

Re: python-apache configuration

2009-10-13 Thread James Matthews
You need to load mod_python and read the docs (or you can use CGI and make sure apache owns the file) On Tue, Oct 13, 2009 at 3:55 PM, Bhanu Mangipudi wrote: > Hi, >> >> I am new to python I have few questions regarding configuring apache with >> python. > > > I have a hello_world.py file in

Re: Profiling python on OSX?

2009-10-13 Thread James Matthews
You can use valgrind and attach it to python (in which you recompile python for it...) On Mon, Oct 12, 2009 at 9:51 PM, nitroamos wrote: > Hello -- > > I'm a python noob, so I'm trying to figure out how to get access to > the same data I'm used to from gprof, if possible. I was able to get > cPy

Re: Why is python so sad?

2009-10-14 Thread James Matthews
This posting just made my day! On Wed, Oct 14, 2009 at 2:59 PM, Dotan Cohen wrote: > > ;-) > > > > Be careful, that looks dangerously close to PHP: > function(); > > > -- > Dotan Cohen > > http://what-is-what.com > http://gibberish.co.il > -- > http://mail.python.org/mailman/listinfo/python-list

Re: python performance on Solaris

2009-10-14 Thread James Matthews
I use python in almost the same environment. I use it on Joyent and on the Rackspace cloud. Joyent is faster for a few reasons (cpu bursting and faster disks) but these aren't real benchmarks until they are on the same machines. James On Wed, Oct 14, 2009 at 9:59 AM, Jorgen Grahn > wrote: > On

Re: Have you embraced Python 3.x yet?

2010-03-28 Thread James Matthews
I am still on py 2.6 and since my code is heavy model dependent. I am bound to the most critical ones. Although I would really like if someone could backport some new stuff done with the GIL on 3.2 (they had a nice talk about it at PyCon) On Fri, Mar 26, 2010 at 5:33 PM, geremy condra wrote: > O

Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread James Matthews
I like this, I am going to run this as a test. I also want to see the source code on how they compile the dynamic variables. On Mon, Jul 20, 2009 at 10:20 PM, srepmub wrote: > > > Nice timings, can you please show me the Python, Java and C code > > versions? I may do more tests. > > also, which

Image merging

2009-07-30 Thread James Matthews
Hi, I need to create an app that takes to images and mergers them. After googling around I have found 4 graphic library's that I can use. However since I am new to "image programming" can you please tell me which one you think would be the best. The ones I found were cairographics PIL Imagemagic

Re: How to read webpage

2009-08-01 Thread James Matthews
Check your connection to the internet. On Sat, Aug 1, 2009 at 6:43 PM, Marcus Wanner wrote: > On 8/1/2009 11:31 AM, Jon Clements wrote: > >> On 1 Aug, 14:52, MRAB wrote: >> >>> tarun wrote: >>> Dear All, I want to read a webpage and copy the contents of it in word file. I tried t

Default python compile options

2010-09-14 Thread James Matthews
Hi, I am trying to compile Python 2.7 on Ubuntu and I am wondering what are the default compile options (i.e ./configure ..) for ubuntu. I just want the standard ones that are included with the python2.6 version on ubuntu. Can someone please shed some light? Thanks, James -- http://www.goldwatc

Re: Default python compile options

2010-09-14 Thread James Matthews
Wed, Sep 15, 2010 at 7:25 AM, James Matthews > wrote: > > I am trying to compile Python 2.7 on Ubuntu and I am wondering what are > the > > default compile options (i.e ./configure ..) for ubuntu. I just want the > > standard ones that are included with the python2.6 version o

Weird try-except vs if behavior

2010-10-14 Thread James Matthews
Hi, I have this code http://gist.github.com/627687 (I don't like pasting code into the mailing list). I am wondering why the try except is taking longer. I assume that if the IF statement checks every iteration of the loop (1000 times) shouldn't it be slower? James -- http://www.goldwatches.co

<    1   2