On Monday, April 15, 2013 2:35:10 PM UTC-6, Tobiah wrote:
> > tup = *func()
> What is the asterisk for? I assume it's a python 3
Not Python 3, pseudocode. I should have said as such, sorry. Supposed to
indicate an expanded tuple.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-li
Say I have a tuple I want to expand assigning to variables:
tup = *func()
var = tup[0]
lst.append(tup[1])
Or could I do it in one line?
var, lst.append() = *func()
So I want to append one variable to a list on the fly, is it possible?
-- Gnarlie
http://gnarlodious.com
--
http://mail.python.or
Thank you for a reasonable discussion of the problem, although I don't really
understand what you said. This is a WSGI webapp configured for one-process and
one-thread.
I can imagine my unorthodox handling of imported modules is suspect. To
explain, my webapp first loads modules from a dict of
Graham Dumpleton has informed me that the the relevant bug reports are:
http://bugs.python.org/issue8098
http://bugs.python.org/issue9260
To quote:
All the problems derive from a stupid function in Python internals called
PyImport_ImportModuleNoBlock(). It was designed to avoid lockups of the i
Chris Angelico wrote:
> The problem here is that Python
> doesn't have any magical way to deal with messy imports in
> multiple threads
But couldn't Py 3.3.1 at least raise an error mentioning threading as a
possible cause? Because "No module named _strptime" is pretty cryptic.
-- Gnarlie
--
Nick Cash wrote:
> I was able to work around this by simply importing _strptime myself at server
> startup time.
THANK YOU! That fixed it, I simply put
import _strptime
in my *.wsgi script. It feels like a kludgy solution, but it works.
I should also mention that I had a similar problem with
Thanks for the help.
This error only occurs on my devbox which is running Py 3.3.0:
print(time.__file__, file=sys.stderr)
/usr/local/python-3.3.0/frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/time.so
which looks normal to me.
The server box, which is running Py 3.1.3, says t
Error: AttributeError: 'module' object has no attribute '_strptime'
This problem is driving me crazy. It only happens in Python 3.3.0, while on my
server running 3.1.3 it behaves as expected. When I try to access
time.strptime() it errors with
AttributeError: 'module' object has no attribute '_
On Tuesday, December 18, 2012 3:31:41 AM UTC-7, Hans Mulder wrote:
> On 18/12/12 06:30:48, Gnarlodious wrote:
>
> > This problem is solved, I am so proud of myself for figuring it out!
>
> > After reading some of these ideas I discovered the plist is really
>
> >
This problem is solved, I am so proud of myself for figuring it out! After
reading some of these ideas I discovered the plist is really lists underneath
any "Children" key:
from plistlib import readPlist
def explicate(listDicts):
for dict in listDicts:
if 'FavIcon' in d
Hello. What I want to do is delete every dictionary key/value of the name
'Favicon' regardless of depth in subdicts, of which there are many. What is the
best way to do it?
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
The pydoc.html.docmodule sends a page with clickable links relative to the
script location. Is there a way to tell pydoc to prepend a string to those URLs?
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
I am rolling my own, and learning Python at the same time.
One more question. Say I want to assemble a list of tuples like this:
modules = ['wsgiref', 'http']
import imp
[(imp.find_module(module)[1], os.path.getmtime(imp.find_module(module)[1])) for
module in modules]
Can I in some way assign i
Roy Smith wrote:
> import imp
> imp.find_module()
Oh yeah that works. I am getting a list of modtimes using List Comprehension,
from a list of modules, which will be compared to an older list to see if
mod_wsgi needs to be restarted.
Maybe thee is an easy way to get the modtimes, I'd be gratef
Given a module's name, how do I get the file path without importing it?
Searched all over, can't find any such info.
Is it possible to ask if a named module exists before attempting an import?
Or are we forced to import first and catch any failure?
-- Gnarlie
--
http://mail.python.org/mailman/
Wow, that is so elegant. Python is awesome.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
What is the best way to operate on a tuple of values transforming them against
a tuple of operations? Result can be a list or tuple:
tup=(35, '34', 0, 1, 31, 0, '既濟')
from cgi import escape
[tup[0], "{}".format(tup[1]), bool(tup[2]),
bool(tup[3]), tup[4], bool(tup[5]), escape(tup[6])]
-> [35,
HA! After much experimenting I hit upon getattr(__import__(page), page):
for page in self.allowedPages:
scriptPath = '{}/{}.py'.format(os.path.dirname(__file__), page)
if os.path.exists(scriptPath):
self.modules[page] = getattr(__import__(page), page)
Then in __call_ I just say:
tar
If you are writing your own scripts, I would recommend Py3 for learning. But if
you are studying existing scripts to learn, Py2 might be better.
I have been doing Python for about 2 years and started learning Py3 with no
regrets. Py2 is not going to be "obsolete" for quite a while. It is almost
To explain my reasoning, this scheme will allow me to run the script three
ways, as shell, as one-shot CGI or as a persistent mod_wsgi module.
So to be more exhaustive:
In __init__ I can say:
import Grid
self.Grid = Grid.Grid
self.Grid is now the instance of Grid inside the module Grid.
then
What I am doing is importing modules that have an identical instance
name. So I say:
import Grid
Grid has its instance:
Grid.Grid()
and this is the same for all modules of my webapp.
allowedPages is a list of modules to import, so they are quoted
strings:
for page in self.allowedPages:
seta
On Nov 8, 3:16 pm, Steven D'Aprano wrote:
> content = Data.Dict.SaveEvents(Data.Plist.Events) or content
>
> This will leave content unchanged if no error is returned, otherwise it
> will replace the value.
Ah, the 'or' operator does it. Thank you, that is exactly what I was
looking for.
I should
What I say is this:
def SaveEvents(self,events):
try:
plistlib.writePlist(events, self.path+'/Data/Events.plist') #
None if OK
except IOError:
return "IOError: [Errno 13] Apache can't write Events.plist
file"
Note that success returns"None" while failure returns a string.
I cat
On Nov 1, 3:33 pm, Terry Reedy wrote:
> > for obj, val in zip(Orders, locus):
> > obj.locus = val
>
> > I'm not sure how worthwhile it is converting the above to a list
> > comprehension (when the list would just be thrown away). Having said
> > that the call to zip creates an unnecessary list.
>
I want to assign a list of variables:
locus=[-2, 21, -10, 2, 12, -11, 0, 3]
updating a list of objects each value to its respective instance:
for order in range(len(Orders)):
Orders[order].locus=locus[order]
This works, even though it reads like doggerel. Is there a more
pythonesque way
On Oct 30, 9:15 am, Chris Angelico wrote:
> Orders=[Order(x,y,z) for x,y,z in zip(ratio, bias, locus)]
Brilliant, thanks!
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Initializing a list of objects with one value:
class Order:
def __init__(self, ratio):
self.ratio=ratio
def __call__(self):
return self.ratio
ratio=[1, 2, 3, 4, 5]
Orders=[Order(x) for x in ratio]
But now I want to __init__ with 3 values:
class Order:
def __init__(self, ratio, bias, loc
On Oct 22, 6:41 pm, Chris Rebert wrote:
> The line `someList = self._someList` does NOT copy the list. It make
> `someList` point to the same existing list object.
Thanks for all those explanations, I've already fixed it with a tuple.
Which is more reliable anyway.
-- Gnarlie
--
http://mail.pyt
Say this:
class tester():
_someList = [0, 1]
def __call__(self):
someList = self._someList
someList += "X"
return someList
test = tester()
But guess what, every call adds to the variable that I am trying to
copy each time:
test()
>
Steven: Thanks for those tips, I've implemented all of them. Also only
allowing whitelisted variable names. Feeling much more confident.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 16, 5:25 pm, Steven D'Aprano wrote:
> How do you sanitize user input?
Thanks for your concern. This is what I now have, which merely expands
each value into its usable type (unquotes them):
# filter each value
try:
var=int(var)
except ValueError:
if var in ('False', 'True'):
v
On Oct 15, 5:53 pm, PoD wrote:
> data = {
> 'Mobile': 'string',
> 'context': '',
> 'order': '7',
> 'time': 'True'}
> types={'Mobile':str,'context':str,'order':int,'time':bool}
>
> for k,v in data.items():
> data[k] = types[k](v)
Thanks for the tip, I didn't know you could do
What is the best way (Python 3) to loop through dict keys, examine the
string, change them if needed, and save the changes to the same dict?
So for input like this:
{'Mobile': 'string', 'context': '', 'order': '7',
'time': 'True'}
I want to booleanize 'True', turn '7' into an integer, escape
'',
On Aug 22, 9:39 am, Miki Tebeka wrote:
> HTH
Yes it helps, thank you!
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinfo/python-list
In my last post I learned of the necessity of filtering CGI input, so
what I want to do is set a dict of allowable variable names:
allowedVariables = {'eeny':None, 'meeny':None, 'miny':None, 'mo':None}
# Set up a FieldStorage object:
import cgi
inputVariables = cgi.FieldStorage()
for name, value
On Aug 17, 3:25 am, Chris Angelico wrote:
> You do NOT
> want end users having the power to set variables.
Thanks for the warning, I can see I will need to quarantine the form
input. And update() is out of the question.
-- Gnarlie
http://Gnarlodious.com/
--
http://mail.python.org/mailman/listinfo
I should add that this does what I want, but something a little more
Pythonic?
import cgi, os
os.environ["QUERY_STRING"] = "name1=Val1&name2=Val2&name3=Val3"
form=cgi.FieldStorage()
form
dict = {}
for key in form.keys(): dict[ key ] = form[ key ].value
dict
locals().update(dict)
name3
-- Gnarl
I should add that this does what I want, but something a little more
Pythonic?
import cgi, os
os.environ["QUERY_STRING"] = "name1=Val1&name2=Val2&name3=Val3"
form=cgi.FieldStorage()
form
dict = {}
for key in form.keys(): dict[ key ] = form[ key ].value
dict
locals().update(dict)
name3
-- Gnarl
I get a construct like this:
form=FieldStorage(None, None, [MiniFieldStorage('name1', 'Val1'),
MiniFieldStorage('name2', 'Val2'), MiniFieldStorage('name3', 'Val3')])
Now how would I assign every variable name* its value?
lI did try locals().update(form) however I get
>>> name2
-> MiniFieldStorag
I get a construct like this:
form=FieldStorage(None, None, [MiniFieldStorage('name1', 'Val1'),
MiniFieldStorage('name2', 'Val2'), MiniFieldStorage('name3', 'Val3')])
Now how would I assign every variable name* its value?
lI did try locals().update(form) however I get
>>> name2
-> MiniFieldStorag
On Jul 12, 6:44 pm, Steven D'Aprano wrote:
> All the words are in English, but the sentences make no sense :)
LOL, impressive powers of mind-reading! Exactly what I needed:
import time
class Event:
epoch=time.time()
def doSomething(self, epoch=None):
if epoch is None:
On Jul 12, 8:46 am, Alister Ware wrote:
> I thought that was the role of the __init__ function
>
> class Something:
> def __init__(self):
> self.value="some value"
OK, that sets a value at init time. But is there a similar built-in to
run whenever the class instance is ca
Question. Is there a special method or easy way to set default values
with each call to an instance? Any ideas to make it easier? What I
want to do is have a constantly updating set of values which can be
overridden. Just thought there was an easy way to set that up.
-- Gnarlie
--
http://mail.pyt
On Jul 6, 3:35 am, Christian Heimes wrote:
Thank you! Exactly what I wanted.
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinfo/python-list
Using introspection, is there a way to get a list of "property
getters"?
Does this:
vars=property(getVars(), "Dump a string of variables and values")
have some parsable feature that makes it different from other
functions? Or would I need to use some naming scheme to parse them
out?
-- Gnarlie
On Jun 24, 12:27 am, Terry Reedy wrote:
> > 1) Can I tell Executable.py to share Data with ModuleTest.py?
>
> After the import is complete, yes.
> import ModuleTest
> ModuleTest.Data = Data
>
> This works if the use of Data is inside a function that is not called
> during import, not if the use of
Idea: It occurs to me that my application class inherits "object". Can
I set that to inherit an object that already includes data? So every
subsequent class would start off with data loaded (except for class
Data).
Seems like it should already be invented.
-- Gnarlie
--
http://mail.python.org/ma
Let me restate my question.
Say I have a script Executable.py that calls all other scripts and
controls them:
#!/usr/local/bin/python
from Module import Data
import ModuleTest
ModuleTest.py has this:
print(Data.Plist.Structure)
Running Executable.py gives me this:
NameError: name 'Data' is not
On Jun 23, 12:10 pm, Terry Reedy wrote:
> from test import ftest,itest
>
> def test_main():
>
> if __name__ == '__main__':
> test_main()
I don't understand this. Can you explain, or refer me to some
documentation?
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinf
On Jun 23, 11:42 am, Noah Hall wrote:
> > What about using an environment variable?
>
> Yes, that's fine, but only if the data is suitable for it.
In this case, the variable is a namespace containing the property of a
folder full of plist files. I access any dictionary item anywhere in
my webapp
On Jun 23, 8:42 am, Peter Otten wrote:
> from Module import Data
>
> There, you saved three more characters .
OK I get it, LOL.
> But I don't think it's a good idea. Remember that "explicit is better than
> implicit".
Thanks, now I know what that means.
-- Gnarlie
--
http://mail.python.org/mail
On Jun 23, 7:59 am, Noah Hall wrote:
> >>>from a import x
I'm doing that:
import Module.Data as Data
However I end up doing it in every submodule, so it seems a little
redundant. I wish I could load the variable in the parent program and
have it be available in all submodules. Am I missing someth
Is there a way to declare a project-wide variable and use that in all
downstream modules?
-- Gnarlir
--
http://mail.python.org/mailman/listinfo/python-list
What is the easiest way to get the first number as boolean?
divmod(99.6, 30.1)
Or do I have to say:
flote, rem=divmod(99.6, 30.1)
bool(flote)
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Is there any way to call a Py script from Javascript in a webpage?
I don't have to tell you how messy JS is…
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Say I send a request like this:
http://0.0.0.0/Sectrum/Gnomon?see=Gnomon&order=7&epoch=1303541219
This makes for a CGIform of the CGI Tuple Object type:
FieldStorage(None, None, [MiniFieldStorage('see', 'Gnomon'),
MiniFieldStorage('order', '7'), MiniFieldStorage('epoch',
'1303541219.58')])
So the
Thanks, it looks like the appropriate incantation is:
import pydoc
pydoc.html.docmodule(sys.modules[__name__])
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
SI escaped characters from output for
CGI rendering?
-- Gnarlodious
--
http://mail.python.org/mailman/listinfo/python-list
After copious headscratching I took Ned's advice and went for 3.2
which includes built-in interactive arrow key support. To any Mac OSX
readers, save yourself the trouble and don't even try Python 3.1.3.
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinfo/python-list
Like so:
./configure MACOSX_DEPLOYMENT_TARGET=10.6 \
--enable-framework=/usr/local/python-3.1/frameworks \
--prefix=/usr/local/python-3.1 \
--enable-universalsdk=/ \
--with-universal-archs=intel
Is there some directive to enable Readline?
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.
I updated Python to 3.1.3 on Mac OSX. Now suddenly in the Interactive
interpreter I get all this instead of scrolling the history:
>>> ^[[A^[[A^[[A
What's wrong and how to fix it?
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for all the help, this looks like a bug in mod_wsgi. I tried it
interactively under Py3.1.3 and it behaves normally. I'll take this
over to the mod_wsgi group.
-- Gnarlie
http://Gnarlodious.com
--
http://mail.python.org/mailman/listinfo/python-list
Well, I have a whole lot of scripts where I could say something like
this:
def __init__(self, var1, var2, var3...):
Now suddenly I have to change them all to run in Python 3.1.3?
This is apparently not a bug. And I rebooted still getting the same
behavior.
Can someone explain it?
-- Gnarlie
--
I don't have a trace because I am using mod_wsgi under Apache. Maybe
there is a way to debug using mod_wsgi but I haven't been able to
figure out how.
My problem is that in order to run mod_wsgi I had to downgrade to
Python 3.1.3 which may be causing the problem. This website was
running fine in P
Can someone please explain what I am doing wrong?
Calling script:
from Gnomon import GnomonBase
Gnomon=GnomonBase(3)
Called script:
class GnomonBase(object):
def __init__(self, bench):
# do stuff
But all I get is:
TypeError: __init__() takes exactly 1 positional argument (2 given)
It turns out Python 3.2 now honors closing sqlite connections opened
in another module. Previous versions allowed you to have identically
named sqlite connections open in other modules. Python 3.2 apparently
treats them all as the same connection.
Hopefully some other victim will find this, becaus
I installed Python 3.2, suddenly getting an error on my sqlite pages
(CGI):
ProgrammingError: Cannot operate on a closed cursor
Works normally in interactive mode. Seems to error when the sqlite
statement is in a function. Are sqlite objects now required to be
declared global?
-- Gnarlie
--
htt
My scripting has grown to the point where the Apache server is a
problem. My Python websites run and quit, which means I need to save
data and recreate everything next page load. Bulky and slow. What is
the simplest solution?
I am running Py3 on OSX Server with Apache 2. Essentially I want
certain
On Apr 25, 10:59 pm, Steven D'Aprano wrote:
> In Python 3, map becomes lazy and returns an iterator instead of a list,
> so you have to wrap it in a call to list().
Ah, thanks for that tip. Also works for outputting a tuple:
list_of_tuples=[('0A',), ('1B',), ('2C',), ('3D',)]
#WRONG:
(x for (x,)
On Apr 25, 9:42 pm, CM wrote:
> flat_list = [item[0] for item in returned_list]
HA! So easy. Thanks.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
I have an SQLite query that returns a list of tuples:
[('0A',), ('1B',), ('2C',), ('3D',),...
What is the most Pythonic way to loop through the list returning a
list like this?:
['0A', '1B', '2C', '3D',...
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Not a Python question. You should go over to
http://groups.google.com/group/comp.sys.mac.system/ and ask.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 5, 6:42 am, neil wrote:
> what are the advantages? if it wasn't for python 3 breaking backwards
> compatibility would it be the better choice?
I adopted Py3 because of support of OrderedDict and many new features.
Since mine was a new project using no existing libraries, it made
sense.
--
On Apr 2, 9:29 pm, Chris Rebert wrote:
> if proc.returncode: # non-zero exit status, indicating error
> print("Encountered error:")
> print(error_output) # output the error message
>
Like in my previous post, this only outputs an empty string.
Apparently plutil doesn't communicate well.
I get it, you instantiate an object, call a method and get a tuple in
response. However, here is what I see:
>>> process.communicate()
(b'~/Library/Preferences/iCab/iCab 4 Bookmarks: Permission denied\n',
b'')
So all I get is the string and no error message, which is the same
thing I get with the
OK I get it, and that seems like it should work. But when I simulate a
permissions error by setting the file to unwritable I get an error:
outdata, errdata = process.communicate()
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.1/li
I'm running a shell command like:
plutil -convert xml1 "~/Library/Preferences/iCab/iCab 4 Bookmarks"
Getting error:
~/Library/Preferences/iCab/iCab 4 Bookmarks: Permission denied
How would I capture this error using a method of subprocess?
I read the doc at
http://docs.python.org/release/3.0.1/l
On Mar 30, 9:28 am, Peter Otten wrote:
> You are trying to run your 3.x code with Python 2.x...
You're right. Exactly why this started happening I don't know.
Thanks.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
RSS script runs fine on my dev machine but errors on the server
machine. Script was last run 3 days ago with no problem. Possible
clue: dev machine is (Mac OSX) running Python 3.1.1 while server is
running Python 3.1.3. I have not updated anything that should suddenly
cause this error starting yest
On Feb 28, Peter Otten wrote:
> Are you using Python 2.x? Then you cannot redefine print. Instead you have
> to redirect stdout. The following example should run as a cgi script:
>
> #!/usr/bin/env python
> import cgi
> import sys
> from cStringIO import StringIO
...
That works! Except for Py3 I
Yeah, I just spent about 2 hours trying everything I could think of...
without success. Including your suggestions. Guess I'll have to skip
it. But thanks for the ideas.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Using the doctest module, I get three different outputs:
1) From the Terminal shell, I see a full report:
python ~/Sites/Sectrum/Filter.py -v
2) From the Terminal interactive session, I see an abbreviated report
of only the failures:
from doctest import testmod; testmod(Filter)
3) From a browser
Thank you for the help, I learned a few things. The André solution
renders the colors but needs q-q to quit. The Carl solution 1 prints
colors and requires q to quit. The Carl solution 2 prints colorlessly,
it looks good for exporting to a file. Everything I need.
-- Gnarlie
http://Gnarlodious.com
On Feb 1, 5:30 pm, André Roberge wrote:
> test.py==
> import pydoc
>
> '''this is a test'''
>
> class A(object):
> '''docstring'''
> pass
>
> print(pydoc.help(__file__[:-3]))
> =
>
> python test.py
OK that works, but only if I cd into the folder of th
Can I run a script in bash and print out its docstrings to the bash
shell? I tried this at the end:
print(help(__file__))
Runnig the script:
python ~/Sites/Sectrum/Harmonics.py
but all it spit out was:
no Python documentation found for '~/Sites/Sectrum/Harmonics.py'
However in the interactive
After many curse words I figured it out. A two-stage filter was
needed. The 5th line solves the problem of colliding domain cookies:
NowCookie=http.cookies.SimpleCookie() # Instantiate a SimpleCookie
object
savedCookie=os.environ.get('HTTP_COOKIE') # get the cookie string
if savedCookie: # Alread
I use sqlite3, it is fairly simple, fast and not too strict.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
What you posted doesn't work, I don't know why. All I get is a blank
page and no Apache error report.
There are two problems with this. I am really trying to figure out how
to trap an error on the server without exposing my innards to the
world, which import cgitb; cgitb.enable() does. The other p
I have a serious error that causes the process to crash. Apache
refuses to log the error and it only happens on the server, not on the
dev machine. Problem is, I can't figure out how to get the most recent
error. I can find all sorts of pages telling how to print a specific
error, but how to get an
On Dec 1, 6:23 am, Jean-Michel Pichavant
wrote:
> what about
>
> def query():
> return ["Formating only {0} into a string".format(sendList()[0])] +
> sendList()[1:]
However this solution calls sendList() twice, which is too processor
intensive.
Thanks for all the ideas, I've resigned myself
Thanks.
Unless someone has a simpler solution, I'll stick with 2 lines.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Have you considered entering all this data into an SQLite database?
You could do fast searches based on any features you deem relevant to
the phoneme. Using an SQLite editor application you can get started
building a database right away. You can add columns as you get the
inspiration, along with an
This works for me:
def sendList():
return ["item0", "item1"]
def query():
l=sendList()
return ["Formatting only {0} into a string".format(l[0]), l[1]]
query()
However, is there a way to bypass the
l=sendList()
and change one list item in-place? Possibly a list comprehension
opera
Well I don't know what a readline is, but I upgraded from 3.1.1 and it
was working fine.
I might also add that the downarrow is also broken: ^[[B
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Ah yes, sorry.
This is Mac OSX 10.6.5, I did it build from the file at
http://www.python.org/ftp/python/3.1.3/Python-3.1.3.tgz
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Don't know why, but in Terminal the uparrow now gives me:
^[[A
which means I no longer have history scrolling.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 23, 7:22 pm, Ian Kelly wrote:
> Try Django[1] or TurboGears[2].
>
> [1]http://www.djangoproject.com/
> [2]http://www.turbogears.org/
Thanks, never understood what those programs were for.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 22, 11:32 pm, Dennis Lee Bieber wrote:
> Or upgrade to some modernistic framework wherein the application is
> a monolithic program and the "name/" portion maps to methods/functions
> within the application...
Yes, that describes what I am looking for! Is there such a modernistic
f
Let me rephrase the question. Say I have a query string like this:
?view=Data&item=9875
What I want to do is simply invoke process "view" with variable
"Data". This would replace my existing query string mess which looks
like this:
if 'view' in form and 'item' in form:
HTML=view(Data, item(9
I'm having a hard time understanding this, can someone explain?
Running a CGI with query string:
?action=Find&page=Data
Script includes these lines:
form=cgi.FieldStorage(keep_blank_values=1)
print("Content-type:text/html\n\n")
print(cgi.print_form(form))
Output:
Form Contents:
action:
Mini
1 - 100 of 149 matches
Mail list logo