Re: WSGI question: reading headers before message body has been read

2009-01-18 Thread Graham Dumpleton
ding on request content, but you still don't have a CONTENT_LENGTH so as to check in advance if more data than expected is going to be sent. If wanting to know how to handle chunked transfer encoding in mod_wsgi, better off asking on mod_wsgi list. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: wsgi silently swallows errors

2009-01-19 Thread Graham Dumpleton
] [error] [client ::1] File "/usr/local/ wsgi/scripts/swallow.py", line 7, in application[Tue Jan 20 09:03:19 2009] [error] [client ::1] x=1/0 [Tue Jan 20 09:03:19 2009] [error] [client ::1] ZeroDivisionError: integer division or modulo by zero Would just need to make sure you look in the correct log if have virtual host specific error logs. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?

2009-01-27 Thread Graham Dumpleton
ly though want to force them to all run in same sub interpreter to reduce memory usage. This can be done using WSGIApplicationGroup directive. For further information see: http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Graham Dumpleton
_wsgi, as pointed out already, could be that you have Apache setup to do reverse DNS lookups on client IP address and that isn't working properly. This often happens for Windows people. So, narrow down where problem is occurring. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Graham Dumpleton
aemon mode would of course be preferred though, with touching the WSGI script file being safest option to ensure updates across multiple files picked up at same time, but if you really want completely automated restarts, use the recipe in mod_wsgi documentation. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Graham Dumpleton
On Jan 29, 8:15 pm, Aleksandar Radulovic wrote: > Graham, > > On Thu, Jan 29, 2009 at 1:16 AM, Graham Dumpleton > > wrote: > > Sorry, you are wrong to assume that an Apache restart is not be > > required. > > If you are usingmod_wsgiembedded mode, or mod_py

Re: More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Graham Dumpleton
ess may get lock, or for either worker MPM or prefork MPM, then another process could get it. Which actually gets it is a bit indeterminate as simply depends on which process the operating system lets have the lock next. So, there is no strict rule one can say as to who would get it next. Graham Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Graham Dumpleton
> > > Depends on how you configure mod_wsgi. Read the part about "Process > > Reloading Mechanism" here: > >http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode > > I'm running Debian Etch, which means I have an older version of > mod_wsgi, which means

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
way through something. Some of these systems will do this if requests take too long. Thus better to offload real work to another process. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
ed to use. GAE is not suitable as they kill off any requests that take more than a set time. That time isn't that long, so can't support long running requests. Graham > appengine.google.com > > -Alex Goretoy > http://www.goretoy.com > > > > On Wed, Feb 11, 2009 a

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
On Feb 12, 9:19 am, Robin wrote: > On Feb 11, 7:59 pm, Graham Dumpleton > wrote: > > > > > On Feb 11, 8:50 pm, Robin wrote: > > > > Hi, > > > > I am building some computational web services using soaplib. This > > > creates a WSGI applicat

multiprocessing module and os.close(sys.stdin.fileno())

2009-02-17 Thread Graham Dumpleton
have a fileno() method. In that sort of situation an AttributeError would be raised, which isn't going to be caught as either OSError or ValueError, which is all the code watches out for. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Will multithreading make python less popular?

2009-02-17 Thread Graham Dumpleton
ll as currently delegated thread within Python code. A very good example of this is when embeddeding Python inside of Apache. So much stuff is actually done inside of Apache C code with the GIL released, that there is more than ample opportunity for multiple threads to be running across cores at the same time. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-18 Thread Graham Dumpleton
On Feb 19, 1:16 pm, Jesse Noller wrote: > On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton > > > > wrote: > > Why is the multiprocessing module, ie., multiprocessing/process.py, in > > _bootstrap() doing: > > >  os.close(sys.stdin.fileno()) >

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-21 Thread Graham Dumpleton
On Feb 21, 4:20 pm, Joshua Judson Rosen wrote: > Jesse Noller writes: > > > On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton > > wrote: > > > Why is the multiprocessing module, ie., multiprocessing/process.py, in > > > _bootstrap() doing: > > > &

Re: multiprocessing module and os.close(sys.stdin.fileno())

2009-02-21 Thread Graham Dumpleton
On Feb 22, 12:52 pm, Joshua Judson Rosen wrote: > Graham Dumpleton writes: > > > On Feb 21, 4:20 pm, Joshua Judson Rosen wrote: > > > Jesse Noller writes: > > > > > On Tue, Feb 17, 2009 at 10:34 PM, Graham Dumpleton > > > > wrote:

Re: Apache & mod_python: I don't receive anything with POST method

2008-11-26 Thread Graham Dumpleton
you are using. The problem is that you appear to be using mod_python.publisher which does its own form handling before you are even getting a chance, thus it is consuming the request content. For how to handle forms in mod_python.publisher see: http://webpython.codepoint.net/mod_python_publisher_forms Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/C API: using from a shared library

2008-11-26 Thread Graham Dumpleton
planation and a workaround. It isn't a bug in Python. You need to link the Python shared library to your shared library properly. You appear not to be doing this. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python and files directory

2008-12-06 Thread Graham Dumpleton
ant to get files directory, what can i do? sorry > for my bad describe of that. Thanks a lot... The current working directory in Apache can be anything. You must supply an absolute path to all directories/files you are trying to access/use. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python resources

2008-12-17 Thread Graham Dumpleton
SGI capable application, using mod_wsgi would be the more obvious choice. If wanting to write your own framework, or work at low level, basing it on WSGI rather than mod_python specific APIs would certainly be a better long term direction to take. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python resources

2008-12-20 Thread Graham Dumpleton
like there will not be a mod_python for Python 3.0. If you want the ability to run Python embedded in Apache like mod_python did, use a framework that can host on top of WSGI and host it on mod_wsgi instead. The version of mod_wsgi in subversion repository already supports Python 3.0. Graham -- http:

Re: Need help getting MoinMoin to run under WSGI

2008-12-28 Thread Graham Dumpleton
till don't know why.) > > Seems to be working now though. It probably crashed the first time because you didn't do a full stop of Apache and instead just did a reload. Doing a reload may not unload the Python libraries from Apache process correctly and so would have been a mix of code for different versions of Python in same process. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_pylite?

2009-01-01 Thread Graham Dumpleton
n still use Apache to do the dispatching to individual file based resource files with the right configuration. How this could be done has been answered a number of times on mod_wsgi list as others have already wanted to know about how to do a PHP like solution in Python and so it has been discussed. If you want to talk more about this, come over to the mod_wsgi list on Google Groups. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python: delay in files changing after alteration

2009-01-06 Thread Graham Dumpleton
es installed on sys.path require a full restart of Apache to ensure they are loaded by all Apache child worker processes. So, which code files are you actually modifying, ie., where do they exist and how are they imported? Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: OS 10.5 build 64 bits

2008-10-23 Thread Graham Dumpleton
Makefiles. Comments in the following may or may not be useful: http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/index.html The latter only works for Apple supplied Python as I understand it. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: What happened to python-dev's Google Group?

2008-10-23 Thread Graham Dumpleton
ut of course Google doesn't say anything about what happened. http://groups.google.com/group/Is-Something-Broken/browse_frm/thread/bfe5e1d3c9ac958a A more recent thread complaining about most recent disappearances is at: http://groups.google.com/group/Is-Something-Broken/browse_frm/th

Re: Build of extension module depending on external lib fails on Solaris 10

2008-11-21 Thread Graham Dumpleton
bject file is   > produced. > > Did anybody have this kind of problem? Is it a bug, or am I doing   > something wrong? And is there a workaround? See workaround in: http://code.google.com/p/modwsgi/wiki/InstallationOnSolaris Different package, but same issue, so use same workaround. Graham Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Shared library Python on Mac OS X 64-bit

2009-03-02 Thread Graham Dumpleton
t this thing to produce shared and not static libraries? >   A link to examples or documentation that shows the correct configure > parameters?  I would have thought "--enable-shared" would do it, but I guess > I'm wrong. Why don't you want to use MacOS X Framework

Re: Upgrade Python on a Mac

2009-03-03 Thread Graham Dumpleton
-3.0 \ --enable-framework=/usr/local/python-3.0/frameworks \ --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5 \ --with-universal-archs=all Note that not all MacPorts installers have been both 32/64 bit either. Not sure if they have fixed this issue. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Get bound method by name

2009-03-03 Thread Graham Breed
Johannes Bauer wrote: Hello group, I'm looking for a Python function but have forgotten it's name. Essentially what I want is: class Foo(): def bar(self): pass x = Foo() y = x.MAGIC("bar") print(y) > So the question is: How is the magic function called which returns me

Re: Shared library Python on Mac OS X 64-bit

2009-03-03 Thread Graham Dumpleton
On Mar 4, 2:29 am, Uberman wrote: > Graham Dumpleton wrote: > > Why don't you want to use MacOS X Framework libraries? It is the > > better installation method. > > Because I'm not installing Python, I'm building it.  If I were just interested > in instal

Re: Shared library Python on Mac OS X 64-bit

2009-03-05 Thread Graham Dumpleton
On Mar 6, 6:24 am, Uberman wrote: > Graham Dumpleton wrote: > > > I don't understand the problem, you can say where it installs the > > framework, it doesn't have to be under /Library, so can be in your > > special SDK folder. For example: > > > .

Re: Python3 on the Web

2009-03-05 Thread Graham Dumpleton
s others have said, perhaps start out with Python 2.X for now if you are just getting into this. This is because little work has been done yet on getting any of the Python web frameworks/toolkits running on Python 3.0 even if mod_wsgi is already ready (subversion copy) to host them on Apache.

Do python.org MacOS X dmg installers still only provide 32 bit Python framework?

2009-03-08 Thread Graham Dumpleton
Am getting tired of having to explain to people that it is the python.org installers that are deficient and to compile from source code or use Apple version instead. If this still is an issue, then I'll log a bug report so that full support is included in the future. Thanks. Graham -- http:

Re: Do python.org MacOS X dmg installers still only provide 32 bit Python framework?

2009-03-09 Thread Graham Dumpleton
On Mar 9, 6:14 pm, "Martin v. Löwis" wrote: > Graham Dumpleton wrote: > > I'd rather not have to download and install them as I don't want to be > > installing them into my actual system, so can someone please tell me > > whether the MacOS X dmg installers

Re: Correct URL encoding

2009-03-15 Thread Graham Breed
(":", "%3A") There isn't a better way of doing this? Yeah, shame there's no function -- called "urlencode" say -- that does it all for you. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe to call Py_Initialize() frequently?

2009-03-22 Thread Graham Dumpleton
t it is one operation per second, creating a new process, be it a completely fresh one or one forked from existing Python process, would be simpler. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe to call Py_Initialize() frequently?

2009-03-22 Thread Graham Dumpleton
this at: http://groups.google.com/group/modwsgi/browse_frm/thread/65305cfc798c088c?hl=en Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Safe to call Py_Initialize() frequently?

2009-03-23 Thread Graham Dumpleton
On Mar 23, 10:00 pm, Mark Hammond wrote: > On 23/03/2009 12:14 PM, Graham Dumpleton wrote: > > > On Mar 21, 10:27 am, Mark Hammond  wrote: > >> Calling > >> Py_Initialize and Py_Finalize multiple times does leak (Python 3 has > >> mechanisms so this need to

Re: Safe to call Py_Initialize() frequently?

2009-03-29 Thread Graham Dumpleton
On Mar 30, 4:35 am, a...@pythoncraft.com (Aahz) wrote: > [p&e] > > In article > , > Graham Dumpleton   wrote: > > > > > > >In mod_wsgi however, Apache will completely unload the mod_wsgi module > >on a restart. This would also mean that the Python li

Re: Upgrade Python on a Mac

2009-03-30 Thread Graham Dumpleton
On Mar 31, 3:07 am, 7stud wrote: > On Mar 3, 4:01 am, Graham Dumpleton > wrote: > > > > > On Mar 3, 8:53 am, Rey Bango wrote: > > > > Hi, > > > > I'd like to upgrade the installed version of Python that came standard > > > on OS X (

Re: Module caching

2009-04-04 Thread Graham Dumpleton
e configurations is multithreaded and as such they may not be properly protecting variables if they are storing them at global scope. They haven't responded to any comments about it on mod_python list. They were also told to read: http://www.dscpl.com.au/wiki/ModPython/Articles/TheProcessInterpreterModel Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression Help

2009-04-12 Thread Graham Breed
# They must be preceded by a decimal point. $ # End of line """ Then anybody (including you) who comes to read this in the future will have some idea what you were trying to do. \> Examples of acceptable input should be: $12.42 $12 £12.42 $12,482.96 (n

Re: eval(WsgiApplication)

2009-05-02 Thread Graham Dumpleton
e(filename, module.__dict__) return module module = load_script('/some/path/file.wsgi') application = module.application Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: return functions

2009-05-02 Thread Graham Dumpleton
using Apache/mod_wsgi, Apache does a level of URL matching to filesystem based resources. This isn't automatic in normal WSGI servers unless you use a WSGI middleware that does the mapping for you. :-) Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot start a thread in atexit callback

2009-05-06 Thread Graham Dumpleton
(); This is all different to older versions of Python which shutdown such threads from an actual atexit handler. This caused various ordering issues. Anyway, the point of this is that it would need to be a daemonized thread to begin with. :-) Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python and xml.dom.minidom

2009-05-10 Thread Graham Dumpleton
of expat. See: http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary where explicitly says that only applies to Python prior to Python 2.5. His problem is therefore likely to be something completely different. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python and xml.dom.minidom

2009-05-13 Thread Graham Dumpleton
extension exists. Were you getting this issue with xml.dom showing on first request all the time, or only occasionally occurring? If the latter, were you running things in a multithreaded configuration and was the server being loaded with lots of concurrent requests? For your particula

Slicing an array in groups of eight

2009-05-21 Thread Graham Arden
0, 51, 52, 53, 54, 55]), array([64, 65, 66, 67, 68, 69, 70, 71]), array([80, 81, 82, 83, 84, 85, 86, 87]), etc... unfortunately I can't work out a way of joining then into a single array. Alternatively is there a simpler way of producing the array above? Thanks Gr

Re: Install Python MySQL db module?

2008-05-13 Thread Graham Dumpleton
uild as 64 bit capable, then you can force Apache to run as a 32 bit process and avoid the problems. For more details, see section 'Thinning The Apache Executable' of: http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX Also see contributed comments to the page, which explai

Re: Is using range() in for loops really Pythonic?

2008-05-16 Thread Graham Breed
about for i in range(10): del i do stuff ? It makes it clear you aren't using the index and ensures you get a run-time error if you clobbered an existing variable. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Arch problems--how do I build PIL to be 64 bit so it plays nicely on OS X?

2008-05-17 Thread Graham Dumpleton
ython. > > Any advice, hand-holding, or sage wisdom? See: http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX and also the document it references: http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/index.html Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: scaling problems

2008-05-20 Thread Graham Dumpleton
od_wsgi. The embedded modes described in that documentation also apply to mod_python. The server is generally never the bottleneck, but if you are paranoid about performance, then also look at relative comparison of mod_wsgi and mod_python in: http://code.google.com/p/modwsgi/wiki/PerformanceEstimates Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question

2008-05-25 Thread Graham Dumpleton
ult, showing I am using python 2.4.3 > > any idea? Why are you using the documentation from version 2.7.8 of mod_python when you are using a much newer version? Also read: http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking Graham -- http://mail.python.org/mailman/listinfo/python-list

run a script in vista

2008-05-29 Thread Graham Feeley
mport mx.ODBC.Windows as odbc appreciate any help here Regards Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with MySQLdb and mod_python

2008-07-18 Thread Graham Dumpleton
hat FCGI works being that the processes, even if they are spawned by Apache, use a fork/exec, thus meaning they have a clean memory space when starting up. In summary, look at what version of MySQL libraries are used by PHP modules and ensure that Python MySQL module is compiled against the same version. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: https in pylons

2008-07-18 Thread Graham Dumpleton
t run Pylons with Paste server behind Apache/mod_proxy. In other words, use Apache to handle the HTTPS side of things. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Error importing modules with mod_python

2008-07-21 Thread Graham Dumpleton
le.__dict__) > >   File "C:\htdocs\python\index.py", line 2, in >     from storylab import * > > ImportError: No module named storylab > > --- > > What am I doing wrong? Any insight would be greatly appreciated. You can't put Python packages in same directory as handler scripts managed by mod_python. See documentation for import_module() in: http://www.modpython.org/live/current/doc-html/pyapi-apmeth.html Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with Python Server Pages (PSP)

2008-07-21 Thread Graham Dumpleton
: 2.2.3mod_python: 3.0.3 > > Thnaks for all your suggestions. What is the Apache configuration snippet you are using to enable mod_python and PSP file handling? Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Embedding Thread

2008-07-23 Thread Graham Dumpleton
ation. Please don't look at mod_python. Current versions of mod_python don't use Python simplified GIL APIs correctly. http://issues.apache.org/jira/browse/MODPYTHON-217 Look at mod_wsgi instead, it is closer to the mark, although still has some not quite cruft in there to wo

Re: Problem with Python Server Pages (PSP)

2008-07-23 Thread Graham Dumpleton
On Jul 22, 1:54 pm, [EMAIL PROTECTED] wrote: > On Jul 22, 5:18 am, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > On Jul 21, 9:42 pm, [EMAIL PROTECTED] wrote: > > > > Hi, > > > > I am facing a very basic problem with PSP. I have inst

Re: Beginner advice

2008-03-31 Thread Graham Ashton
On Mar 31, 8:15 am, Paul Scott <[EMAIL PROTECTED]> wrote: > Thanks for the feedback, now I just need some justification on the > GTK/GUI stuff - wxWidgets, GTK+ Glade or other? pyGTK is great. I used it quite heavily a year or so ago. GTK is a nice tool kit from the user's perspective too; you ca

Re: Problem with mod_python/3.3.1 and apache

2008-03-31 Thread Graham Dumpleton
host/python/ > [Mon Mar 31 23:53:25 2008] [error] make_obcallback: could not import > mod_python.apache.\n > ImportError: No module named mod_python.apache > > thx See: http://www.modpython.org/pipermail/mod_python/2008-March/025022.html Also search the www.modpython.org site for other discussions/ suggestions in the mod_python mailing list. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Rounding a number to nearest even

2008-04-11 Thread Graham Breed
, import decimal def my_round(f): d = decimal.Decimal(str(f)) rounded = d.to_integral(rounding=decimal.ROUND_HALF_EVEN) return int(rounded) Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple independent Python interpreters in a C/C++ program?

2008-04-12 Thread Graham Dumpleton
the context of a running process, ie., before the process ends, can be a cause for various problems with third party C extension modules and thus would advise that once a sub interpreter has been created, you keep it and use it for the life of the process. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 adoption

2008-04-19 Thread Graham Breed
;m pleased they've got that far because I like to know that my code can run under Java and I like generators. My web host uses 1.5.2. That is painful. If you're assuming your potential users already have 2.4 then the chances are they'll have upgraded to 2.5 by the time you'

Re: apache module: python and web programming, easy way...?

2008-04-28 Thread Graham Dumpleton
cation which is where Python web framework hosting is heading whereas mod_python has its own specific API which results in your application only being able to be hosted with it and nothing else. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: where do I begin with web programming in python?

2008-05-01 Thread Graham Dumpleton
anti framework) approach I'd suggest looking at: http://dev.pocoo.org/projects/werkzeug/ This gives you all the basic components, but it is really up to you as to how you put them together, which seems to be what you want to be able to do. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check in CGI if client disconnected

2008-08-24 Thread Graham Dumpleton
the amount of POST content read matches the inbound Content-Length specified in the CGI environment. If your processing of POST content finds less than what was meant to be sent, then likely that the client browser aborted request before all content could be sent. Graham > Regards, > > -vis

Re: How to check in CGI if client disconnected

2008-08-25 Thread Graham Dumpleton
On Aug 25, 5:49 pm, Vishal <[EMAIL PROTECTED]> wrote: > Hi Graham, > >    Thanks for the reply. In my case, it's the other way round. I need > to check if the amount of data sent is equal to the file size i want > to send. However, the question is - when do i check this

Re: Python and M2Crypto question

2008-09-07 Thread Graham Dumpleton
m > stucked and not able to find a way and to make this work. M2Crypto lib > works good stand alone. See: http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX#Missing_Code_For_Architecture This is mod_wsgi documentation, but same issue applies to mod_python. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Characters contain themselves?

2006-04-10 Thread Graham Fawcett
#x27;a' |ips| 'abc' True >>> print '' |ips| '' False Of course, |ips| looks like Lips-L, which is odd; but you could pick a better name. ;-) Graham [1] http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122 -- http://mail.python.org/mailman/listinfo/python-list

Re: Characters contain themselves?

2006-04-11 Thread Graham Fawcett
Sion Arrowsmith wrote: > Unfortunately: > >>> print 'a'+'bc' |ips| 'abc' > True > > Which might not be what you want. On the other hand, it's a simple > fix: > >>> ips = Infix(lambda a, b: (a != b) and (a in b)) > >&g

Re: Python & Go

2009-11-16 Thread Graham Breed
;channel" function would present any problems given an appropriate library to wrap. I got something like this working with Jython and the E language but, as I recall, had an accident and lost the code. If somebody wants to implement it using multiprocessing, go to it! Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: FW: [Tutor] Multi-Threading and KeyboardInterrupt

2009-06-11 Thread Graham Dumpleton
t a tad annoying that people have this, as you loose posts from the record of a discussion and if that post carries useful information, it is lost. Am also curious as to what mechanism for posting you use that allows you to set an expiration time on the post anyway. Are you using old usenet news reader or something? Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-14 Thread Graham Ashton
On 2009-06-14 03:34:34 +0100, Paul Rubin said: Roy Smith writes: In the same vein, Death March, by Ed Yourdon. I've been wanting to read "Antipatterns". I bought it but couldn't get into it. Light on meat, heavy on boredom (for me - these things are always s

Re: Good books in computer science?

2009-06-14 Thread Graham Ashton
On 2009-06-14 14:04:02 +0100, Steven D'Aprano said: Nathan Stoddard wrote: The best way to become a good programmer is to program. Write a lot of code; work on some large projects. This will improve your skill more than anything else. I think there are about 100 million VB code-monkeys who

Re: Good books in computer science?

2009-06-15 Thread Graham Ashton
On 2009-06-14 06:38:32 +0100, koranthala said: The Pragmatic Programmer - Planning to buy, Refactoring: Improving the Design of Existing Code - again planning to buy, These are my top two recommendations for people who can already code a bit, but who want to get really really good. The first

Re: does python have a generic object pool like commons-pool in Java

2009-07-16 Thread Graham Dumpleton
edded mode".  "Daemon mode" is the way to go if you use WSGI. I'd agree, but not sure you really understand the reasons for why it would be preferred. > I haven't tried WSGI; Then why comment on it as if you are knowledgeable on it. > I don't need the grief of a package under heavy development. More FUD. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: web frameworks that support Python 3

2009-08-23 Thread Graham Dumpleton
WSGI for Python 3.0 may work. I would therefore be a bit cautious with your claim. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: How does the file.seek() work ?

2009-08-25 Thread Graham Dumpleton
>     response('200 OK', [('Content-Type', 'text/plain'), ('Content- > > Length', str(len(l)))]) > >     return [l] > > A couple items of note: > > - you don't open the file in binary mode -- seek is more reliable > in binar

Re: mod_python: Permission denied

2009-08-25 Thread Graham Dumpleton
: [Errno 13] Permission denied: '/var/www/keyword-query/files/ > Defrosting.rtf' > > "Defrosting.rtf" is a file on the desktop of my Windows XP computer. > > Anybody knows what the problem is? > > Thanks for your replies. Apache service likely running as a special user which doesn't have write permission to your directory. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: web frameworks that support Python 3

2009-08-25 Thread Graham Dumpleton
On Aug 26, 12:19 pm, exar...@twistedmatrix.com wrote: > On 01:41 am, a...@pythoncraft.com wrote: > > > > > > >In article > >, > >Graham Dumpleton   wrote: > >>On Aug 24, 6:34=A0am, Sebastian Wiesner wrote: > > >>>In any case, there

Re: Python on the Web

2009-08-25 Thread Graham Dumpleton
ng at Werkzeug, Paste/Pylons and bobo. I'll comment more on original message later. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on the Web

2009-08-25 Thread Graham Dumpleton
modwsgi/wiki/ChangesInVersion0300 The other option is CherryPy WSGI server as that is close to a Python 3.X release as well, as I perceive it. I wouldn't bother waiting for WSGI 2.0. That is more of a pipe dream. There will be an updated WSGI 1.0 for Python 3.0. Graham > I apologize if th

Re: Python on the Web

2009-08-26 Thread Graham Dumpleton
ism. That is just the way > I do things, whether the community agrees with it or not. The reason I > was asking about Python 3 on the web was just because I like some of > the changes that have been made, and would like to use it for my > framework. That is when I realized that I was abs

Re: Python on the Web

2009-08-27 Thread Graham Dumpleton
riven system. Someone did get a mod_wsgi going on nginx, which is also event driven, but it has limitations due to possibility of blocking other traffic to web server. See: http://blog.dscpl.com.au/2009/05/blocking-requests-and-nginx-version-of.html Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Graham Dumpleton
reters. The simplified GIL state API you mentioned only works for threads operating in the main (first) interpreter created within the process. The OP can do what they want, but they need to user lower level routines for creating their own thread state objects and acquiring the GIL against them.

Re: The future of Python immutability

2009-09-07 Thread Graham Breed
tes.com/topic/python/answers/752154-list-tuple >>a = ([1], 2) >>a[0] += [3] succeeds, but raises an error. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: using python interpreters per thread in C++ program

2009-09-07 Thread Graham Dumpleton
On Sep 7, 6:47 pm, ganesh wrote: > On Sep 7, 3:41 pm, Graham Dumpleton > wrote: > > > On Sep 7, 3:42 pm, sturlamolden wrote: > > interpreters. The simplified GIL state API you mentioned only works > > for threads operating in the main (first) interpreter created wi

Re: using python interpreters per thread in C++ program

2009-09-08 Thread Graham Dumpleton
3.1 the documentation for the APIs seems to merely state some of the limitations and that it is a hard problem, even still saying that problem would be addressed in future versions. Graham -- http://mail.python.org/mailman/listinfo/python-list

Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-24 Thread logan . c . graham
Hey guys, I'm learning Python and I'm experimenting with different projects -- I like learning by doing. I'm wondering if you can help me here: http://i.imgur.com/KgvSKWk.jpg What this is is a publicly-accessible webpage that's a simple database of people who have used the website. Ideally wha

Re: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-25 Thread logan . c . graham
Sorry to be unclear -- it's a screenshot of the webpage, which is publicly accessible, but it contains sensitive information. A bad combination, admittedly, and something that'll be soon fixed. -- http://mail.python.org/mailman/listinfo/python-list

Re: Total Beginner - Extracting Data from a Database Online (Screenshot)

2013-05-27 Thread logan . c . graham
On Saturday, May 25, 2013 6:33:25 PM UTC-7, John Ladasky wrote: > On Friday, May 24, 2013 4:36:35 PM UTC-7, Carlos Nepomuceno wrote: > > > #to create the tables list > > > tables=[[re.findall('(.*?)',r,re.S) for r in > > re.findall('(.*?)',t,re.S)] for t in > > re.findall('(.*?)',page,re.S)] >

Image Module

2005-04-12 Thread Nicholas S. Graham
I want to convert a field of 4:2:2 digital video data into a viewable format (.jpg or something) using the Image module. Any suggestions?? NG -- http://mail.python.org/mailman/listinfo/python-list

File date attribute

2006-01-28 Thread Bruce R Graham
Hi: am a Newbie and this is my first script: We were recently burgled and had our computers stolen. Easy to replace, but the data that was lost is years and years of work. I've investigated offsite data backup but it seems expensive. In any case, the data we have is not volumous. Rather, would like

<    1   2   3