Am 12.09.2011 16:03, schrieb John Reid:
I don't have much experience writing web sites or applications. Can
anyone recommend a python framework that will allow me to easily write a
few pages?
You want a simple framework? Try Bottle:
http://bottlepy.org/
Matthias
--
http://mail.python.org/mail
Pierre (19.08.2009 10:48):
Hello,
I would like to know how to find the difference (set operation)
between 2 arrays :
a = array([1,2, 3,2,5,2])
b = array([1,2])
I want a - b = [3,5]
What about set()?
>>> a = set([1,2, 3,2,5,2])
>>> b = set([1,2])
>>> a.difference(b)
set([3, 5])
Matthias
--
Thanks!
cursor.rowcount does exactly what I need.
Before going any further... make sure that SQLite's count_change is
enabled:
PRAGMA count_changes
PRAGMA count_changes = 0 | 1
"Query or change the count-changes flag. Normally, when the
count-changes flag is not set, INSERT, UPDATE and DELET
Hi,
This is probably trivial, but I cannot find a solution right now.
With MySQLdb, I could test the success of a deleting action like this:
sql = "DELETE FROM table WHERE name='xxx'"
res = cur.execute(sql)
if res == 1:
print 'Okay'
else:
print 'nothing deleted'
This seems not to wor
Hi,
I have problems using tkFileDialog under Linux (Ubuntu 8.04 in my case, but
other Linuxes seem to show the same behaviour).
The following works fine:
import tkFileDialog
f = tkFileDialog.askopenfilename()
No problem, I can chose a filename.
But when switching the locale (in my case to G
Matthias Huening (10.09.2008 16:07):
Anjanesh Lekshminarayanan (10.09.2008 15:50):
In PHP, if I do
str_replace(array('a', 'e', 'i', 'o', 'u'), '-', $str)
it'll replace all vowels with a hyphen in string $str.
Is there some eq
Anjanesh Lekshminarayanan (10.09.2008 15:50):
In PHP, if I do
str_replace(array('a', 'e', 'i', 'o', 'u'), '-', $str)
it'll replace all vowels with a hyphen in string $str.
Is there some equivalent in Python ?
What about something like this:
import re
new_str = re.sub('([aeiou])-', r'\1', str)
Gerhard Häring (08.09.2008 10:12):
Error is:
con.execute("select load_extension('./fts3.so')")
pysqlite2._sqlite.OperationalError: Das angegebene Modul wurde nicht
gefunden.
Where should I look for the module?
The sources are in ext/fts3 in the SQLite source tree. I haven't found
any Mak
Hi,
- - Connection.enable_load_extension(enabled) to allow/disallow extension
loading. Allows you to use fulltext search extension, for example ;-)
The following code (from the docs) produces an error:
from pysqlite2 import dbapi2 as sqlite3
con = sqlite3.connect(":memory:")
# Load the ful
Glurt Wuntal (02.03.2006 15:56):
> I am a newbie with Python. It's a great language, but I would like to be
> able to present a simple gui menu for some of my scripts; something better
> than using 'raw_input' prompts.
>
If you only need some dialogs, input and/or message boxes, you could start
jwaixs (04.07.2005 10:04):
> arg... I've lost 1.5 hours of my precious time to try letting re work
> correcty. There's really not a single good re tutorial or documentation
> I could found!
Did you try this one?
http://www.amk.ca/python/howto/regex/regex.html
import re
str = "blablaRe mo
Xah Lee (27.06.2005 12:33):
> i have a large number of lines i want to turn into a list.
> In perl, i can do
>
> @corenames=qw(
> rb_basic_islamic
> sq1_pentagonTile
> sq_arc501Tile
> sq_arc503Tile
> );
>
> use Data::Dumper;
> print Dumper([EMAIL PROTECTED]);
>
> --
> is there some short
Hans Almåsbakk (14.12.2004 16:02):
Any pointer will be greatly appreciated. Maybe I'm attacking this problem
the wrong way already from the start? (Not that I can see another way
myself :)
Hans, did you try the csv module in the Python library?
Matthias
--
http://mail.python.org/mailman/listinfo/py
13 matches
Mail list logo