Re: Using a particular python binary with venv

2015-06-01 Thread greenbay . graham
http://bugs.python.org/issue24356 -- https://mail.python.org/mailman/listinfo/python-list

Re: Using a particular python binary with venv

2015-06-01 Thread greenbay . graham
On Tuesday, 2 June 2015 09:43:37 UTC+12, Carl Meyer wrote: > On 06/01/2015 03:33 PM, orotau wrote: > > According to this > > https://docs.python.org/3.4/library/venv.html#module-venv 'Each > > virtual environment has its own Python binary (allowing creation of > > environments with various Pyth

Using a particular python binary with venv

2015-06-01 Thread greenbay . graham
According to this https://docs.python.org/3.4/library/venv.html#module-venv 'Each virtual environment has its own Python binary (allowing creation of environments with various Python versions)' So how would I create a virtual environment using the venv module that has a Python 2.7 binary? tia g

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)] >

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

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: AttributeError: ' ' object has no attribute ' '

2013-02-23 Thread Graham Fielding
> Date: Sat, 23 Feb 2013 10:22:54 -0800 > Subject: AttributeError: ' ' object has no attribute ' ' > From: matt.doolittl...@gmail.com > To: python-list@python.org > > I am using Ubuntu 12.10, and Python 2.7.3, GNU Radio Companion v3.6.3. I get > the this error in terminal: > > in __init_

Inserting Unicode chars in Entry widget

2012-12-29 Thread Alan Graham
Hello Python experts, I want to insert Unicode chars in an Entry widget by pushing on buttons; one for each Unicode character I need. I have made the Unicode buttons. I just need a simple function that will send the Unicode character to the Entry widget. Is there a better approach? Alan -- http:

RE: What are the minimum requirements to get a job in?

2012-12-13 Thread Graham Fielding
> Date: Thu, 13 Dec 2012 18:49:32 -0800 > Subject: What are the minimum requirements to get a job in? > From: suresh.pinn...@gmail.com > To: python-list@python.org > > My aim is to get a job into google or cisco or facebok. > I have basic knowledge in python,c,java and good in javascript,html,

Issue with seeded map generation

2012-12-08 Thread Graham Fielding
Hey, all! I've managed to get my project to a semi-playable state (everything functions, if not precisely the way I'd like it to). One small issue is that when the player movs from one level to the next, the items and monsters in the previous level all 'reset' and return to the positions th

RE: Is it bad style to override the built-in function `type`?

2012-11-24 Thread Graham Fielding
(This comes from my experience writing interactive fiction with the TADS workbench; YMMV) As a rule, it's generally unwise to modify built-in variables without thoroughly documenting your changes. Your modifications might not hold up if the built-in definitions are revised (which would break y

RE: Getting a seeded value from a list

2012-11-24 Thread Graham Fielding
Just a quick update: after enlisting some help from a friend, we managed to get things working :) Thanks for all the help. In the area of items and monsters, they're both chosen from lists, based on some simple selection criteria (number per room, total per level, chance of appearance). Now,

Getting a seeded value from a list

2012-11-18 Thread Graham Fielding
Hello! Clueless noob again! :) This time around, I'm trying to figure out the random.seed() function -- specifically, I'd like to retrieve the seeded values from a list (which I've called levelSeed), and use them in a random-dungeon generator. The numbers are generating and storing properl

RE: Writing game-state data...

2012-11-09 Thread Graham Fielding
> To: python-list@python.org > From: breamore...@yahoo.co.uk > Subject: Re: Writing game-state data... > Date: Fri, 9 Nov 2012 07:37:56 + > > On 09/11/2012 07:20, Graham Fielding wrote: > > > > Hey, folks, me again! I've been puzzling over this for a

Writing game-state data...

2012-11-08 Thread Graham Fielding
Hey, folks, me again! I've been puzzling over this for a while now: I'm trying to write data to a file to save the state of my game using the following function: def save_game(): #open a new empty shelve (possibly overwriting an old one) to write the game data file_object = open('sav

Issues with python/libtcod

2012-11-07 Thread Graham Fielding
Hey, all. I'm trying to program a roguelike, using the wonderful tutorials written by João F. Henriques (a.k.a. Jotaf), but I've stumbled onto a bit of a problem setting up the game's inventory system, and I was hoping someone could help me out. Here's a code snippet, including the affected

Re: Python on Windows

2012-10-19 Thread graham
On 19/10/2012 14:24, graham wrote: On 16/10/2012 12:29, graham wrote: Downloaded and installed Python 2.7.3 for windows (an XP machine). Entered the Python interactive interpreter/command line and typed the following: >>>import feedparser and I get the error message "N

Re: Python on Windows

2012-10-19 Thread graham
On 16/10/2012 12:29, graham wrote: Downloaded and installed Python 2.7.3 for windows (an XP machine). Entered the Python interactive interpreter/command line and typed the following: >>>import feedparser and I get the error message "No module named feedparser". There

Python on Windows

2012-10-16 Thread graham
Downloaded and installed Python 2.7.3 for windows (an XP machine). Entered the Python interactive interpreter/command line and typed the following: >>>import feedparser and I get the error message "No module named feedparser". There is a feedparser.py file lurking around - so I supp

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Graham Cooper
On Mar 31, 12:18 pm, "Stretto" wrote: > "Joe Snodgrass" wrote in message > > news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... > > > > > > > > > FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery > > >http://tinyurl.com/4d56zsz > > > The FBI is seeking the pu

Re: Strange occasional marshal error

2011-03-03 Thread Graham Stratton
this is observed, but since the code is single-threaded I don't think they can have any effect during marshalling. Thanks, Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange occasional marshal error

2011-03-03 Thread Graham Stratton
On Mar 2, 3:01 pm, Graham Stratton wrote: > We are using marshal for serialising objects before distributing them > around the cluster, and extremely occasionally a corrupted marshal is > produced. The current workaround is to serialise everything twice and > check that the serialisat

Strange occasional marshal error

2011-03-02 Thread Graham Stratton
e above is enough information for someone to speculate as to where the problem is. Many thanks in advance for any help. Regards, Graham -- http://mail.python.org/mailman/listinfo/python-list

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: 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

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: 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
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: 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: 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-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-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: 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: 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: 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: 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: 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: 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: 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-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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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-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-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: 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: 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

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: 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.

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: 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: 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: 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: 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: 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: 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-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: 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

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: 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

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
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: 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: 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
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: 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-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: 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: 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: 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 question: reading headers before message body has been read

2009-01-18 Thread Graham Dumpleton
that 100-continue requests not always working for daemon mode. You need to apply fix in: http://code.google.com/p/modwsgi/issues/detail?id=121 For details on LimitRequestBody directive see: http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Parent module not loaded error

2009-01-14 Thread Graham Dumpleton
On Jan 14, 9:41 pm, Ståle Undheim wrote: > On Jan 14, 11:31 am, Graham Dumpleton > wrote: > > > > > On Jan 14, 9:20 pm, Ståle Undheim wrote: > > > > I have a pretty strange error that I can't figure out the cause off. > > > This is in a Django ap

Re: Parent module not loaded error

2009-01-14 Thread Graham Dumpleton
r anywhere else, are always done by site package root reference and not direct. Ie., such that it uses mysite.d4 and not just d4. Would that seem about right? 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: 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: 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_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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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-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: 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

  1   2   3   >