On Aug 5, 7:06 pm, Chris Withers ch...@simplistix.co.uk wrote:
Peter Otten wrote:
locale.setlocale(locale.LC_ALL, (en_US, UTF-8))
'en_US.UTF8'
print locale.currency(13535, grouping=True)
$13,535.00
Okay, so if I'm writing a wsgi app, and I want to format depending on
the choices of the
On Jun 11, 5:07 pm, durumdara durumd...@gmail.com wrote:
Hi!
I want to use KinterBasDB in mixed mode: sometimes embedded, sometimes
real local/remote server.
How can I set up the connection to KinterBasDB can determine, what
mode I want to use?
Thanks for your help:
dd
you could use 2
On Apr 22, 4:55 pm, joamag joa...@gmail.com wrote:
Does anybody know a cross platform way to retrieve the default DNS
server IP address in python ?
Thanks !
João
import os,urllib2,re
def getIpAddr():
Function for parsing external ip adress by pinging dyndns.com
On Nov 8, 12:04 am, David Boddie da...@boddie.org.uk wrote:
On Saturday 07 November 2009 05:12, DarkBlue wrote:
qt 4.5.3
pyqt 4.6.1
python 2.6
I have this QtTable widget which I want to refresh once about every 2
seconds with new data.
so I do :
def updateSchedule(self
Here is some code from a pyqt4.5.4 application on python 2.6
def findData(self):
self.ui.label.setText('Processing... ')
# here we do something which takes a few seconds
self.refreshGrid()
The problem is that the text in the self.ui.label is only changed
on screen after
On Sep 11, 9:34 pm, Diez B. Roggisch de...@nospam.web.de wrote:
DarkBlue wrote:
Here is some code from a pyqt4.5.4 application on python 2.6
def findData(self):
self.ui.label.setText('Processing... ')
# here we do something which takes a few seconds
I am trying to get used to the new print() syntax prior to installing
python 3.1:
test=[[VG, Virgin Islands, British],[VI, Virgin Islands, U.S.],
[WF, Wallis and Futuna],[EH, Western Sahara],[YE, Yemen],
[ZM, Zambia],[ZW, Zimbabwe],]
#old print
for z in test:
if z[0].startswith('W'):
Hello
Python 2.5.1
Qt 4.4.0
PyQt 4.4.2
OO 2.4.1
Firebird 2.1
I want to store an openoffice writer object into a blob field using
the pyuno bridge. I read about the possibility of using streams ,
but only see some old basic or java examples .
The writer document has been created and stored into
On Dec 29, 12:27 pm, bruce [EMAIL PROTECTED] wrote:
hi
i'm playing around, researching sqlobject, and i notice that it appears to
require the use of id in each tbl it handles in the database.
if i already have a db schema, and it doesn't use 'id' as an auto-generated
field, does that
On Dec 13, 7:45 pm, Laszlo Nagy [EMAIL PROTECTED] wrote:
Hi All,
I connected to a FireBird 1.5 database this way:
import kinterbasdb
kinterbasdb.init(type_conv=200) #
Seehttp://kinterbasdb.sourceforge.net/dist_docs/usage.html#faq_fep_is_mx...
Then I try to update the database:
sql =
Sorry to interrupt the regular programming here .
As has been reported on some websites the
maintainer of kinterbasdb David Rushby has died
last month after a diving accident.
Kinterbasdb is the python wrapper around the Firebird
database api and an excellent opensource project.
The hope is ,
Hello
I hope here is the right place to ask this:
I use the python odfpy library to create and
load an odt file , however, spaces
in the passed in text are removed.
http://opendocumentfellowship.org/development/projects/odfpy
python2.4
from odf.opendocument import OpenDocumentText
from
Hello
pythoncard
wx 2.6.1
python 2.4.x
kinterbasdb
firebird
I have a wx.grid filled with data from a database
one of the fields is a blob field with text data, which
I want to display in some adjacent text control when I scroll
through the grid.
The question is which wx.EVT_XXX do I need
to use
Before we get to far away from the original question...
as you have may have noticed you reached one of the best user
groups on the net , where help from the top gurus and best minds in
the python universe is only a question away.
Go for it, you are in good hands.
Db
--
Just to show how much a system set up
impacts these results:
Result from suse10.1 64 , python 2.4
with AMD FX-55 cpu and about 12 active apps
running in the background. 7200rpm sata drives.
Preparing data...
[write_data1] Preparing output file...
[write_data1] Writing...
[write_data1] Done in
Hello
In linux I use kmail as my email client under KDE,
if a message comes in the Kontact button in the
taskbar changes to blue.
How can I have the same behaviour in a python app ?
I have a python script which runs nicely under linux
now every so often I want to be notified by some event,
in
Diez B. Roggisch wrote:
pykde afaik supports systray-iconified apps. And you could use the
dcop-mechanisms that are available as command line tools as well I
guess, and invoke knotify.
Hope this gives you some pointers - I'm currently on my mac so I can't
provide an actual example.
David Boddie wrote:
On Saturday 07 October 2006 14:59, DarkBlue wrote:
In linux I use kmail as my email client under KDE,
if a message comes in the Kontact button in the
taskbar changes to blue.
How can I have the same behaviour in a python app ?
You need to activate the window
Following is a code snippet from a pythoncard app
the problem is with the sql string called iq1
If either mysubject or mytalktext contains an
apostrophe the update fails :
Example: mysubject=Let's Eat this fails
mysubject=Lets Eat this works fine
What options do I have to avoid this
Duncan Booth wrote:
...
depending on your actual database you might need to use something other
than %s to specify the parameters. Check out 'paramstyle' for your
database connection.
Thank you all for prompt suggestions
I am using firebird 1.5.3 with kinterbasdb
Db
--
Hello
Is it possible to get the mac address of a device
with python 2.4 using code which works in wxp and linux
rather than requiring some code for windows and some
other code for linux ?
Db
--
http://mail.python.org/mailman/listinfo/python-list
Following code works .
My question is can I make it faster ?
def activeip(checkip):
# if there is any line returned we set activeb to 1 indicating that
# this ip is active during a netstat run
activeb=0
for line in os.popen(netstat -a -n | grep '%s' % checkip)
s=line
is actually indented even if it does not appear to be so :)
Db
--
http://mail.python.org/mailman/listinfo/python-list
Sybren Stuvel wrote:
DarkBlue enlightened us with:
Following code works .
No it doesn't - it's indented badly. I guess you mean something like:
def activeip(checkip):
# if there is any line returned we set activeb to 1 indicating that
# this ip is active during a netstat run
Is it possible to create pythoncard textField components
dynamically during run time ?
Something on the lines of
pseudo code :
def make_textfield(length,topleftposx,topleftposy):
doit
self.make_textfield(120,20,20)
Thanks for any ideas.
--
Sure, see function setdefaulttimeout in module socket. Just call it as
you wish before trying the DB connection and catch the resulting
exception.
Alex
That should do it.
Thanks
Db
--
http://mail.python.org/mailman/listinfo/python-list
My application makes several connections to
a remote database server via tcp/ip.
Usually all is fine,but occasionally the server is
down or the internet does not work and then there is
the 30 sec to several minutes timeout wait for the
tcp to give up.
Is there anything I can do without using
Take a look at pythoncard , we use it to produce
database frontends , but apparently it also can be used
for simple graphics apps and others.
However if you are used to things like the Delphi IDE to build
a gui app , then prepare to shed lots of tears before
overcoming the initial disbelieve,
Trying to install wxPython on Suse10.1 64 with gcc4.1.0
and get
wxPython-src-2.6.3.2/wxPython # python setup.py install
Found wx-config: /usr/local/bin/wx-config
Using flags: --toolkit=gtk2 --unicode=no --version=2.6
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing
Hello
Suse10.1 64 new install
if I try to import anything into python2.4.2
like : python - c import kinterbasdb
I get this : wrong ELF class: ELFCLASS32
Before doing anything wrong , what would be the right thing
to do to get rid of this error ?
Thanks.
--
Sybren Stuvel wrote:
file /path/to
I installed the package on other 64 machines running
suse9.2 64 and 9.3 64 without trouble
That's the way :
python setup.py build
result: successfull
python setup.py install
result: successfull
then tried to import and I get the elfclass32 error
and
Fredrik Lundh wrote:
if you do, it's a SuSE problem (this wouldn't be the first time SuSE
ships broken Python software)
Thanks for the input .
Following your message I reinstalled python2.4 and the modules
I want to use and now everything is fine.
--
I am trying to port a Delphi database application
to python on linux with a firebird database backend
and I am using pythoncard to recreate the gui.
I will have about 25 delphi forms to
be recreated and I would like to know
what is the best way to call them up
from within each other .
There is a
Hello
Following part of an database query works fine :
self.cur=con1.cursor
self.cur.execute('select a,b,c,d from t1')
for (a,b,c,d) in self.cur:
print a,b,c,d
but how to do this:
self.cur.execute(sql_select_text_put_in_at_runtime)
for (whatever_was_in_the_select_text_part_of_the_query)
Thank you
Mission accomplished.
Have a nice sunday
Db
--
http://mail.python.org/mailman/listinfo/python-list
Chris wrote:
How do I find and print to screen the IP address of the computer my
python program is working on?
def readip():
import re, urllib
f = urllib.urlopen('http://checkip.dyndns.org')
s = f.read()
m = re.search('([\d]*\.[\d]*\.[\d]*\.[\d]*)', s)
return m.group(0)
myip = readip()
should read ssh , (probably should not post anything so late in the evening)
Db
--
http://mail.python.org/mailman/listinfo/python-list
Hello
python 2.4
I want connect to another linux machine via ssl ,
after password entry execute :
cat /home/myfile.txt
and return the result into a list for further processing
then close the connection
What is the safest and best way to do this ?
Db
--
Hello
I need some help
I have a text file which changes dynamically and has
200-1800 lines. I need to replace a line , this line
can be located via a text marker like :
somelines
# THIS IS MY MARKER
This is the line to be replaced
somemorelines
My question is how to do this
Steven D'Aprano wrote:
Let me see if I understand your problem... you need to edit a text file
in place at the same time that another process is also changing the file
in place? That's hard. You need some way to decide who gets precedence if
both you and the other process both try to change
Why don't you use the database to store those markers? It should
support concurrent updates properly. That's a database's job.
The markers are just there to have a static way to find the line
after the marker, which is the one which might have to be changed.
Nx
--
OK, why don't you store those changing lines in the database?
Can you arrange for those changeable lines to be fixed length, i.e.
by padding with spaces or something? If you can, then you could just
overwrite them in place. Use flock or fcntl (Un*x) or the comparable
Windows locking
Thank you for all the suggestions
It appears the safest solution still is using a temp file
as was so apt suggested further up here without it I maybe
white water rafting without a canoe.
I also will test the feasibility to regenerate
the whole file from the database.
Nx
--
I am trying to write a script (python2.3) which will be used
with linux konqueror to retrive 2 webpages alternatively every 2 minutes.
My question is how can I send alternative args (the url)
to the same invocation of konqueror which I started with
def pipedreams(program, *args):
pid =
Thanks for replies .
dcop , hmmm I had not thought of this .
D.B.
--
http://mail.python.org/mailman/listinfo/python-list
45 matches
Mail list logo