Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant
figure out which one.
This little peace of code executes a 'select count(*)' over every table
in a database, one thread per table:
code
class TableCounter(threading.Thread):
def __init__(self, conn, table):
John Nagle wrote:
Gerardo Herzig wrote:
Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant
figure out which one.
This little peace of code executes a 'select count(*)' over every table
in a database, one thread per table:
code
class TableCounter(threading.Thread
Saideep A V S wrote:
Hello Sir,
I am a beginner level programmer in Python. I am in search of a
function for 'On-Disk' Dictionaries which is similar to On-Disk Hash tables
in Perl (i.e., tie function in Perl).
Could anyone help me with the concept. I have also searched the net, but
Saideep A V S wrote:
Hello Sir,
Thank You a ton. I was looking for this function. As far what I've
understood from the Shelve module is that, there would be no memory
wastage and the whole transactions would be done from and to the file we
specify. Am I right?.
My actual task is to build a
Hi all. Im having a hard time trying to compile the plpython package.
This is the error make gives me:
[EMAIL PROTECTED]:/usr/local/src/postgresql-8.2.5/src/pl/plpython make
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels
Rockins Chen wrote:
Hi all,
I encountered a problem: I have a python script, let's just name it
caller.py, It calls a shell script, which is named callee.sh. In callee.sh,
it need a shell variable $target, which should be supplied by caller.py(cannot
pass by argument). I try to use os.environ to
Jesse Aldridge wrote:
I uploaded the following script, called test.py, to my webhost.
It works find except when I input the string python . Note that's
the word python followed by a space. If I submit that I get a 403
error. It seems to work fine with any other string.
What's going on here?
[EMAIL PROTECTED] wrote:
Standardization allows RCA cables, bumpers, and 115V plugs. The Bill
of Rights allows Huckleberry Finn. What is the analogue of the Bill
of Rights for programmers and users, whether of programming languages
or latter-generation software?
I want that drogues, man
--
Sion Arrowsmith wrote:
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Tue, 29 Jan 2008 11:48:38 -0800, Tobiah wrote:
class genital:
def pubic_hair(self):
pass
def remove(self):
del(self.pubic_hair)
I think `pubic_hair` is an attribute
Hi all. Im wondering the way to share a database connection between some
classes:
So far, i came up with a simple class schema, where each class means
each different relation, i mean i have the follow classes
class Database(object):
## make the connection
self.conn = make_conn()
class
James Matthews wrote:
When did this list become a politics dialog? Please keep on topic Python!
Thanks
James
On Jan 12, 2008 8:07 PM, Joe Riopel [EMAIL PROTECTED] wrote:
On Jan 12, 2008 2:00 PM, radiosrfun [EMAIL PROTECTED] wrote:
Whether we agree on tactics or not - if it come to a
Hi all. Im trying to read a binary data from an postgres WAL archive.
If i make a
xfile = open('filename', 'rb').xreadlines()
line = xfile.next()
i see this sort of thing:
Tom Brown wrote:
On Mon, 2008-01-07 at 11:57 -0200, Guilherme Polo wrote:
2008/1/7, Gerardo Herzig [EMAIL PROTECTED]:
Hi all. Im trying to read a binary data from an postgres WAL archive.
If i make a
xfile = open('filename', 'rb').xreadlines()
line = xfile.next()
i see this sort
Horacius ReX wrote:
Hi,
I have to read some data from a file, and on each block it always
appears the followng string; xyz.vs.1-81_1 . It appears a lot of time
with different numbers like;
xyz.vs.1-81_1
xyz.vs.1-1234_1
xyz.vs.1-56431_1
and so on
My problem is that I need to extract from this
hank/ann wrote:
pop up that says: error loading c:/progra~1\mywebs~1bar\2bin\mwsbar.dll the
specified module could not be found
this pop up appeares on desktop each time we log on cannot get rid off it
can you help Ann
import os.Linux :P
--
Hi all. Im having some problems with a small concurrent plpython function.
Based on a small example [1] about concurrent programming, there is some
code which works fine under python:
#! /usr/bin/python
import threading, random
import time
def myPrint(str):
print 'searching...', str
[EMAIL PROTECTED] wrote:
Python is a good programming language, but Python is not a good
name.
First, python also means snake, Monty Python. If we search python in
google, emule, many results are not programming resource. If we search
PHP, all results are programming resource.
Second, python
nani wrote:
i am getting the following error for below code
type 'exceptions.KeyError' Python 2.5.1: C:\Python25\python.exe
Mon Nov 26 10:13:17 2007
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
C:\Program
Beema shafreen wrote:
hi everbody,
I have a file,
a b c d e
2722316 2722360A_16_P03641972150-44
2722510 2722554A_16_P2136023916-44
2722570 2722614A_16_P03641973
Abandoned wrote:
Hi..
I want to do index in postgresql python.
My table:
id(int) | id2(int) | w(int) | d(int)
My query:
select id, w where id=x and id2=y (sometimes and d=z)
I have too many insert and select operation on this table.
And which index type can i use ? Btree, Rtree, Gist or Hash ?
allen.fowler wrote:
Hello,
Can anyone recommend a simple python template engine for generating
HTML that relies only on the Pyhon Core modules?
No need for caching, template compilation, etc.
Speed is not a major issue.
I just need looping and conditionals. Template inheritance would be a
Bruno Desthuilliers wrote:
[EMAIL PROTECTED] a écrit :
Gerardo Herzig a écrit :
Hi all. Im reading the Gido's aproach using decorators at
http://www.artima.com/weblogs/viewpost.jsp?thread=101605
It looks good to me, but the examples shows the functionality using
functions.
Now, when
Hi all. Im reading the Gido's aproach using decorators at
http://www.artima.com/weblogs/viewpost.jsp?thread=101605
It looks good to me, but the examples shows the functionality using
functions.
Now, when i try to give this decorator into a method, if i try the
class test(object):
Bruno Desthuilliers wrote:
Gerardo Herzig a écrit :
Carl Bank a écrit :
Add these lines in __init__.py:
from MYCLASSES.A import A
from MYCLASSES.B import B
Ummm, that works indeed, but forces me to import all (more than A and B)
classes, rigth?
Why so
On Oct 3, 2007, at 11:42 AM, Gerardo Herzig wrote:
Hi all. I have a single file with several classes, wich i want to
separate into several packages.
The big file is named, say MYCLASES, and contains a class named
A(object), and B(A).
We have been using this MYCLASES in the from
MindMaster32 wrote:
I am writing a script that has to read data from an ASCII file of
about 50 Mb and do a lot of searches and calculations with that data.
That would be a classic problem solved by the use of a database
(SQLite would suit just fine), but that would require the user to
install
Hi all. I have a single file with several classes, wich i want to
separate into several packages.
The big file is named, say MYCLASES, and contains a class named
A(object), and B(A).
We have been using this MYCLASES in the
from MYCLASES import B syntax, but i cant reproduce this syntax using
coldpizza wrote:
Hi,
I want to run a database query and then display the first 10 records
on a web page. Then I want to be able to click the 'Next' link on the
page to show the next 10 records, and so on.
My question is how to implement paging, i.e. the 'Next/Prev' NN
records without
[EMAIL PROTECTED] wrote:
I need to extract the number on each td tags from a html file.
i.e 49.950 from the following:
td align=right width=80font size=2 face=New Times
Roman,Times,Serifnbsp;49.950nbsp;/font/td
The actual number between: nbsp;49.950nbsp; can be any number of
digits before
Hi all. Im in this situation: I want to perform several kind of
(validating) methods to a given value.
Lets say i have a class named Number, and the following methods:
is_really_a_number(),
is_even(),
is_greater_than_zero(),
and so on. All of them returning booleans.
I want the
Hi all. Im trying to develop yet another email filter. Just for fun for
now. Im having a little trouble parsing long 'To' and 'Cc' headers.
Sometimes p.e. the 'To' header comes like
'[EMAIL PROTECTED], [EMAIL PROTECTED]'
others comes like
'My self [EMAIL PROTECTED], My brother [EMAIL
Steve Holden wrote:
Gerardo Herzig wrote:
Hi all. Im trying to develop yet another email filter. Just for fun for
now. Im having a little trouble parsing long 'To' and 'Cc' headers.
Sometimes p.e. the 'To' header comes like
'[EMAIL PROTECTED], [EMAIL PROTECTED]'
others comes like
'My self
Ryan J Nauman wrote:
Can someone help me understand this script please?
I understand everything except for the anagram function. Could you break
it down into more than 1 line of code for me or explain it? (I understand
WHAT it does but HOW?) Thanks.
Script
###
# SCRABBLE.PY
#
# purpose:
#
Lamonte Harris wrote:
I've searched Google, and other search engines to try to find out how
super() works. Can someone explain in short detail how super() works? I
may and may not need to know this information, but it is good to know.
There is at least one explanation in the python.org
Neil Hodgson wrote:
Gerardo Herzig:
Hi dudes. Im looking for a python implementation for sending sms to a
cell phone. I was try using some free pages, but i want to use a python.
Do i need a cellphone conected to my machine? Or can i send sms to some
cell via some python library
Hi dudes. Im looking for a python implementation for sending sms to a
cell phone. I was try using some free pages, but i want to use a python.
Do i need a cellphone conected to my machine? Or can i send sms to some
cell via some python library?
Waiting for advice.
Thanks!
Gerardo
--
[EMAIL PROTECTED] wrote:
I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.
How can I go about this?
Cheers.
-T
I guess we all need an code example to show us the way 'read only' is
implemented.
If you cant access to the class wich you are
Hi all. I have a question about design. The general question would be:
Where is the line beteween extending a class and adding new methods to
that class?
And the particular case im involved is:
I have a class (say USERCLASS) who implements a user interface. One of
his methods is called
walterbyrd wrote:
This is made with a php5 framework called qcodo.
http://examples.qcodo.com/examples/dynamic/inline_editing.php
With qcodo it's easy to make grids that are sortable and inline
editable. Qcodo grids work from the database - not an xml table or
array. Qcodo handles complex data
walterbyrd wrote:
On Aug 28, 1:31 pm, Gerardo Herzig [EMAIL PROTECTED] wrote:
walterbyrd wrote:
The one who make that table sorteable is AJAX. Not php. The php part is
kind of trivial (so it would be `trivial' in python too). It just reads
some data and format it in an html table
BJörn Lindqvist wrote:
On 8/22/07, Gabriel Genellina [EMAIL PROTECTED] wrote:
On 22 ago, 10:00, BJörn Lindqvist [EMAIL PROTECTED] wrote:
As I said, you can accomplish the exact same thing by calling a
function from within the function that requires the user to be logged
in.
def
Laszlo Nagy wrote:
Are you developing a website or a GUI program?
It will be used in a web development. It is an important point?
Yes, I think. Unless you use AJAX. :-) Most web sites work this way:
user clicks - request to server - process on server - response
I would rather enclose
BJörn Lindqvist wrote:
On 8/16/07, Gerardo Herzig [EMAIL PROTECTED] wrote:
@is_logued_in
def change_pass():
bla
bla
And so on for all the other functions who needs that the user is still
loged in.
where obviosly the is_logued_in() function will determine if the dude is
still loged
Anhoter HURRA for list comprehensions:
a = ['a', 'b', 'c', 'd']
b = ['a','c']
[x in b and x.upper() or x for x in a]
['A', 'b', 'C', 'd']
Is what you want?
Cheers
Gerardo
I'm trying to compare the list with another list and if it is there in
both I'm changing it to upper case and adding
Hi all. I guess i have a conceptual question:
Im planing using a quite simple decorator to be used as a conditional
for the execution of the function. I mean something like that:
@is_logued_in
def change_pass():
bla
bla
And so on for all the other functions who needs that the user is
Gerardo Herzig wrote:
Hi all. I guess i have a conceptual question:
Im planing using a quite simple decorator to be used as a conditional
for the execution of the function. I mean something like that:
@is_logued_in
def change_pass():
bla
bla
And so on for all the other
Steven Bethard wrote:
Gerardo Herzig wrote:
Hi all. I guess i have a conceptual question:
Im planing using a quite simple decorator to be used as a conditional
for the execution of the function. I mean something like that:
@is_logued_in
def change_pass():
bla
bla
And so on for all
king kikapu wrote:
On Aug 10, 1:33 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Fri, 10 Aug 2007 03:21:29 -0700, king kikapu wrote:
Hi,
i read in a book the following code snippet that is dealing with
properties:
class ProtectAndHideX(object):
def
Hi all. I dont know if this is the right place for asking this, but
maybe some of you know where i must go.
The thing is:
Im writing a very simple class (in python) to access some LDAP server. A
companion will access to the same LDAP server too, but his developing in
java. So i said ok, wait,
Oleg Broytmann wrote:
Hello!
I'm pleased to announce the 0.9.1 release of SQLObject.
What is SQLObject
=
SQLObject is an object-relational mapper. Your database tables are described
as classes, and rows are instances of those classes. SQLObject is meant to be
easy to use and
When you execute a cgi, the program runs under the apache user
(ussualy www or wwwrun or so), so THAT user needs permissions for
deleting the file. Other approach could be suid'ing the cgi program.
Gerardo
HI!
I want to delete a file from a CGI, but I always get a Permission denied
error.
Hi all. Im looking for the pyGoogle for making google searchs y a python
script. The thing is, all im founding is an AJAX api, but the
application ill use is NOT a web app. So, someone know if there is a
pure python api that i can download and use?
Thanks!
Gerardo
--
Hi. Im looking for an I25 barcode generator. I found a couple of nice
EAN barcode generators, but this application needs an I25 barcode. Since
this will be an web application, i need to do it in the server side. In
python, off course :)
Anybody knows one?
Thanks!
Gerardo
--
hi all. What i need to know is if there is some function like
os.getuid(), but taking an argument (the username, off course), so i can
do getuid('myuser')
Thanks you dudes!
Gerardo
--
http://mail.python.org/mailman/listinfo/python-list
Hi all: I have this list thing as a result of a db.query: (short version)
result = [{'service_id' : 1, 'value': 10},
{'service_id': 2, 'value': 5},
{'service_id': 1, 'value': 15},
{'service_id': 2, 'value': 15},
]
and so on...what i
You are the man, you are the man!! Yes, i need those dicts in order to
assign them to a nested TMPL_LOOP for the htmltmpl templating engine.
Thats why i cant use the solution provided by Max, and thanks to Jon too!!
Thanks a lot dudes, i hope someday ill turn myself into some of you guys
who
Hi all, sory if this is kind of [OT], but cannot find the answer for
this behaviour
Im programming a db function using plpython...i have a db called
'sessions', and a postgres 8.1.2 database called 'test'. In 'sessions',
i store several values in a `pickled' way so
If a do
You are now
Hi all. Ill try to explain mi situation:
Lets say i have an DB object, who implements the querys to the database
trough a method called DBObject.doQuery.
On the other hand, i have 50 sql functions stored in the database. So i
can call DBObject.doQuery('select * from my_sql_function()')...Ok, what
58 matches
Mail list logo