Dinesh B Vadhia [EMAIL PROTECTED] wrote i
I'm using a Javascript autocomplete plugin for an online
web application/service. Each time a user inputs a character,
the character is sent to the backend Python program which
searches for the character in a list of 10,000 string items.
Eeek!
Dick Moores [EMAIL PROTECTED] wrote
A = 8
az = A
It may well be happy since A is a constant and the variable
is being assigned the constant rather than the literal.
Thanks, Alan, but I tried your
A = 8
az = A
and got the same complaint about az.
OK, In that case its probably the fact
also if you need to go for 2 results I propose you use filters
interactive menus which will help you tailor the query to the users desires
thus limit the query results.
___
Tutor maillist - Tutor@python.org
could you do a : dir /b inside this directory just so that we can know the
real file names.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
i think you are using ajax ... which undoubdetly uses an sql database since
its based on queries run from whithin the application in the browser
whithout the need for refreshing the page ... i would suggest you try
serching internet for something like google autocomplete feature i
guess the
My guess, though I'm not sure, is that google uses hashes...
why? Because they're a *ahem* load faster than loops, and the reason
is they replace the repetitive nature of a loop by using some type of
formula. Exactly /how/ this is implemented, I'm not sure.
A simple example of the speed
Dinesh B Vadhia wrote:
Kent
I'm using a Javascript autocomplete plugin for an online web
application/service. Each time a user inputs a character, the character
is sent to the backend Python program which searches for the character
in a list of 10,000 string items. Once it finds the
Kent Johnson [EMAIL PROTECTED] wrote
application/service. Each time a user inputs a character, the
character
is sent to the backend Python program which searches for the
character
in a list of 10,000 string items. Once it finds the character,
the
backend will return that string and N
Alan Gauld wrote:
One possibility is that the javascript fetches the list back on the
first few characters and caches it on the browser
Here is an autocomplete widget I use that can do exactly that:
http://www.dyve.net/jquery/?autocomplete
Kent
___
The 10,000 string items are sorted.
The way the autocomplete works is that when a user enters a char eg. 'f', the
'f' is sent to the server and returns strings with the char 'f'. You can limit
the number of items sent back to the browser (say, limit to between 15 and
100). The string items
Dinesh B Vadhia wrote:
Kent
I'm using a Javascript autocomplete plugin for an online web
application/service. Each time a user inputs a character, the
character is sent to the backend Python program which searches for the
character in a list of 10,000 string items. Once it finds the
Dinesh B Vadhia wrote:
The 10,000 string items are sorted.
The way the autocomplete works is that when a user enters a char eg.
'f', the 'f' is sent to the server and returns strings with the char
'f'.
If it is all strings containing 'f' (not all strings starting with 'f')
then the
Message: 7
Date: Thu, 10 Apr 2008 01:46:49 +0100
From: Alan Gauld [EMAIL PROTECTED]
Subject: Re: [Tutor] Copy script
To: tutor@python.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
reply-type=original
I don;t see how the input file relates to
Hello everyone. I'm looking to build a cross-platform writer's assistant,
and I figured my first step would be to re-invent the wheel, er I mean built
a simple rich-text editor as a base.
I'm trying to figure out the simplest way to do so, and figured I'd ask if
anyone knew some good resources
Ignore the 'adjacent items' remark. The rest is correct ie. looking for all
strings containing a substring x.
- Original Message -
From: Kent Johnson
To: Dinesh B Vadhia
Cc: tutor@python.org
Sent: Thursday, April 10, 2008 6:32 AM
Subject: Re: [Tutor] Searching through large number
One idea has to do with the fact that there are only 26 (assuming Latin
alphabet) possible first letters, so I would try splitting up the list
of 10,000 into 26 lists in a dictionary indexed by the first letter.
Just doing that is a big reduction of your search space. That way you
won't be doing
Michael Schultz wrote:
Hello everyone. I'm looking to build a cross-platform writer's
assistant, and I figured my first step would be to re-invent the wheel,
er I mean built a simple rich-text editor as a base.
I'm trying to figure out the simplest way to do so, and figured I'd ask
if
Dinesh B Vadhia wrote:
Ignore the 'adjacent items' remark. The rest is correct ie. looking
for all strings containing a substring x.
Perhaps this would help:
http://hkn.eecs.berkeley.edu/~dyoo/python/suffix_trees/
A SubstringDict that maps each string to itself would do exactly what
you
I have been used to making queries to websites automatically analizing the
results. a few minutes ago ... i can no longer do that
now a website is protected by a ramdom number that i have to enter before i
can login.
its a picture with numbers on it that i have to type in in the
authentication
Tony Cappellini [EMAIL PROTECTED] wrote
I don;t see how the input file relates to the pdf files?
Which part of the pdf file does the input numbers refer to?
Kent, I believe the text file contains the name
Actually that was me :-)
The problem with the Windows console commands is I don't
Michael Schultz [EMAIL PROTECTED] wrote
Hello everyone. I'm looking to build a cross-platform writer's
assistant,
and I figured my first step would be to re-invent the wheel, er I
mean built
a simple rich-text editor as a base.
I'm trying to figure out the simplest way to do so, and
linuxian iandsd [EMAIL PROTECTED] wrote
now a website is protected by a ramdom number that i have to enter
before i
can login.its a picture with numbers on it that i have to type in in
the
authentication form before login in.
This is added to web sites to specifically stop people screen
On Thu, Apr 10, 2008 at 9:14 AM, linuxian iandsd [EMAIL PROTECTED]
wrote:
I have been used to making queries to websites automatically analizing
the results. a few minutes ago ... i can no longer do that
now a website is protected by a ramdom number that i have to enter before
i can login.
Hi.
I am a newbie to Python. I am trying to implement a
Python code for graph manipulation. My graphs are
about 200-500 nodes big. Excepting for the short basic
graph implementation info on Python.org, where can I
find more in depth info about how to express graphs in
python, and how to use them
Sanhita Mallick wrote:
Hi.
I am a newbie to Python. I am trying to implement a
Python code for graph manipulation. My graphs are
about 200-500 nodes big. Excepting for the short basic
graph implementation info on Python.org, where can I
find more in depth info about how to express graphs
Of course they do - they can use input redirection just like Unix.
Oh,-I have forgotten about that.
But why use clunky batch language when you can use Python? After all, he did
post this to the python list.
___
Tutor maillist - Tutor@python.org
i was wondering if there was there any means of sending this number to the
script thru the web.
I mean have the script run from cron i can remotely access the image read
the code enter the code in a form to be submitted to my script or
another script i don't mind as long as it gets to final
Hi,
I've looked all over the internet but have not found an answer to my
question. How do I apply an external stylesheet to the XHTML in a Python
script? I tried to include the standard link rel='stylesheet'
type='text/css' href='style1.css' / in with the rest of the printed
XHTML. But that
On Thu, Apr 10, 2008 at 02:22:47PM -0600, Alex Krycek wrote:
Hi,
I've looked all over the internet but have not found an answer to my
question. How do I apply an external stylesheet to the XHTML in a Python
script? I tried to include the standard link rel='stylesheet'
type='text/css'
Hi Alex,
On Thu, Apr 10, 2008 at 1:22 PM, Alex Krycek [EMAIL PROTECTED] wrote:
Hi,
I've looked all over the internet but have not found an answer to my
question. How do I apply an external stylesheet to the XHTML in a Python
script? I tried to include the standard link rel='stylesheet'
Eric,
I'm sorry, I never actually managed to get any stylesheets to work with my
cgi scripts. The scripts that did work are just simple HTML. I'm using
Apache 2.2.8 on a Mac OS X 10.4.11 system. When I get home I'll definitely
look up the log file and paste it here. I'll also have to fool around
Hi All,
Just wondering if there are any basic conventions for including code
snippets that are for testing / debugging only?
For example, you could set a boolean variable called DEBUG, then have
snippets of code like:
if DEBUG:
do stuff
else:
do otherstuff
The use case I'm dealing with
Hey Alex,
On Thu, Apr 10, 2008 at 1:43 PM, Alex Krycek [EMAIL PROTECTED] wrote:
Eric,
I'm sorry, I never actually managed to get any stylesheets to work with my
cgi scripts. The scripts that did work are just simple HTML. I'm using
Apache 2.2.8 on a Mac OS X 10.4.11 system.
If I understand
Hi Robert
On Thu, Apr 10, 2008 at 1:34 PM, Robert Kirkpatrick [EMAIL PROTECTED] wrote:
Hi All,
Just wondering if there are any basic conventions for including code
snippets that are for testing / debugging only?
For example, you could set a boolean variable called DEBUG, then have
Alex Krycek wrote:
Eric,
I'm sorry, I never actually managed to get any stylesheets to work with
my cgi scripts. The scripts that did work are just simple HTML.
Where are the css files that work located? What URL is used to fetch
them? If you put the css for your cgi into the same
Robert Kirkpatrick wrote:
Hi All,
Just wondering if there are any basic conventions for including code
snippets that are for testing / debugging only?
For example, you could set a boolean variable called DEBUG,
That is pretty common, with a boolean or an integer (for levels of debug
Eric Walstad wrote:
I'd do something like this:
from settings import DEBUG
def my_user_list()
# assumes long_list is already populated (db, file, etc)
if DEBUG:
return long_list[:5]
else:
return long_list
def process(user):
# do the work on the user
I'm reading a text file into an in-memory pysqlite table. When I do a SELECT
on the table, I get a 'u' in front of each returned row eg.
(u'QB VII',)
(u'Quackser Fortune Has a Cousin in the Bronx',)
I've checked the data being INSERT'ed into the table and it has no 'u'.
The second problem
govind goyal [EMAIL PROTECTED] wrote
I want to retreive data to and fro USB device attached/connected to
my
WinXP PC.
It depends what kind of device it is.
If it is a drive or flash card you can use the normal file access
functions. If it is a printer or scanner then the usual APIs for
Alex Krycek [EMAIL PROTECTED] wrote
How do I apply an external stylesheet to the XHTML in a Python
script?
Python doesn't really do anything with CSS that is handled by the
browser.
All Python can do is insert the correct HTML into the server response
to the browser.
I tried to include the
Alex Krycek [EMAIL PROTECTED] wrote
I did look into CGI tutorials, but they didn't use Python code. They
used
something like:
start_html(-title = $title,
-head = style({type = 'text/css'} )
That looks like Perl. Try the CGI tutorial on the Python web site.
That would be a good start.
Dinesh B Vadhia [EMAIL PROTECTED] wrote
I'm reading a text file into an in-memory pysqlite table.
When I do a SELECT on the table, I get a 'u' in front of
each returned row eg.
(u'QB VII',)
The u is not part of the data its Python telling you that
the string is Unicode.
The second
Robert Kirkpatrick [EMAIL PROTECTED] wrote
The use case I'm dealing with right now is to query the SVN commits
for a
weekly period and report on each user for that time period. If I'm
testing
though, I only want to cycle through a few users, not all of them.
You could pass the values in
It seems that your link to the stylesheet is just pointing to the wrong
place.
Like the others said, check to make sure you are pointing to the right
place of the CSS file by typing it into the web browser. If you use the
link you gave : http://localhost/cgi-bin/style1.css; what shows up?
Thank you all for your help. I've finally figured it out. I took people's
suggestions and typed in the path for the CSS file into my browser. Well, I
received an internal service error. When I checked the error log, I had
received the following:
[Thu Apr 10 20:38:47 2008] [error] [client ::1]
45 matches
Mail list logo