Re: web hosting, first hand experiences?

2011-07-03 Thread Alan Harris-Reid
a huge amount about Python web applications. Nothing seems to be too much trouble for them. They also provide a 60-day money-back guarantee, so you can try-before-you-buy. Best wishes, Alan Harris-Reid -- http

Re: py to exe converter

2011-03-21 Thread Alan Harris-Reid
On 19:59, PATRICIA MEDINA wrote: I know there is a converter for python 2.x to executable file, but is there one for python 3.x yet? I use cx_Freeze without any problems (//cx-freeze.sourceforge.net/) HTH Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: py to exe converter

2011-03-21 Thread Alan Harris-Reid
://www.py2exe.org/ ~/santa On Mon, Mar 21, 2011 at 11:06 AM, Alan Harris-Reid a...@baselinedata.co.uk mailto:a...@baselinedata.co.uk wrote: On 19:59, PATRICIA MEDINA wrote: I know there is a converter for python 2.x to executable file, but is there one for python 3.x yet? I use cx_Freeze

Re: Career path - where next?

2011-01-17 Thread Alan Harris-Reid
Hi Fred, thanks for the reply. I have already contacted old clients (those that are still in business), but unfortunately they have either gone the 'off the shelf' route (ie. don't use bespoke software any more), or moved-over to .NET, which is a route which I don't want to follow. Still,

Re: Career path - where next?

2011-01-15 Thread Alan Harris-Reid
To all those who answered my original post so far (Jon Clements, Terry Jan Reedy, Philip Semanchuk) - many thanks. Your suggestions have given me a number of avenues to follow. I'll let you know how I get on. Regards, Alan -- http://mail.python.org/mailman/listinfo/python-list

Career path - where next?

2011-01-12 Thread Alan Harris-Reid
for any advice. Regards, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Framework design question

2010-12-05 Thread Alan Harris-Reid
Hi, When committing data that has originally come from a webpage, sometimes data has to be converted to a data type or format which is suitable for the back-end database. For instance, a date in 'dd/mm/' format needs to be converted to a Python date-object or '-mm-dd' in order to

Re: SQLite date fields

2010-11-26 Thread Alan Harris-Reid
To all those who have replied on this thread - many thanks. It looks as though I've got to look further into date objects, SQLite's native date functions, detect_types, etc.. Regards, Alan -- http://mail.python.org/mailman/listinfo/python-list

SQLite date fields

2010-11-24 Thread Alan Harris-Reid
Hi, I am having design problems with date storage/retrieval using Python and SQLite. I understand that a SQLite date column stores dates as text in ISO format (ie. '2010-05-25'). So when I display a British date (eg. on a web-page) I convert the date using

Re: Compare source code

2010-10-31 Thread Alan Harris-Reid
Hi jf, I use Beyond Compare (by Scooter Software) for comparing text files and find it an indespensible tool. You can configure it so that it ignores tabs/whitespace, or treats spaces and tabs as different characters. Not sure if it will work with compiled .pyc files, though (but then you

Removing anti-Jewish postings from Python list

2010-06-16 Thread Alan Harris-Reid
Any idea how we get rid of this 'noise'? Will it eventually go away if we ignore it, or is there anything the moderators can do to clean-up this (normally) wonderful resource for Python programmers? Regards, Alan -- http://mail.python.org/mailman/listinfo/python-list

Binary file email attachment problem

2010-05-09 Thread Alan Harris-Reid
Hi there, Using Python 3.1.2 I am having a problem sending binary attachment files (jpeg, pdf, etc.) - MIMEText attachments work fine. The code in question is as follows... for file in self.attachments: part = MIMEBase('application', octet-stream) part.set_payload(open(file,rb).read())

Email attachment problem

2010-04-29 Thread Alan Harris-Reid
a None value. (Traceback shows 'NoneType' object has no attribute 'get_content_maintype' in line 118 of _dispatch in generator.py, many levels down from msg.as_string()) Has anyone any idea what the cause of the problem might be? Any help would be appreciated. Alan Harris-Reid -- http

Re: Email attachment problem

2010-04-29 Thread Alan Harris-Reid
Chris Rebert wrote: On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid aharrisr...@googlemail.com wrote: Hi there, I want to send an email with an attachment using the following code (running under Python 3.1, greatly simplified to show example) from email.mime.multipart import

Re: Re: Code redundancy

2010-04-21 Thread Alan Harris-Reid
Andreas Löscher wrote: You can do something like this: class A(): pass inst=) exec( ... a= ... b=2 ... c=3 ... d=4 ... ) in inst.__dict__ inst.a 1 This executes the Statement in the exec function and uses inst.__dict__ as namespace. But be aware, that this is

Re: Code redundancy

2010-04-21 Thread Alan Harris-Reid
Ryan Kelly wrote: On Tue, 2010-04-20 at 14:43 +0100, Alan Harris-Reid wrote: Hi, During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = 1 class1.attr2 = 2 class1.attr3 = 3 class1.attr4 = 4 etc. Is there any way to achieve the same result

Code redundancy

2010-04-20 Thread Alan Harris-Reid
language was Visual Foxpro, which had the syntax... with class1 .attr1 = 1 .attr2 = 2 .attr3 = 3 .attr4 = 4 etc. endwith Is there any equivalent to this in Python? Any help would be appreciated. Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Jean-Michel Pichavant wrote: Alan Harris-Reid wrote: Hi, During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = 1 class1.attr2 = 2 class1.attr3 = 3 class1.attr4 = 4 etc. Is there any way to achieve the same result without having to repeat

Re: Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Peter Otten wrote: Alan Harris-Reid wrote: Hi, During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = 1 class1.attr2 = 2 class1.attr3 = 3 class1.attr4 = 4 etc. Is there any way to achieve the same result without having to repeat the class1

Re: Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Iain King wrote: On Apr 20, 2:43 pm, Alan Harris-Reid aharrisr...@googlemail.com wrote: Hi, During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = class1.attr2 = class1.attr3 = class1.attr4 = etc. Is there any way to achieve the same result

Re: Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Stefan Behnel wrote: div class=moz-text-flowedAlan Harris-Reid, 20.04.2010 15:43: During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = 1 class1.attr2 = 2 class1.attr3 = 3 class1.attr4 = 4 etc. Is there any way to achieve the same result

Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Xavier Ho wrote: On Wed, Apr 21, 2010 at 7:59 AM, Alan Harris-Reid aharrisr...@googlemail.com mailto:aharrisr...@googlemail.com wrote: The code is not usually in class.__init__ (otherwise I would have used the self. prefix) Alan, if your variables are not usually in __init__, what's

Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Chris Rebert wrote: On Tue, Apr 20, 2010 at 2:59 PM, Alan Harris-Reid aharrisr...@googlemail.com wrote: Stefan Behnel wrote: Alan Harris-Reid, 20.04.2010 15:43: During my Python (3.1) programming I often find myself having to repeat code such as... class1.attr1 = 1 class1

Re: Code redundancy

2010-04-20 Thread Alan Harris-Reid
Ethan Furman wrote: Alan Harris-Reid wrote: The code is not usually in class.__init__ (otherwise I would have used the self. prefix), but I like your self.__dict__.update(...) solution and I'll try and remember it. The code I was thinking of goes something like as follows (don't have

Re: Re: Super() function

2010-03-27 Thread Alan Harris-Reid
³p wrote: Hi: On 25 March 2010 11:17, Alan Harris-Reid aharrisr...@googlemail.com mailto:aharrisr...@googlemail.com wrote: Hi, Using Python 3.1, I sometimes use the super() function to call the equivalent method from a parent class, for example def mymethod(self

Re: Re: Super() function

2010-03-27 Thread Alan Harris-Reid
Gabriel Genellina wrote: div class=moz-text-flowedEn Thu, 25 Mar 2010 00:17:52 -0300, Alan Harris-Reid aharrisr...@googlemail.com escribió: Using Python 3.1, I sometimes use the super() function to call the equivalent method from a parent class, for example def mymethod(self): super

Super() function

2010-03-24 Thread Alan Harris-Reid
Hi, Using Python 3.1, I sometimes use the super() function to call the equivalent method from a parent class, for example def mymethod(self): super().mymethod() some more code... Is there any way of writing the code so that the super() call is generic and automatically recognises the

Re: Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Alan Harris-Reid
gorauskas wrote: I installed it on a Windows 7 machine with CPython 2.6.4 and I get the following error: Traceback (most recent call last): File dreampie.py, line 3, in module File dreampielib\gui\__init__.pyc, line 73, in module File dreampielib\gui\load_pygtk.pyc, line 49, in load_pygtk

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Alan Harris-Reid
Chris Colbert wrote: Do you have gtk and PyGTK installed? Sounds like a missing dependency to me. On Tue, Feb 23, 2010 at 6:56 AM, Alan Harris-Reid aharrisr...@googlemail.com mailto:aharrisr...@googlemail.com wrote: gorauskas wrote: I installed it on a Windows 7 machine

Re: Editor for Python

2010-02-05 Thread Alan Harris-Reid
Hi Laszlo, I use Wing IDE (not free, $35 for personal edition) and PyScripter (free). I find both good, for different reasons. Regards, Alan Laszlo Nagy wrote: Hi All, I know that this question was put up on

Re: Passing parameters in URL

2010-02-04 Thread Alan Harris-Reid
Many thanks to all those who replied to my question and clearing-up the differences between GET and POST. I think I know what to do now - if not, I'll be back :-) Regards, Alan -- http://mail.python.org/mailman/listinfo/python-list

Passing parameters in URL

2010-02-03 Thread Alan Harris-Reid
currently using CherryPy 3.2, but I guess the theory could apply to any HTTP framework or web app.. Any help would be appreciated. Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading issue with SQLite

2010-02-02 Thread Alan Harris-Reid
Many thanks to all who replied to my questions re. SQLite connections, cursors and threading. Looks like I have got some reading to do regarding connection pooling and a decent SQLite ORM package. Does anyone know of any which are Python 3 compatible? Many thanks, Alanj --

Threading issue with SQLite

2010-01-29 Thread Alan Harris-Reid
that idea completely?) 3. When a method returns to the calling method, is the connection automatically closed (assuming the object is local, of course) or does it have to be done explicitly using connection.close()? TIA, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3's adoption

2010-01-26 Thread Alan Harris-Reid
other people are using Python 3, and with what compatible packages. Regards, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic HTML controls

2010-01-21 Thread Alan Harris-Reid
Aahz wrote: In article mailman.820.1263266822.28905.python-l...@python.org, Alan Harris-Reid aharrisr...@googlemail.com wrote: Does anyone know where I can find any decent dynamically-constructed HTML control classes (dropdown list, table, input field, checkbox, etc.) written in Python

Re: Dynamic HTML controls

2010-01-14 Thread Alan Harris-Reid
Pierre Quentel wrote: On 12 jan, 04:26, Alan Harris-Reid aharrisr...@googlemail.com wrote: Hi, Does anyone know where I can find any decent dynamically-constructed HTML control classes (dropdown list, table, input field, checkbox, etc.) written in Python. For example, for a HTML table I

Re: Dynamic HTML controls

2010-01-12 Thread Alan Harris-Reid
alex23 wrote: On Jan 12, 1:26 pm, Alan Harris-Reid aharrisr...@googlemail.com wrote: Does anyone know where I can find any decent dynamically-constructed HTML control classes (dropdown list, table, input field, checkbox, etc.) written in Python. There's pyWeb[1], which seems pretty

Dynamic HTML controls

2010-01-11 Thread Alan Harris-Reid
mind writing my own classes (it will be good practice for me), but I don't want to re-invent the wheel if it can be avoided. TIA, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Marco Salden wrote: On Dec 30, 8:13 pm, Alan Harris-Reid a...@baselinedata.co.uk wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist anywhere (although python31

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Gabriel Genellina wrote: div class=moz-text-flowedEn Thu, 31 Dec 2009 04:31:06 -0300, Marco Salden marco.sal...@gmail.com escribió: On Dec 30, 8:13 pm, Alan Harris-Reid a...@baselinedata.co.uk wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following

Sys.path entries

2009-12-30 Thread Alan Harris-Reid
PyConfig.h - is this read every time I start Python.exe? Many thanks, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: String prefix question

2009-11-09 Thread Alan Harris-Reid
Gerard Flanagan wrote: div class=moz-text-flowedAlan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status ='200 OK' # HTTP Status

Re: Re: String prefix question

2009-11-09 Thread Alan Harris-Reid
Benjamin Kaplan wrote: On Sun, Nov 8, 2009 at 9:38 PM, Alan Harris-Reid a...@baselinedata.co.uk wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple Hello World WSGI application which includes the following method... def hello_world_app(environ, start_response

String prefix question

2009-11-08 Thread Alan Harris-Reid
In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status = b'200 OK' # HTTP Status headers = [(b'Content-type', b'text/plain; charset=utf-8')] # HTTP Headers

Re: Web development with Python 3.1

2009-11-07 Thread Alan Harris-Reid
mario ruggier wrote: With respect to to original question regarding web frameworks + database and Python 3, all the following have been available for Python 3 since the day Python 3.0 was released: QP, a Web Framework http://pypi.python.org/pypi/qp/ Durus, a Python Object Database (the

Re: Re: Web development with Python 3.1

2009-10-28 Thread Alan Harris-Reid
John Nagle wrote: div class=moz-text-flowedAlan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a data-based web site

Re: Web development with Python 3.1

2009-10-28 Thread Alan Harris-Reid
Martin v. Löwis wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting don't - start with 2.6), but as far as I can see, none of the popular python-to-web frameworks (Django, CherryPy,

Re: Web development with Python 3.1

2009-10-27 Thread Alan Harris-Reid
Aaron Watters wrote: On Oct 25, 7:52 pm, Alan Harris-Reid a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting don't - start with 2.6), but as far as I can see

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Exarkun - thanks for the reply don't - start with 2.6 Thought you might say that ;-) Regards, Alan On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
Anyway, for simple web programming, frameworks are not worth the hassle. Just use the cgi module. I can vouch for what Paul says. I started in Python 3 years ago, and I did so with a web application (still working on it!). I'm using the cgi approach, and it certainly teaches you

Re: Web development with Python 3.1

2009-10-26 Thread Alan Harris-Reid
I might have to review that decision, but what I've learned so far is pretty simple stuff, so it won't be wasted. Regards, Alan Alan Harris-Reid a...@baselinedata.co.uk writes: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting

Web development with Python 3.1

2009-10-25 Thread Alan Harris-Reid
I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 (I can hear many of you shouting don't - start with 2.6), but as far as I can see, none of the popular python-to-web frameworks (Django, CherryPy, web.py, etc.) are Python3