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

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: how can I run python interactively?

2005-11-02 Thread Graham
You could use either: s = raw_input("Please Hit a Key...") s being the string they typed before hitting enter. or you could use print "Please hit a key..." s = sys.stdin.readline() the only reason i recommend the second is because i believe i saw in a PEP that raw_input was being de

Re: how to write a blog system with Python

2005-11-02 Thread Graham
Are you fresh to Python or just to this group? There are quite a few python frameworks that provide functionality for blogs. You'll just have to decide which one you want to try out. -- http://mail.python.org/mailman/listinfo/python-list

Class Variable Access and Assignment

2005-11-03 Thread Graham
class variables via the class itself or via instances of that class. Any response would be greatly appreciated. Graham -- http://mail.python.org/mailman/listinfo/python-list

Class Variable Access and Assignment

2005-11-03 Thread Graham
class variables via the class itself or via instances of that class. Any response would be greatly appreciated. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-03 Thread Graham
e common way of referring to a class variable. is . the norm? or . the norm. I just seems to me that . shouldn't defer to the class variable if an instance variable of the same name does not exists, it should, at least how i understand it raise an exception. Is my thinking way off her

Re: Class Variable Access and Assignment

2005-11-03 Thread Graham
tand why its implemented this way. Because it acts in a different way than you expect. It seems to me that self.instance_count should not create a new entry in the __dict__ if a class variable of that name is already present anywhere in that objects hierarchy. Does that make sense? Again thank yo

Re: Class Variable Access and Assignment

2005-11-03 Thread Graham
. is there so that you dont have to type .__class__. all the time. Once again many thanks, i hadn't expected nearly this type of response. Graham. -- http://mail.python.org/mailman/listinfo/python-list

Selective HTML doc generation

2005-02-23 Thread Graham
ody know of anything that let's you do it? I realise I may end up doing some hacking here but don't want to repeat work unnecessarily. Cheers, Graham -- http://mail.python.org/mailman/listinfo/python-list

MS SQL Server/ODBC package for Python

2005-04-15 Thread Graham
I need a SQL Server or ODBC package for Python. Can anyone help please? Have search the Python packages under Database and there is no reference to either SQL Server or ODBC. Thanks Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: MS SQL Server/ODBC package for Python

2005-04-15 Thread Graham
the PythonPath and look under Standard Python Library I can't see mx. Any ideas what I mnay have done wrong? many thanks Graham "Simon Brunning" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On 4/15/05, Graham <[EMAIL PROTECTED]> wrote: > I need a

Re: Clearing the screen

2006-02-15 Thread Graham
you could always use ANSI escape codes: print "\\033[2J" for a screen clear, or print "\\022[2j \033[0;0H" to clear and reset the way "os.system('clear')" would work. check out http://www.termsys.demon.co.uk/vtansi.htm Seems like all that mud prog

Safe Python Execution

2006-02-15 Thread Graham
e file access and importing as far as i can tell. Can anyone think of a hack around this? I assume if it was this easy it would be a module already but i figured i would ask. Graham. -- http://mail.python.org/mailman/listinfo/python-list

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

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

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

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

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

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

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:

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

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: 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: ssh or other python editor

2005-10-04 Thread Graham Fawcett
done, you can load, edit and save files quite transparently. Not everybody's cup of tea, but there you are. :-) Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: MS Word Outline -> reStructuredText script?

2005-10-14 Thread Graham Fawcett
e end of the day, I think this would be easier than, e.g., trying to use win32com to traverse the document's object model. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: write a loopin one line; process file paths

2005-10-24 Thread Graham Fawcett
Xah Lee wrote: > Dear Peter Hansen, > My messages speak themselfs. You and your cohorts's stamping of it does > not change its nature. And if this is done with repetitiousness, it > gives away your nature. Taunt not the cohorts of Peter Hansen! Graham -- http://mail.python.org

Re: Python and Lotus Notes

2005-11-02 Thread Graham Fawcett
ve tried using Python and COM, you'll scream whenever you have to write LotusScript, and you'll wish like crazy that Notes/Domino supported Python as a native scripting language. :-) Jython kind of works, but I never got it happily running for server-side code, alas. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: ADT for restricted set of values

2005-11-03 Thread Graham Fawcett
#x27;) Gender('female') assert Gender('male') == 'male' Gender('shemale') The last will return an error: AssertionError: value 'shemale' not in ['male', 'female', 'unknown'] Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Lotus Notes

2005-11-04 Thread Graham Fawcett
oded" to your earlier 5.x COM interface, and gen_py would be a likely suspect. Also, If you have another language that you can use to do COM, e.g. Visual Basic (in any of the MS Office apps, or in Visual Studio), verify that you can create a Lotus.NotesSession using those environments as well. It

Re: python win32 and COM? for internet monitoring

2005-11-22 Thread Graham Fawcett
among other programs. Much more portable than COM, and there are Python wrappers for it, IIRC. You could also implement an HTTP proxy server in Python; Google should turn up numerous existing implementations. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Stealing focus: emacs, and PIL, in Windows

2005-11-26 Thread Graham Fawcett
e keyboard mapping. (The (require 'python-mode) call ensures that the py-mode-map variable has been initialized.) You could provide an alternate mapping for your new function, of course. If you put the custom function and your define-key call both in your .emacs file, then you can easily por

Re: Winsound doesn't play whole sound?

2005-11-30 Thread Graham Fawcett
script: import time time.sleep(10) Did the file play for ten seconds longer? I don't know anything about winsound, but I'm guessing that the PlaySound call is non-blocking, and your playback stops because your process is quitting before the sound has played. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Graham Fawcett
hat's the kind of thing that canon-keepers obsess about, while the rest of us just get along and communicate with one another. (By "us", I mean "us people", not "us continents" -- I stopped speaking as Antarctica a few lines back.) keep-your-stick-on-the-ice'ly yours, Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Web App like Google

2005-07-12 Thread Graham Fawcett
m your tables, run system commands, etc. You can save a lot of worry by using a database account with read-only privileges, but you still have to be careful. My advice is to read up on "sql injection" before going too public with your code. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Graham Fawcett
ults[lname].append((row_name, allele)) # a quick look at the results. for lname, matches in results.items(): print '%s %d' % (lname, len(matches)) Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Graham Fawcett
Sebastian Bassi wrote: > On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote: > > This looks a lot like 2D data (row/column), not 3D. What's the third > > axis? It looks, too, that you're not really interested in storage, but > > in analy

Re: wxPython Notebook crash when pressing alt key

2005-09-22 Thread Graham Fawcett
n 2.4.1 Build 247 (ActiveState Corp.) based on Python 2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)] on win32 >>> import wx >>> wx.__version__ '2.6.1.0' It's the unicode build, in case that makes any difference. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Selective HTML doc generation

2005-02-24 Thread Graham Ashton
Thanks Brian, much appreciated. Looks quite straightforward. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python mascot proposal

2004-12-13 Thread Graham Fawcett
thick-glassed geek! "Whatcha gonna do, when the world's most powerful dynamic language comes after you?" -- Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting directory size

2005-03-21 Thread Graham Fawcett
comes a two-liner: from path import path dir_size = sum([f.size for f in path('mydir').walkfiles()]) With Python 2.4 genexps, you don't even need the square brackets... http://www.jorendorff.com/articles/python/path/ Shoulda-been-added-to-the-standard-library'ly yours, -- Graham -- http://mail.python.org/mailman/listinfo/python-list

String manipulation

2005-04-13 Thread Nicholas Graham
I'm writing a program that requires some string manipulations. Let's say I have a string s='x' Now, the ascii code for 'x' is 0x78. I want to be able to perform operations on this number, and print the character corresponding to the results of the operation. For example, the pseudo-code lo

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

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

Re: Parser or regex ?

2005-12-16 Thread Graham Fawcett
ay also be of help in writing tree-walker code to extract the bits you want. With the example session above, class KwVisitor(compiler.visitor.ASTVisitor): def visitKeyword(self, node): print '>>', node compiler.visitor.walk(node, KwVisitor()) would output: >> Keyword('keywarg', Const('value')) >> Keyword('keywarg2', Const('value2')) >> Keyword('default', CallFunc(Name('list'), [Const('val1'), Const('val2')], >> None, None)) Note that with a bit of black magic, you can modify the AST, and then compile the transformed AST into a callable codeblock. Tools like Quixote's PTL template language use this approach to introduce new behaviours into Python-like code at compliation time. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Graham Fawcett
is a spec and there's no canonical implementation. This all reminds me of one my favourite quotes from python-list of yore: So python will fork if ActiveState starts polluting it? I find it more relevant to speculate on whether Python would fork if the merpeople start invading

Re: Guido at Google

2005-12-22 Thread Graham Fawcett
order. I heard that the PSU [suspicous premature end-of-sentence] Steve, I hope that the PSU is just jamming your comms, and not holding you captive over the holidays for your transgressions against the cabal! Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Graham Fawcett
Peter Hansen wrote: > Graham Fawcett wrote: > > Steve Holden wrote: > >>>Nicola Musatti wrote: > >>>Of course, I'm going on vacation next week and there was talk > >>>about a one-way ticket to Mexico. The real question is will they let me >

Re: COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread Graham Fawcett
gt; InternetExplorerEvents) > > that created the automation object. How do I perform the test in > Python? This recipe might give you some clues; you can use the Busy attribute, instead of a DocumentComplete handler: http://herlock.com/ob/pythoncb/0596007973/chp-10-sect-15.html Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: exec a string in an embedded environment

2006-01-11 Thread Graham Fawcett
PyObject *args, PyObject *kw); Does this help? Graham -- http://mail.python.org/mailman/listinfo/python-list

Newbie..Needs Help

2006-07-28 Thread Graham Feeley
time on his hands willing to help me Regards Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie..Needs Help

2006-07-28 Thread Graham Feeley
the meeting tracks Hope this more enlightening Regards graham "Graham Feeley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi this is a plea for some help. > I am enjoying a script that was written for me and its purpose is to > collect data from a web s

Re: Newbie..Needs Help

2006-07-29 Thread Graham Feeley
for you just ask and I will try my best. I really appreciate what you have done. Of course I will try to follow your code to see if any will fall on meLOL Regards Graham "Anthra Norell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > - Original Message

Re: os.path.normpath

2006-08-16 Thread Graham Dumpleton
I can't seem to find posixpath in the docs, but I can import posixpath > and a dir shows it does indeed have a normpath. Quoting: http://www.python.org/doc/2.3.5/lib/node750.html it says: posixpath -- Implementation of os.path on POSIX. What it provides is therefore documented by os.path module. The posixpath module is still accessible on non POSIX platforms though. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-07 Thread James Graham
Steve Holden wrote: > Giovanni Bajo wrote: > [...] >> >> I understand your concerns, but I have to remember you that most bug >> reports >> submitted by users go totally ignored for several years, or, better, >> forever. I >> do not have a correct statistic for this, but I'm confident that at >>

WebScraping

2006-11-04 Thread Graham Feeley
Can someone steer me to scripts / modules etc on webscraping please??? Ultimately I would like someone to write a script for me. However i am still searching for documentation on this subject Thanks Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python installation problem ..severity High

2006-11-14 Thread Graham Dumpleton
tion there as there is a higher concentration of people there who are familiar with the software. Details of the mod_python mailing list are on the mod_python web site. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: RSS aggregator with curses and feedparser

2006-09-24 Thread James Graham
Roberto Bechtlufft wrote: > And another thing: feedparser returns the result entries as > dictionaries. What's the best approach to create my cache file? I see > that the cache file in liferea is an xml file. Should I try to create > my own xml file based on the results from feedparser? Well you c

Re: WebScraping

2006-11-19 Thread Graham Feeley
Well I would like to publicly thank Bernard Chhun for actually writing this script and "pretting " it up for me. He is truly a talented guy. He used Beautifull Soup and Regex which i am still coming to terms trying to understand them any way Thanks again Bernard. Regards graham &quo

Re: Python, WSGI, legacy web application

2006-11-22 Thread Graham Dumpleton
s easing any transition. If you are interested in this path, the mod_python mailing list may be a good place to go to discuss the mod_python aspects of this. The mod_python mailing list details are on the mod_python web site at www.modpython.org. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: WSGI with mod_python (was: Python, WSGI, legacy web application)

2006-11-23 Thread Graham Dumpleton
g mod_rewrite can be a pain though. Yet another way may be to use mod_proxy to selectively forward URLs through to a separate back end web server if you are Apache phobic and want to use a web server written in pure Python. Overall, Apache/mod_python has a lot to offer, but from what I have seen mos

Re: Mod_python vs. application server like CherryPy?

2006-12-06 Thread Graham Dumpleton
ake use of the underlying Apache functionality, you are binding yourself to Apache though and your stuff isn't portable to other web servers. Also, your job in part becomes more about integrating stuff to come up with a solution, rather than just writing pure Python code, something that many P

Re: Mod_python vs. application server like CherryPy?

2006-12-06 Thread Graham Dumpleton
Vincent Delporte wrote: > On 6 Dec 2006 14:55:58 -0800, "Graham Dumpleton" > <[EMAIL PROTECTED]> wrote: > >Although WSGI is an extreme case because of the level it pitches at, > >other systems such as CherryPy and Django aren't much different as they >

Re: apache & mod_python

2006-12-09 Thread Graham Dumpleton
les use the full thread API for Python properly, it doesn't matter which interpreter instance they are used from. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Mod_python vs. application server like CherryPy?

2006-12-09 Thread Graham Dumpleton
ally in a corporate environment, where one doesn't have a choice but to deal with code developed over time and in different languages with a result that most of the time you are writing more glue and than actual application code. Thus, in an ideal world you might be able to write in Python and nothing else, but it isn't always an ideal world. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python.so is garbled mod_python.so is garbled

2006-12-13 Thread Graham Dumpleton
perhaps used: --with-apxs=/usr/local/apache2/bin/apxs Ie., is the version of Apache you compiled for actually the version you are running it with? Do you have multiple versions of Apache installed on your system? Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache 2.2.3 and mod_python 3.2.10

2006-12-19 Thread Graham Dumpleton
od_python.publisher functions in the same module, and don't use files called 'test.py' as there is a standard Python module by the same name and if things aren't set up right you can be picking up the wrong module. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Page layouts in mod_python?

2006-12-19 Thread Graham Dumpleton
you want to do, I would suggest you might take the conversation over to the mod_python user mailing list. Details for the list are on the mod_python web site. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE: Mod_python 3.3.0b (Beta)

2006-12-25 Thread Graham Dumpleton
ng this beta version in the first place, especially when compilation on different platforms is always a part of what we want tested in releasing a beta. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Mod_python

2006-12-27 Thread Graham Dumpleton
e handled using the FieldStorage file callbacks to have the file stored in the desired location from the outside. The other alternative to FieldStorage is to write a custom Apache/mod_python input filter to process uploads. An example of this is Tramline (http://www.infrae.com/products/tramline). Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: per interpreter storage for C extensions

2006-12-28 Thread Graham Dumpleton
://www.dscpl.com.au/wiki/ModPython/Articles/TheProcessInterpreterModel Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about the "new" module

2006-12-29 Thread Graham Dumpleton
dules are used in web applications to represent pages. You may want to look at documentation for it at: http://www.modpython.org/live/mod_python-3.3.0b/doc-html/pyapi-apmeth.html Graham -- http://mail.python.org/mailman/listinfo/python-list

[ANN] html5lib 0.2

2007-01-09 Thread James Graham
DESCRIPTION HTML parsing library based on the WHATWG Web Applications 1.0 "HTML5" specification[1]. The parser is designed to work with all existing flavors of HTML and implements well-defined error recovery that has been specified though analysis of the behavior of modern desktop web browsers.

injecting functions into a python sandbox within a python program

2007-01-09 Thread Graham Menhennitt
m sure that this is simple to get around for a Python expert (which I am not!). Does anybody have any ideas? Any alternate approach? Thanks in advance for any assistance, Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: the problem wtih cgi

2005-05-27 Thread Graham Fawcett
be sure to include your CGI script's code. -- Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple python interpreters within the same process

2007-06-09 Thread Graham Dumpleton
an work, have a look at mod_python and mod_wsgi. Both make use of multiple Python interpreter instances in a single process. The mod_wsgi documentation even points out the above problems with C extension modules in latter sections of: http://code.google.com/p/modwsgi/wiki/ApplicationIssues Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: How does mod_python know where's Python installed ?

2007-06-12 Thread Graham Dumpleton
on is linked against. Because it looks in PATH, this will not always work when people have multiple versions of Python installed on their system with different base directories. See: https://issues.apache.org/jira/browse/MODPYTHON-225 for further details in respect of that problem. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi.FieldStorage() not working on Windows

2007-06-12 Thread Graham Dumpleton
to run CGI scripts. Rather than bring mod_python into the picture and confuse things, set up Apache to run your script as a traditional CGI script instead. BTW, the fact that mod_python is loaded means that CGI scripts aren't the only way of using Python available to you as you seem to think. So, suggest you do some research as to what the differences are between CGI and mod_python. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi.FieldStorage() not working on Windows

2007-06-13 Thread Graham Dumpleton
27;ll have to get someone else who has Windows to try it. You might be better off going to the mod_python mailing list to get help, or just use plain old CGI instead since using mod_python isn't really going to gain you much anyway. Graham > On Jun 12, 7:59 pm, Graham Dumpleton <[EMAIL PR

Re: Trivial string substitution/parser

2007-06-17 Thread Graham Breed
Samuel wote: > Thanks, however, turns out my specification of the problem was > incomplete: In addition, the variable names are not known at compilation > time. > I just did it that way, this looks fairly easy already: > > --- > import re > > def variable_sub_cb(match): >

Re: Trivial string substitution/parser

2007-06-18 Thread Graham Breed
f he really does want to reject single letter variable names, or names beginning with a backslash, he'll still need to subclass Template and supply a regular expression, but a simpler one. > ... and in another message Graham Breed wrote: > > def get_variable(varname): > >

Re: Trivial string substitution/parser

2007-06-19 Thread Graham Breed
kslash escape pattern ... \$(?: ... (?P[_a-z][_a-z0-9]*)| # delimiter and identifier ... {(?P[_a-z][_a-z0-9]*)} | # ... and braced identifier ... (?P) # Other ill-formed delimiter exprs ... ) ... """ >>> class BackslashEscape(Template): ... patter

Re: Text-To-Speech for the Mac (OS X)

2007-06-20 Thread Graham Dumpleton
#x27;say read the man page for "say"') :-) Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Using PSE under Win32

2007-06-24 Thread Graham Dumpleton
ndler set to and what does it identify? The error above suggests that whatever you identify as the handler is not a callable object like a function. Are you perhaps identifying some sort of PSE template object as target when you shouldn't be? Post your handler code so we can see it. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-24 Thread Graham Breed
he let and set). And you're also the kind of person who's troubled by perplexing bugs but doesn't run a fully fledged lint. Maybe that's the kind of person who wouldn't put up with anything short of a macro as in the original proposal. All I know is that it's the kind of person I don't want to second guess. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: server wide variables

2007-06-25 Thread Graham Dumpleton
en if they have to survive just within the context of that specific interpreter within that process, as os.environ access and update is not thread protected and Apache child processes may be multithreaded. So, read that referenced document and then perhaps explain you expectations a bit better.

Re: server wide variables

2007-06-25 Thread Graham Dumpleton
On Jun 26, 10:29 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Jun 26, 1:29 am, Jay Sonmez <[EMAIL PROTECTED]> wrote: > > > I want to be able to save some server variables as long as Apache runs > > on the server (mod_python). > > > How is that possib

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Graham Breed
Douglas Alan wote: > Graham Breed <[EMAIL PROTECTED]> writes: > > > Another way is to decorate functions with their local variables: > > >>>> from strict import my > >>>> @my("item") > > ... def f(x=1, y=2.5, z=[1,2,4]): > >

Changing default output object for

2007-06-27 Thread Graham Dumpleton
way, could byte code manipulation provide another way. Anyway, just curious as to whether it would be possible or not and if someone has an example of doing it using byteplay or similar would love to see what is required. Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Graham Breed
acrolib1 import keyword as foo". And to be truly Pythonic the keywords would have to be scoped like normal Python variables. One problem is that such a system wouldn't be able to redefine existing keywords. Lets wait for a concrete proposal before delving into this rats' cauldron

Re: mod_python & doc file system layout

2007-07-04 Thread Graham Dumpleton
gt; >Any mod_python users out there with any other solutions? In the subdirectories containing your static files add a .htaccess file containing: SetHandler None Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Client-side cookies on Python in Mac OSX

2007-07-12 Thread Graham Dumpleton
so I'm hoping > there is a solution for this... They didn't remove it, it was never there in the first place. The ClientCookie site says 'Python 2.0 or above is required'. It doesn't say it is included with Python distributions. The package still has to be installed separately. See: http://wwwsearch.sourceforge.net/ClientCookie/ Graham -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing mod_python on mac os 10.4.7

2007-07-14 Thread Graham Dumpleton
will need to use the --with-apxs option to configure when building Python. Unless you really need Python 2.4, it is easier to use the OS supplied version of Python. If you must use an alternate version, use the --with-python option to configure for mod_python to tell it which version. Depending on w

Re: Installing mod_python on mac os 10.4.7

2007-07-14 Thread Graham Dumpleton
On Jul 15, 10:06 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Jul 15, 2:47 am, 7stud <[EMAIL PROTECTED]> wrote: > > > > > Themod_pythonmanual says this under section 2.1 Prerequisites: > > > -- > > In order to compilemod_pythonyou will need

  1   2   3   >