Lad skrev:
Is anyone capable of providing Python advantages over PHP if there are
any?
Much more compact and yet much more readable code, making it easier to
maintain and extend your programs.
--
Leif Biberg Kristensen
http://solumslekt.org/
--
Paul Rubin skrev:
Question: is there any simple way to arrange to launch the app from
the desktop, without also launching a DOS box?
Just use the .pyw extension instead of .py, and the DOS box
automagically disappears -- or so I have been told ...
--
Leif Biberg Kristensen
Uwe Mayer skrev:
Hi,
I've got a ISO 8601 formatted date-time string which I need to read
into a datetime object.
Look up time.strptime, it does exactly what you want.
--
Leif Biberg Kristensen
http://solumslekt.org/
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis skrev:
You need to do locale.setlocale(locale.LC_ALL, ) to get
locale-specific upper-casing.
That makes a lot of sense. Thank you.
'før'.upper()
'F\xf8R'
'FØR'
'F\xd8R'
import locale
locale.setlocale(locale.LC_ALL, )
'no_NO'
'før'.upper()
'F\xd8R'
'FØR'
'F\xd8R'
I must
I'm developing a routine that will parse user input. For simplicity, I'm
converting the entire input string to upper case. One of the words that
will have special meaning for the parser is the word før, (before in
English). However, this word is not recognized. A test in the
interactive shell
[EMAIL PROTECTED] wrote:
put
import sys
sys.setdefaultencoding('UTF-8')
into sitecustomize.py in the top level of your PYTHONPATH .
Uh ... it doesn't seem like I've got PYTHONPATH defined on my system in
the first place:
[EMAIL PROTECTED] leif $ env |grep -i python
[EMAIL PROTECTED] wrote:
put
import sys
sys.setdefaultencoding('UTF-8')
into sitecustomize.py in the top level of your PYTHONPATH .
I found out of it, sort of. Now I've got a PYTHONPATH that points to my
home directory, and followed your instructions. The first time I got an
error
Leif B. Kristensen skrev:
Is there something else I have to do?
Please forgive me for talking with myself here :-) I should have looked
up Unicode in Learning Python before I asked. This seems to work:
u'før'.upper()
u'F\xd8R'
u'FØR'
u'F\xd8R'
'FØR'
'F\xd8R'
So far, so good. Note
I'm working with a Python program to insert / update textual data into a
PostgreSQL database. The text has single and double quotes in it, and I
wonder: What is the easiest way to escape quotes in Python, similar to
the Perlism $str =~ s/(['])/\\$1/g;?
I tried the re.escape() method, but it
Damjan skrev:
You don't need to escape text when using the Python DB-API.
DB-API will do everything for you.
For example:
SQL = 'INSERT into TEMP data = %s'
c.execute(SQL, text containing ' and ` and all other stuff we
might
read from the network)
You see, the SQL string contains
First, thanks to all who have replied. I learned a lot more than I had
expected :-)
This is a small part of a major project; converting my genealogy
database from a commercial FoxPro application to my homegrown Python /
PostgreSQL app. I'm still in a phase where I'm experimenting with
different
R.Meijer wrote:
Jot jot at nad.com writes:
If she's really gifted i hope she dumps that obsolete monolithic
kernel as soon as she realizes that such beautiful language as python
shouldn't be used on top of ugly, badly designed software.
Did somebody say off-topic?
I'd say it's a Troll
Timothy Smith skrev:
has anyone got some hard numbers on which pg access module is the
fastest, i currently use pypgsql, but i can't help but feel it's a
little slow.
3 seconds to connect, send one query, get th return data.
i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit,
Timothy Smith skrev:
my only issue with psycopg, is last time i looked they had no win32
port?
Uh, in that case, maybe you should consider changing platform? 8^)
--
Leif Biberg Kristensen
just another global village idiot
--
http://mail.python.org/mailman/listinfo/python-list
Peter A. Schott wrote:
PostGreSQL - good feature set, open source. Not sure on speed, but it
should run natively on Unix, Linux, and Win32 (not sure about BSD or
others).
A lot of the core developers of PostgreSQL are apparently running *BSD.
On the PostgreSQL-General mailing list, I've
I'm using wget from Python to get extactly one line from a reports page.
I made this function that works for me:
def wgetline(exp): # see Python Cookbook p. 228
print Getting result from server ...
command = 'wget -q -O - \
http://www.foobar.com/report.pl\?UserID=xxx\UserPW=xxx \
Sandman wrote:
How would I run a shell command in Python?
Here is what I want to do:
I want to run a shell command that outputs some stuff, save it into a
list and do stuff with the contents of that list.
There's a Python Cookbook example that should fit nicely with what
you're trying to
Danny skrev:
Does anyone know of a good python tutorial?
I was also looking for some non-trivial projects to do in python.
There's a lot of projects on Sourceforge that are written in Python,
where you're free to study the code and maybe participate, if you've
got what it takes.
Basically
john san skrev:
pure DOS, old pc, used for teaching . want show some windows under
DOS (under Python).
curses is a text-based interface that will let you build windowed
applications like you could with the crt unit in Turbo Pascal of those
golden days. I've no idea if anyone's compiled it for
john san skrev:
Actually the windows running very good under the xbox-NTOS via
xboxmediacenter. its just limited functions(not easy to programming
the windows prog.), if we can find WxPython-like can be ported (I
can import *
from it to my xboxPython) )it will be a great great . You
20 matches
Mail list logo