Source code to identify user through browser?

2013-06-05 Thread Gilles
Hello I was wondering if some Python module were available to identify a user through their browser, like it's done on the Panopticlick site: http://panopticlick.eff.org/ I'd like to ban abusive users, and it seems like a good solution, since few users will think of installing a different browse

Simple Python script as SMTP server for outgoing e-mails?

2013-07-21 Thread Gilles
Hello Every once in a while, my ISP's SMTP server refuses to send perfectly legit e-mails because it considers them as SPAM. So I'd like to install a dead-simple SMTP server on my XP computer just to act as SMTP backup server. All I'd need is to change the SMTP address in my e-mail client

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-21 Thread Gilles
On Mon, 22 Jul 2013 00:48:29 +1000, Chris Angelico wrote: >Rather than write something from scratch, I'd look at deploying >something out-of-the-box - Postfix, for instance - which you will be >able to configure much faster than writing your own. And then you >could have it either send via your IS

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-21 Thread Gilles
On Sun, 21 Jul 2013 11:46:52 -0600, Michael Torrie wrote: >What you're looking for is not an SMTP server but a Mail Transfer Agent, >called an MTA. > >Pretty much all distros ship with an MTA by default, even if the SMTP >server part of it isn't installed or running. And often the MTA is, for >com

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-22 Thread Gilles
On Sun, 21 Jul 2013 18:28:27 -0600, Michael Torrie wrote: >The Sendmail MTA has been ported to many platforms including windows. >But... Thanks for the tip. Since I couldn't find a good, basic, native Windows app, I was indeed about to look at eg. Exim + Cygwin, and resort to a Linux appliance if

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-22 Thread Gilles
On Sun, 21 Jul 2013 21:01:09 + (UTC), Grant Edwards wrote: >Unless you've got a static IP address, a domain name, and a valid MX >record that will match up when they do a reverse DNS lookup, it's >pretty unlikely that you're going to have much luck running an SMTP >server. Most other SMTP se

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-22 Thread Gilles
On Sun, 21 Jul 2013 21:01:09 + (UTC), Grant Edwards wrote: >Unless you've got a static IP address, a domain name, and a valid MX >record that will match up when they do a reverse DNS lookup, it's >pretty unlikely that you're going to have much luck running an SMTP >server. Most other SMTP ser

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-22 Thread Gilles
On Mon, 22 Jul 2013 22:29:42 +1000, Chris Angelico wrote: >One thing to check when you change how you send mail is your SPF >record. I run the mail server for kepl.com.au and have set its SPF to: > >"v=spf1 ip4:122.107.147.136 ip4:203.214.67.43 ip4:192.168.0.0/16 -all" > >If your SPF is as strict

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-23 Thread Gilles
On Mon, 22 Jul 2013 08:54:11 -0400, "Eric S. Johansson" wrote: >try http://emailrelay.sourceforge.net/ Thanks. I did find it, but it says it's not a full MTA: "E-MailRelay is not a routing MTA. It forwards e-mail to a pre-configured SMTP server, regardless of any message addressing or DNS redire

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-23 Thread Gilles
On Mon, 22 Jul 2013 08:10:10 -0600, Michael Torrie wrote: >Where did you look? Here's one I found. It's not the real sendmail >program, but it implements the interface which is all you need: > >http://glob.com.au/sendmail/ > >I just googled for sendmail win32 Thanks, but I need an MTA, not just

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-23 Thread Gilles
On Mon, 22 Jul 2013 10:14:15 -0400, Kevin Walzer wrote: >http://www.hmailserver.com Thanks. hMailServer was one of the apps I checked, and I was just making sure there weren't something simpler, considering my needs, ideally something like Mongoose MTA. Regardless, because of the SPAM anti-measu

Re: [newbie] Equivalent to PHP?

2012-06-21 Thread Gilles
On Tue, 12 Jun 2012 11:39:50 +0200, Gilles wrote: >I'm an amateur programmer, and would like to know what the main >options are to build web applications in Python instead of PHP. When I need to host my Python application (preferably in Europe since my users will be located there), w

Re: [newbie] Equivalent to PHP?

2012-06-21 Thread Gilles
On Thu, 21 Jun 2012 10:44:08 -0700, Paul Rubin wrote: >There are both kinds. The first kind is called a Virtual Private Server >(VPS). The second kind is called shared hosting. Thanks much for the infos. -- http://mail.python.org/mailman/listinfo/python-list

Using a CMS for small site?

2012-07-04 Thread Gilles
Hello Someone I know with no computer knowledge has a studio appartment to rent in Paris and spent four months building a small site in Joomla to find short-time renters. The site is just... - a few web pages that include text (in four languages) and pictures displayed in a Flash slide show - a c

Re: Using a CMS for small site?

2012-07-04 Thread Gilles
On Wed, 04 Jul 2012 06:28:09 -0400, Roy Smith wrote: >You probably want to look at https://www.django-cms.org/. It's not >something that a person with "no computer knowledge" could set up, but >once it's set up, that person could use it to build pages. > >But, to be honest, for somebody who rea

Re: Using a CMS for small site?

2012-07-04 Thread Gilles
On Wed, 04 Jul 2012 11:21:42 -0400, Roy Smith wrote: >This is really getting quite far afield for a Python group. There are >better forums for these kinds of questions. Probably. I'll keep that in mind while checking Python web frameworks. Thanks. -- http://mail.python.org/mailman/listinfo/pyt

Re: Using a CMS for small site?

2012-07-05 Thread Gilles
On Wed, 4 Jul 2012 17:09:40 -0700 (PDT), alex23 wrote: >Not necessarily! There are several static site generators written in >Python :) > >One that I see being updating a lot is Nikola: http://nikola.ralsina.com.ar/ I'll check it out, thanks. -- http://mail.python.org/mailman/listinfo/python-lis

Re: Using a CMS for small site?

2012-07-05 Thread Gilles
On Thu, 05 Jul 2012 10:27:40 +0200, Dieter Maurer wrote: >There is also "Plone" ("http://plone.org";) -- easy to set up. > >You likely need third party extensions for the "anti-SPAM" support >and the onlie payment. I'll see what extensions it offers. Thanks. -- http://mail.python.org/mailman/lis

Running Python web apps on shared ASO servers?

2012-08-11 Thread Gilles
Hello I use A Small Orange (ASO) as my web provider. Asking the question in their forum so far didn't work, so I figured I might have a faster answer by asking here. Support replied this in an old thread: "Just a CGI option. We don't have enough users to justify adding mod_python support." http:/

Re: Running Python web apps on shared ASO servers?

2012-08-12 Thread Gilles
On Sun, 12 Aug 2012 07:56:26 +0200, Dieter Maurer wrote: >You should probably read the mentioned forum resources to learn >details about the Python support provided by your web site hoster. Yup, but so far, no answer, so I figured someone here might now. Those articles seem to indicate that CGI

Re: Running Python web apps on shared ASO servers?

2012-08-13 Thread Gilles
On Sun, 12 Aug 2012 22:26:19 +0100, Tim Golden wrote: >Just to make a point: one person's "isn't a good solution" is another >person's "works perfectly well for me". Modern servers are really quite >quick: the cost of starting up a Python process and generating an HTML >page can be really quite

Re: Running Python web apps on shared ASO servers?

2012-08-16 Thread Gilles
On Sun, 12 Aug 2012 02:03:33 +0200, Gilles wrote: >Does it mean that ASO only supports writing Python web apps as >long-running processes (CGI, FCGI, WSGI, SCGI) instead of embedded >Python à la PHP? I need to get the big picture about the different solutions to run a Python web ap

[CGI] Why is HTML not rendered?

2012-08-17 Thread Gilles
Hello I'm learning how to call Python scripts through the different solutions available. For some reason, this CGI script that I found on Google displays the contents of the variable but the HTML surrounding it is displayed as-is by the browser instead of being rendered: -- #

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Gilles
On Fri, 17 Aug 2012 14:44:37 +0100, Robert Kern wrote: >> For some reason, this CGI script that I found on Google displays the >> contents of the variable but the HTML surrounding it is displayed >> as-is by the browser instead of being rendered Thanks all. I (obviously) combined two scripts but

[CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
Hello Apache fails running this basic CGI script that I found on the Net: www.acme.com/cgi-bin/test.py?name=myname === #!/usr/bin/env python # Import modules for CGI handling import cgi, cgitb cgitb.enable() # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from f

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
Found it: The script MUST return something to the browser. I was missing this: print "Content-Type: text/html;charset=utf-8" print # print a document print "Name is %s" % ( cgi.escape(name), ) Sorry about that. -- http://mail.python.org/mailman/listinfo/python-list

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
On Mon, 20 Aug 2012 07:59:39 -0400, Rod Person wrote: >Check the Apache error log, there should be more information there. It's a shared account, so I only have access to what's in cPanel, which didn't display anything. Problem solved. Thank you. -- http://mail.python.org/mailman/listinfo/pytho

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
On Mon, 20 Aug 2012 16:56:14 +0200, Hans Mulder wrote: >Most such panels have a button to show the error log for your own site. > >If you can't find it, ask the help desk of the web hosting company. > >If there really is no way for you to see the error log, ask the help >desk to mail you the error

[2.5.1] Read each line from txt file, replace, and save?

2012-09-02 Thread Gilles
Hello This is a newbie question. I need to read a text file into a variable, loop through each line and use a regex to substitute some items within the line, and save the whole variable into a new text file. This triggers an error when I save the modified variable that contains all the lines: ==

Re: [2.5.1] Read each line from txt file, replace, and save?

2012-09-02 Thread Gilles
On Sun, 02 Sep 2012 12:19:02 +0200, Gilles wrote: (snip) Found it: #rewrite lines to new file output = open('output.txt','w') for line in textlines: #edit each line line = "just a test" output.write("%s" % line) output.cl

[web] Long-running process: FCGI? SCGI? WSGI?

2012-09-05 Thread Gilles
Hello To write a long-running web application, I'd like to some feedback about which option to choose. Apparently, the choice boilds down to this: - FastCGI - SCGI - WSGI It seems like FCGI and SCGI are language-neutral, while WSGI is Python-specific. Besides that, how to make an informed choic

Re: [2.5.1] Read each line from txt file, replace, and save?

2012-09-05 Thread Gilles
On Sun, 02 Sep 2012 14:04:29 -0400, Terry Reedy wrote: >If you process each line separately, there is no reason to read them all >at once. Use the file as an iterator directly. Since line is already a >string, there is no reason to copy it into a new string. Combining these >two changes with Ma

[WSGI] FCGID + Flup vs. mod_wsgi?

2012-09-21 Thread Gilles
Hello The shared host I intend to use to run a small Python web app only supports mod_fcgid on its Apache server. If I understood what I read on the Net, the ideal solution would be to have mod_wsgi installed and have it run either as a module within Apache or a stand-alone process to tal

"#!/usr/bin/env python" vs. "#!/usr/bin/python"?

2012-09-28 Thread Gilles
Hello I've seen both shebang lines to run a Python script on a *nix host: #!/usr/bin/env python #!/usr/bin/python What's the difference? Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: "#!/usr/bin/env python" vs. "#!/usr/bin/python"?

2012-09-28 Thread Gilles
On Fri, 28 Sep 2012 06:57:28 -0400, Roy Smith wrote: >The first one looks through your PATH to find the right python >interpreter to run. The second one is hard-wired to run /usr/bin/python. > >If you only have a single copy of python installed, it doesn't really >matter which you use. But, yo

How to investigate web script not running?

2012-09-28 Thread Gilles
Hello I'm trying to run my very first FastCGI script on an Apache shared host that relies on mod_fcgid: == #!/usr/bin/python from fcgi import WSGIServer import cgitb # enable debugging cgitb.enable() def myapp(environ, start_response): start_response('200 OK', [('Content-Type

Re: How to investigate web script not running?

2012-09-28 Thread Gilles
On Fri, 28 Sep 2012 13:37:36 +0200, Gilles wrote: >== >Internal Server Error > >The server encountered an internal error or misconfiguration and was >unable to complete your request. >== Looks like fcgi.py doesn't support WSGI: Traceback (most

Re: How to investigate web script not running?

2012-09-28 Thread Gilles
On Fri, 28 Sep 2012 14:16:22 +0200, "Michael Ross" wrote: >Do it the other way around: > ># cgitb before anything else >import cgitb >cgitb.enable() > ># so this error will be caught > from fcgi import WSGIServer Thanks much for the tip. The error isn't displayed when calling the script from a we

Re: "#!/usr/bin/env python" vs. "#!/usr/bin/python"?

2012-09-28 Thread Gilles
On Fri, 28 Sep 2012 09:19:54 -0400, D'Arcy Cain wrote: >Not just flexible but portable. On various systems I have Python >in /usr/bin, /usr/local/bin and /usr/pkg/bin. "#!/usr/bin/env python" >finds it in each case so I only need one version of the script. Good to know. -- http://mail.python.o

[fcgi.py] Force cache upgrade?

2012-09-28 Thread Gilles
Hello Does someone know if something must be done after editing a FastCGI + WSGI script so that the changes will show in the browser immediately instead of having to wait X minutes? === #!/usr/bin/env python2.6 def myapp(environ, start_response): start_response('200 OK', [('Conte

Re: [fcgi.py] Force cache upgrade?

2012-09-28 Thread Gilles
On Fri, 28 Sep 2012 23:57:14 +0200, Gilles wrote: >I guess the FastCGI server (Flup) only updates its cache every so >often. Do I need to type a command to force Flup to recompile the >Python script? Turns out that, yes, mod_fcgid is configured to reload a script only after some tim

Re: How to investigate web script not running?

2012-09-30 Thread Gilles
On Sat, 29 Sep 2012 10:05:25 -0700 (PDT), Ramchandra Apte wrote: >> Definitely not plug 'n play :-/ > >Well the plug and play standard is superseded by USB practically. Indeed ;-) Anyway, Support finally got back to me, and it turns out that they have Flup alreay installed on shared hosts, so I

[2.5.1 + CGI] Which interpreter and files?

2012-10-19 Thread Gilles
Hello I'd like to use the Mongoose basic web server with Python which can call scripts through CGI. I have a coupole of questions: 1. Mongoose must be told in the shebang file where to locate the interpreter, but ActivePython 2.5.1 comes with fours files that look like the interpreter (actually,

Re: [2.5.1 + CGI] Which interpreter and files?

2012-10-19 Thread Gilles
On Fri, 19 Oct 2012 21:09:55 +1100, Chris Angelico wrote: >The ones with the -w tag are designed for Windows apps that are going >to bring up a GUI and don't want a console. The python[w]25.exe ones >will be in case you have multiple Pythons installed and want to >explicitly call for version 2.5.

Re: python scripts for web

2012-10-19 Thread Gilles
On Thu, 18 Oct 2012 23:05:48 -0700 (PDT), chip9m...@gmail.com wrote: >these scripts will do a lot of calculation on a big dataset, and it is >possible that there will be many requests in a short period of time. In that case, are you sure a web script is a good idea? If you're thinking web to make

Question about long-running web scripts

2012-10-25 Thread Gilles
Hello I'd like to check something about running Python web applications. Generally speaking, the reason scripts run faster when called through FastCGI or the mod_* modules, is because the interpreter is already up and running. But when running PHP scripts, this does nothing about fetching the fil

Re: Question about long-running web scripts

2012-10-25 Thread Gilles
On Thu, 25 Oct 2012 13:03:14 +0100, Tim Golden wrote: >(Your question is a little confused at the end. I'm choosing to >understand: why can't we just run Python one-shot, like CGI? The likely >alternative meaning is: why can't the incoming request be routed to an >already-running Python program --

Re: Question about long-running web scripts

2012-10-26 Thread Gilles
On Thu, 25 Oct 2012 08:53:11 -0400, David Hutto wrote: >>> OTOH, Python web scripts can be written as long-running scripts: In >>> this case, what is the added-value of using FastCGI? Why can't the >>> web server simply call the Python script directly, just like CGI? > >The server should call a th

Re: Question about long-running web scripts

2012-10-26 Thread Gilles
On Thu, 25 Oct 2012 14:24:16 +0100, Tim Golden wrote: >> But actually, I didn't mean one-shot scripts, where the Python >> interpreter + script must be loaded each time, but rather: If I leave >> a Python running in an endless loop, why not just use either CGI or >> some other basic way to call th

Re: Question about long-running web scripts

2012-10-26 Thread Gilles
On Fri, 26 Oct 2012 12:00:17 +0100, Tim Golden wrote: >Certainly there are Python equivalents (mod_python, mod_wsgi, etc.) >which can run in effectively the same way as mod_php, and they could be >configured to run an fcgi frontend script, I presume. There's always a >certain confusion here becaus

[newbie] Equivalent to PHP?

2012-06-12 Thread Gilles
Hello I'm an amateur programmer, and would like to know what the main options are to build web applications in Python instead of PHP. I notice that Python-based solutions are usually built as long-running processes with their own web server (or can run in the back with eg. Nginx and be reached th

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread Gilles
On Tue, 12 Jun 2012 12:12:55 +0200, Alain Ketterlin wrote: >You misunderstand the problem here. It's not about the duration of the >actions, it's about the latency it takes to read/parse/execute the >script. HTTP is stateless anyway, so if the same "interpreter" handles >several requests, what you

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread Gilles
On Tue, 12 Jun 2012 07:42:56 -0400, D'Arcy Cain wrote: >I guess I am in the minority then. I do plan to turn one of my larger >projects into a standalone web server some day but so far writing >simple Python CGI scripts has served me fine. I even do some embedding >by using server side scripting

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread Gilles
On Tue, 12 Jun 2012 22:01:10 +1000, Chris Angelico wrote: >Apache's mod_php partially evens out the difference, but not >completely, and of course, it's perfectly possible to write a dispatch >loop in PHP, as Octavian said. It looks like mod_php and equivalents for web servers other than Apache a

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread Gilles
On Tue, 12 Jun 2012 20:18:21 +1000, Chris Angelico wrote: >Think of it as Apache + PHP versus Python. Apache keeps running, it's >only your PHP script that starts and stops. With a long-running >process, you keep everything all in together, which IMHO is simpler >and better. Why is a long-running

Re: [newbie] Equivalent to PHP?

2012-06-12 Thread Gilles
On Tue, 12 Jun 2012 14:28:22 +0300, "Octavian Rasnita" wrote: >Otherwise... if you want you can also create a web app using PHP and >CodeIgniter web framework and run it with fastcgi... Thanks for the infos. -- http://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 10:19:29 +1000, Chris Angelico wrote: >It's far simpler to manage, it retains running state, and is easily >enough encapsulated. It's the non-magic way of doing things. Also, it >plays very nicely with the MUD style of process, which is something I >do a lot with Pike. Plus, if

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On 13 Jun 2012 08:29:05 GMT, Steven D'Aprano wrote: >http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ > >and especially lack PHP's security vulnerabilities. Thanks for the link. -- http://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Tue, 12 Jun 2012 16:48:27 +0200, Matej Cepl wrote: >I don't think it is a proper description of the situation (please, >somebody correct my mistakes, I am not 100% sure about it myself). WSGI >applications (which is basically all web applications in Python) could >run in the hosted servers (

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 19:41:41 +1000, Chris Angelico wrote: >For high-availability servers, I can't speak for Python, as I've never >done that there; but it seems likely that there's good facilities. My >personal preference is Pike, but that's off-topic for this list. :) >But the simple answer for s

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 20:00:59 +1000, Chris Angelico wrote: >Most high level languages probably have some sort of HTTP server >available. Some make it trivially easy to plug some code in and start >serving. Python is advertised as "batteries included", and one of its >packets of batteries is a fairl

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 18:01:23 +, "Prasad, Ramit" wrote: >Maybe this article will help you >http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442 >The comments on /. should round out anything missing from the article (I hope) >http://develop

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 17:27:21 +0200, Christian Heimes wrote: >A long running process has lots of benefits that makes design and >development easier and makes your app faster. Thanks much for the infos. Makes you wonder why commercial companies still choose PHP to write their web site. -- http://m

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On 13 Jun 2012 22:16:51 GMT, Steven D'Aprano wrote: >Surely the obvious answer is that a framework offers the benefit that you >don't have to write the application from scratch. Yes, but between receiving the query and sending the response, what features do frameworks offer that I'd have to writ

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 23:16:31 +0200, Christian Heimes wrote: >PHP was developed for non-developers. (see >http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ ). >It's much easier and also cheaper to find bad coders and non-developers >than code people. The outcome is bad performance a

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 23:12:37 +, "Prasad, Ramit" wrote: >You are not Facebook (at least yet). Indeed, but with so much criticism about PHP, it's odd that they would still choose it. Anyway, thanks much for the infos. I'll look at the web frameworks and how to connect the Python app to a front

Re: [newbie] Equivalent to PHP?

2012-06-14 Thread Gilles
On Wed, 13 Jun 2012 19:03:29 -0500, Tim Chase wrote: >That's just my off-the-top-of-my-head list of things that you'd have >to come up with that Django happens to give you out-of-the-box. Thanks much. So the next step will have to find a framework that's right for a given application. -- http://

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-08-01 Thread Gilles
On Wed, 24 Jul 2013 10:38:52 -0400, Kevin Walzer wrote: >> Thanks. hMailServer was one of the apps I checked, and I was just >> making sure there weren't something simpler, considering my needs, >> ideally something like Mongoose MTA. >> >> Regardless, because of the SPAM anti-measures mentioned a

Re: Source code to identify user through browser?

2013-08-06 Thread Gilles
On Wed, 05 Jun 2013 15:08:54 +0200, Gilles wrote: >I was wondering if some Python module were available to identify a >user through their browser, like it's done on the Panopticlick site: > >http://panopticlick.eff.org/ It appears that flash cookies is a better solution to keep

[GUI] Good frameworks for Windows/Mac?

2013-08-06 Thread Gilles
Hello I need to write a small GUI application that should run on Windows and Mac. What open-source framework would you recommend? I just need basic widgets (button, listbox, etc.) and would rather a solution that can get me up and running fast. I know about wxWidgets and Qt: Are there other good

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-08-06 Thread Gilles
On Sat, 3 Aug 2013 06:47:07 -0500 (CDT), Wayne Werner wrote: >Have you checked Kenneth Rietz's inbox.py[1]? It's fairly simple to >use/extend and might fit your modest needs. > > >-W > >[1]:https://crate.io/packages/inbox/ Thanks. I'll check it out. -- http://mail.python.org/mailman/listinfo/py

Re: Simple Python script as SMTP server for outgoing e-mails?

2013-08-06 Thread Gilles
On Sat, 03 Aug 2013 21:41:16 -0400, Kevin Walzer wrote: >For what it's worth, that hasn't been my experience. Thanks for the feedback. I'll experiment and see how it goes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can someone suggest better resources for learning sqlite3? I wanted to use the Python library but I don't know sql.

2013-08-06 Thread Gilles
On Sat, 3 Aug 2013 10:57:32 -0700 (PDT), Aseem Bansal wrote: >I found Python3's sqlite3 library. I found that I needed sql commands for >using it. > >I have tried sql.learncodethehardway but it isn't complete yet. I tired >looking on stackoverflow's sql tag also but nothing much there. It'll b

Re: [GUI] Good frameworks for Windows/Mac?

2013-08-06 Thread Gilles
On Tue, 6 Aug 2013 13:22:01 +0200, Vlastimil Brom wrote: >I mostly use wxPython myself, but if you just need some basic widgets >and not some very complex or non-standard layouts, the tkinter - >available in the standard library - might be perfectly viable. >http://docs.python.org/3.3/library/tk.h

[ActivePython] Upgrading fails

2013-08-06 Thread Gilles
Hello, I already posted in their forum, but got no reply and figured some people here might have experienced this too. I'm currently running ActivePython 2.5.1.1 on my XP Pro host. After downloading and running the installer to 2.7.2.5, I get the following error message: "Windows Installer: The

Re: [GUI] Good frameworks for Windows/Mac?

2013-08-08 Thread Gilles
On Thu, 8 Aug 2013 01:47:21 -0700 (PDT), sagar varule wrote: >Pyside is also Good. It has a Designer which can be helpful. Thanks for the info. -- http://mail.python.org/mailman/listinfo/python-list

[ActivePython] Add Qt/PyQt and wxWidgets/wxPython?

2013-08-08 Thread Gilles
Hello I upgraded to ActivePython 2.7.2.5, and would like to get started learning about Qt and wxWidgets in Python. I have a couple of question: 1. Are there obvious reasons to choose either QT/PyQt or wxWidgets/wxPython? I have the impression that Qt is a richer GUI than wxWidgets, but it could

[2.4.3/Newbie] Web script doesn't run

2013-02-11 Thread Gilles
Hello I have a couple of newbie questions about using Python in a FastCGI + Flup context on a shared CentOS server: 1. The following script runs fine... = #!/usr/bin/env python2.6 def myapp(environ, start_response): start_response('200 OK', [('Content-Type

Re: [2.4.3/Newbie] Web script doesn't run

2013-02-11 Thread Gilles
On Mon, 11 Feb 2013 10:30:01 +0100, Gilles wrote: > I have a couple of newbie questions about using Python in a FastCGI >+ Flup context on a shared CentOS server: Please ignore the thread. I found the error, and a way to catch compile-time errors (log on through SSH, and run &

Re: [2.4.3/Newbie] Web script doesn't run

2013-02-11 Thread Gilles
On Mon, 11 Feb 2013 21:30:12 +1100, Chris Angelico wrote: >That'll catch some forms of error, but not everything. You may also >want to consider looking for your server's error log - that may be >getting the actual traceback. I don't know what your server setup is, >but there's likely to be one so

Re: [2.4.3/Newbie] Web script doesn't run

2013-02-11 Thread Gilles
On Mon, 11 Feb 2013 22:30:45 +1100, Chris Angelico wrote: >Try running python2.6 -V > >Your shebang line says that it's looking for a program named >"python2.6", which is quite probably not the same as the one named >just "python". Indeed, they have two versions of Python installed: # python2.6

Re: [2.4.3/Newbie] Web script doesn't run

2013-02-11 Thread Gilles
On Mon, 11 Feb 2013 22:42:50 +1100, Chris Angelico wrote: >It's entirely possible you have a third Python, a 3.x, as well. >Different Pythons coexist quite happily on a system. Thank for the help. I'm on my way to figure out how mod_fcgid, Flup, and Python scripts work together. -- http://mail.p

Installing Apache 2 and mod_wsgi on CentOS?

2013-02-12 Thread Gilles
Hello Before I go ahead, I'd like to make sure I'm doing it the right away: 1. yum install httpd mod_wsgi 2. Edit /etc/sysconfig/httpd to uncomment this line to get Apache to run as worker MPM: "#HTTPD=/usr/sbin/httpd.worker" 3. Edit mod_wsgi 4. Build a test WSGI Python script 5. Start Apache

[WSGI] Tell Python to listen to LAN interface?

2013-03-26 Thread Gilles
Hello I'm following this tutorial to learn about writing Python apps in WSGI: http://webpython.codepoint.net/wsgi_tutorial On a Linux host with Python 2.6.6 installed, I launched the "Environment dictionary" sample, but can't connect to it from my remote Windows host since the application only a

Re: [WSGI] Tell Python to listen to LAN interface?

2013-03-26 Thread Gilles
On Tue, 26 Mar 2013 23:50:36 +1100, Chris Angelico wrote: >According to the docstring, the first argument to make_server() is the >host name to bind to. Using "localhost" means you're bound to >127.0.0.1, as you see. Use your LAN IP address there, or "" to bind to >all local addresses - or possibl

What web server for WSGI? Recommended book?

2013-03-27 Thread Gilles
Hello After going through multiple articles about the advantage of using WSGI instead of FastCGI + Flup to run Python web apps, I have a couple of questions: 1. Which server + WSGI module would you recommend? I know about Apache and Graham Dumpleton's mod_wsgi, but what about Lighttpd and

Cross-compiling Python for ARM?

2013-04-15 Thread Gilles
Hello I tried running uWSGI on an ARM-based appliance, but it fails. Apparently, it could be due to the official Python 2.6.6 interpreter in the depot not being compiled the way uWSGI expects it to be: ./configure --enable-shared; make; make install; www.raspberrypi.org/phpBB3/viewtopic.php?f=3

Re: Cross-compiling Python for ARM?

2013-04-20 Thread Gilles
On Tue, 16 Apr 2013 17:22:55 +0300, Anssi Saari wrote: >In any case, cross compiling Python shouldn't be that hard. I >just recently built 2.7.3 for my OpenWRT router since the packaged >Python didn't have readline support (some long standing linking issue >with readline and ncurses and uClibc).

Iterating over files of a huge directory

2012-12-17 Thread Gilles Lenfant
that yields the file names of a directory and does not make a giant list of what's in. i.e : for filename in enumerate_files(some_directory): # My cooking... Many thanks by advance. -- Gilles Lenfant -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating over files of a huge directory

2012-12-17 Thread Gilles Lenfant
Le lundi 17 décembre 2012 16:52:19 UTC+1, Oscar Benjamin a écrit : > On 17 December 2012 15:28, Gilles Lenfant <...> wrote: > > > In the last couple of months there has been a lot of discussion (on > > python-list or python-dev - not sure) about creating a library

[2.5.1] Script to download and rename bunch of files?

2011-04-08 Thread Gilles Ganault
Hello, Before I go ahead and learn how to write this, I was wondering if someone knew of some source code I could use to download and rename a bunch of files, ie. the equivalent of wget's -O switch? I would provide a two-column list where column 1 would contain the full URL, and column 2

Re: [2.5.1] Script to download and rename bunch of files?

2011-04-08 Thread Gilles Ganault
On Fri, 08 Apr 2011 15:14:27 +0200, Laurent Claessens wrote: >The following puts in the string `a` the code of the page urlBase : > >a = urllib.urlopen(urlBase).read() > >Then you have to write `a` in a file. > >There could be better way. Thank you. -- http://mail.python.org/mailman/listinfo/pyt

wxPython & Cygwin

2005-10-13 Thread Gilles DRIDI
Does someone has installed wxPython on the Cygwin platform, environment ? Thank you Gilles DRIDI http://cdridi.club.fr -- http://mail.python.org/mailman/listinfo/python-list

"bad argument type for built-in operation"

2005-01-24 Thread Gilles Arnaud
Hello, I've got a nasty bug and no idea to deal with : here is the method : def denormer(self, var) : " denorme un vecteur d'entree " try: #a = map(self.decerner, self.param, var) #a = [self.decerner(x, y) for x, y in map(None, self.param, var)]

Re: how to pass attribute name via sys.argv

2005-01-27 Thread Gilles Lenfant
object" is now a reserved (builtin) name, use "objekt" instead. class Foo(object): pass objekt = Foo() attrName = sys.argv[1] values = ['foo', 'bar', 'whatever'] setattr(objekt, attrName, values) HTH -- Gilles -- http://mail.python.org/mailman/listinfo/python-list

Linux/Python -> SQL*Server Connexion chain

2005-09-22 Thread Gilles Lenfant
Hi, Have you guys any good experience on connecting a Python (Zope) app running on Linux to a Windoze SQL*Server ? Many thanks by advance to report your success, failure, pitfalls (...) and used products. Even reports using commercial solutions are welcome. -- Gilles -- http

Using PyOpenGL what should I use for a GUI ?

2005-02-26 Thread Gilles Leblanc
Hi I have started a small project with PyOpenGL. I am wondering what are the options for a GUI. So far I checked PyUI but it has some problems with 3d rendering outside the Windows platform. I know of WxPython but I don't know if I can create a WxPython window, use gl rendering code in it and then

Stopping a wsgiref server programmatically

2014-01-14 Thread Gilles Lenfant
https://gist.github.com/glenfant/7369894#file-pipetestserver-py-L173 ). Is there a volunteer with a Windows box for helping me to get it fixed. Note: I have no windows box to experiment alternate. Many thanks by advance. -- Gilles Lenfant -- https://mail.python.org/mailman/listinfo/python-list

Skipping decorators in unit tests

2013-10-10 Thread Gilles Lenfant
g "special stuffs" in my target tested modules. Can someone point out good practices or dedicated tools that "remove temporarily" the decorations. I pasted a small example of what I heed at http://pastebin.com/20CmHQ7Y Many thanks in advance -- Gilles Lenfant -- https://ma

Re: Skipping decorators in unit tests

2013-10-11 Thread Gilles Lenfant
ons/methods provided by 3rd party tools Cheers and thanks again for taking time to help me. -- Gilles Lenfant -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   >