On Mar 17, 6:25 pm, dundeemt <[EMAIL PROTECTED]> wrote:
> I agree - the balance wasn't as good. We can all agree that HowTos
> and Intros are a necessary part of the conference talks track, but as
> Robert pointed out some talks should be of a more advanced nature. I
> enjoy those that stretch my
On Mar 16, 5:09 pm, [EMAIL PROTECTED] (Aahz) wrote:
> fumanchu <[EMAIL PROTECTED]> wrote:
> > This is my third PyCon, and I've found a reasonably-sized cadre of
> > people who come for the hallway conversations plus a Bof or two,
> > having given up on hearing an
On Mar 16, 7:18 am, [EMAIL PROTECTED] (Aahz) wrote:
> Bruce Eckel <[EMAIL PROTECTED]> wrote:
> > If the following seems unnecessarily harsh, it was even more harsh for
> > me to discover that the time and money I had spent to get to my
> > favorite conference had been sold to vendors, presenting m
On Jul 15, 2:55 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Here is a simple solution, but it depends
> on the existence of the args attribute that
> "will eventually be deprecated" according
> to the docs
If you don't mind using .args, then the solution is usually as simple
as:
try:
On Jun 16, 5:35 am, Rajendran <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've installed pyodbc module to access my database (MS Access). I've
> setup a User level DSN to the database.mdb file. When I run my python
> code in the command prompt it is retrieving the database contents and
> displaying it
On Jun 11, 3:34 am, geoffbache <[EMAIL PROTECTED]> wrote:
> I have a Python program (on UNIX) whose main job is to listen on a
> socket, for which I use the SocketServer module. However, I would also
> like it to be sensitive to signals received, which it isn't if it's
> listening on the socket. ("
On May 23, 6:11 am, Brian Blais <[EMAIL PROTECTED]> wrote:
> fumanchu wrote:
>
> > On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote:
> >> I'd like to start trying out some cherrypy apps, but I've
> >> been having some setup problems.
On May 23, 6:11 am, Brian Blais <[EMAIL PROTECTED]> wrote:
> fumanchu wrote:
>
> > On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote:
> >> I'd like to start trying out some cherrypy apps, but I've
> >> been having some setup problems.
On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote:
> I'd like to start trying out some cherrypy apps, but I've
> been having some setup problems. I think I need some
> bone-head simple example to clear my understanding. :)
>
> I'm on a system running Apache, that I don't have root
> acces
On Apr 17, 7:12 am, [EMAIL PROTECTED] wrote:
> How can I determine the smallest and largest values
> of numeric types (for example int) possible in my
> system? I think there exists a function for this task
> but I don't know it.
This should work for ints:
import sys
print sys.maxint
For floats
On Apr 13, 9:14 pm, "Jia Lu" <[EMAIL PROTECTED]> wrote:
> I do not want to use a real DB like MySQL ...
> But I need something to save about more than
> 1000 articles. Is there any good ways?
The latest version of Dejavu includes a filesystem backend. See
"Folders" at http://projects.amor.org/docs
On Mar 14, 7:34 pm, lialie <[EMAIL PROTECTED]> wrote:
> I read a table with 4500 rows and 12 columns using win32com.client.
> Reading and updating records are OK, but cost too much time.Especially
> making a dict as line(***).
> All follows done may take nearly 90s!
> Is there any good idea? Thanks
On Mar 10, 6:14 am, "jupiter" <[EMAIL PROTECTED]> wrote:
> Just one quick question... Which database module
> should I use when I want to use multi threading
> as my application requires lots of data from
> internet I also want this database module
> to be fast, simple n efficient, in any case
On Mar 6, 2:45 pm, "manstey" <[EMAIL PROTECTED]> wrote:
> The question is, is it possible for an instance to have a value (say a
> string, or integer) that can interact with other datatypes and be
> passed as an argument?
>
> The following code of course gives an error:
>
> class Test(object):
>
On Feb 11, 9:30 pm, Jonathan Curran <[EMAIL PROTECTED]> wrote:
> I need a program running in the background to process
> messages (FIFO order) which I would send using
> soap/xmlrpc/pyro (haven't decided yet). According to
> my thinking I would need to make this a threaded
> application. One thread
ding winsock2.h. See Google and http://
www.aminus.org/blogs/index.php/fumanchu/2006/12/23/
cherrypy_3_has_fastest_wsgi_server_yet#c38647
Note also that many TCP servers use one thread per child socket, in
which case you can hit a memory limit. IIRC, each Python thread on
Windows uses a 1 MB stack: htt
On Feb 9, 11:03 am, [EMAIL PROTECTED] wrote:
> There are no examples of Dejavu that I found yet. I have installed it
> but don't know how to use or call its functions.
Read http://projects.amor.org/docs/dejavu/1.5.0RC1/ to learn how to
use Dejavu. It's short and should at least give you an idea wh
On Feb 9, 7:28 am, [EMAIL PROTECTED] wrote:
> I wanted to connect Python to Ms-Access database using ADO or ODBC. I
> have Python 2.5 and on mxODBC site, it has no higher version build
> than 2.4. Moreoever, mxODBC is required for ADODB.
> Can anyone guide me on this what should I do to make it wor
On Jan 25, 10:10 am, "olive" <[EMAIL PROTECTED]> wrote:
> Do you consider a StorageManagers for Oracle ?
Yes, and in fact, I already have a ticket for it:
http://projects.amor.org/dejavu/ticket/59. I've downloaded Oracle 10.2g
XE and played with it a little, but hit some snags right away due to
it
On Jan 24, 9:39 pm, "Michele Simionato" <[EMAIL PROTECTED]>
wrote:
> On Jan 24, 11:57 pm, "Robert Brewer" <[EMAIL PROTECTED]> wrote:
> > The Dejavu Object-Relational Mapper (version 1.5.0RC1) is now available
> > and in the public domain. Get it at http://projects.amor.org/dejavu,
> > or from PyPI:
krishnakant Mane wrote:
> can I do xml-rpc using the default libraries that come with every
> python installer?
You can, but others have packaged them up to make it easier. CherryPy
includes an xmlrpc tool (and has no dependencies other than standard
Python).
You can see an example of what your c
Steven D'Aprano wrote:
> > class Rational(object):
> > def __init__(self, numerator, denominator):
> > print "lots of heavy processing here..."
> > # processing ints, floats, strings, special case arguments,
> > # blah blah blah...
> > self.numerator = numerator
Kevin Little wrote:
> In Python 2.4 or 2.5, what is the easiest way to hook any and all
> callables such that designated code is executed at the very start and
> end of each call? (Yes, I'm trying to come up with a little debugging
> tool!:) Is there a single metaclass who's "__call__" method can b
Gert Cuykens wrote:
> so far this works
>
>
> import cherrypy
> import os.path
>
> class Http:
>
> def index(self):
> f = open(os.path.join(os.path.dirname(__file__), '../htm/index.htm'))
> xml = f.read()
> f.close()
> return xml
> index.exposed = True
>
> c
ronrsr wrote:
> code for storing to database:
>
> querystring = "update zingers set keywords = '%s', citation =
> '%s', quotation = %s' where zid = %d" %
> (keywords,citation,quotation,zid)
You're missing a single quote in there around the quotation %s.
Are you also replacing "\\" w
dyork wrote:
> "Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > If you actually look at what the various DB-API adapters produce
> > when sending to the database engine, floats, bools, etc. are all sent as
> > string representations; about the only source for
dyork wrote:
> Thanks Gabriel, but when I said "round trip" I really did mean: convert all
> the way to string and all the way back again, so your kind advice is not all
> that helpful. I need string to get to a non-Python object or a Web page.
Then you need two adaptation layers: one between your
George Sakkis wrote:
> Actually I thought about this and it would be more convenient in my
> case if I could change the "signature" of f to "def f(x,y)" so that I
> can pass positional arguments instead of a keywords (don't ask why).
> I've tried creating a new code object by tweaking co_varnames,
Graham Dumpleton wrote:
> For example, consider an extreme case such as WSGI.
> Through a goal of WSGI being portability it effectively
> ignores practically everything that Apache has to offer.
> Thus although Apache offers support for authentication
> and authorisation, a WSGI user would have to
Vincent Delporte wrote:
> I'm still a newbie when it comes to web applications, so would like
> some help in choosing a solution to write apps with Python: What's the
> difference between using running it through mod_python vs. building an
> application server using Python-based tools like CherryPy
robert wrote:
> Ben Finney wrote:
> > robert <[EMAIL PROTECTED]> writes:
> >
> >> Carl Banks wrote:
> >>> 2. Consider whether you're unwittingly trying to cover up a bug.
> >>> ISTM no matter how problematic the input is, you should at least
> >>> be able to make progress on it. Are you getting th
Gheorghe Postelnicu wrote:
> I found a recipe on ASPN on how to intercept keyboard interrupts and
> that is useful if I need to brutally kill the launching process.
>
> However, my question regards killing the actual children threads -
> they are spending lots of time in system calls, so I cannot i
Stephan Kuhagen wrote:
> "Michael B. Trausch" <"mike$#at^&nospam!%trauschus"> wrote:
>
> > Basically, is there something that will log every line of Python code
> > executed, in its order of execution, to a text file so that I can see
> > what is (or isn't) happening that I am expecting?
>
> Python
Edward Diener No Spam wrote:
> OK, here is my idea of what such a component model envisages as a list
> of items. After this, unless I get some intelligent comments from people
> who might be interested in what I envision, or something very similar, I
> will be off to investigate it myself rather t
Gregory Piñero wrote:
> Examples of how frameworks don't meet my needs sometimes:
> 1. Working with SQL Server (Most frameworks seem to at least make it extra
> work)
I don't know about "most frameworks", but there are certainly some that
work with SQL Server. My Dejavu ORM does SQL Server and MS
Dennis Lee Bieber wrote:
> On 6 Oct 2006 12:59:31 -0700, [EMAIL PROTECTED] declaimed the
> following in comp.lang.python:
>
> > I'm currently having some issues with a process getting deadlocked. The
> > problem is that the only way I can seem to find information about where
> > it deadlocks is by
Rob De Almeida wrote:
> Duncan Booth wrote:
> > > I would like to compile an AST to bytecode, so I can eval it later.
> > I'm not sure there are any properly documented functions for converting an
> > AST to a code object, so your best bet may be to examine what a
> > pycodegen class like Expressio
oripel wrote:
> I'm trying to attach some attributes to functions and methods, similar
> to Java annotations and .NET attributes.
> ...
> Assigning attributes to the function will work, as will assigning keys
> and values to a dictionary in an attribute. But if there are more
> decorators in the wa
Dan Stromberg wrote:
> I've been a sysadmin for about 13 years, but I'm realizing that my
> favorite part of being a sysadmin are those moments where there's a reason
> to write some code - preferably in python.
>
> What might one do to make the transition from sysadmin to python
> programmer, asid
Jack wrote:
> I wrote the last posting at late late night and I didn't know what I was
> typing at that time ;-p
>
> I didn't mean the test with CherryPy was not concurrent
> connections, or the test with lighttpd was all concurrent
> connections. I actually tried both concurrent (-c in ab command
[EMAIL PROTECTED] wrote:
> > So why tell us? What are your ideas? What does your design do that the
> > others don't?
>
> Basically, the API I exemplificated in the first exemple. My initial
> idea was to have a way of turn alread designed objects into persistent
> ones. This is not the goal of SQL
[EMAIL PROTECTED] wrote:
> I have some ideas about a ORM design,
> but have no time to start its development.
So why tell us? What are your ideas? What does your design do that the
others don't?
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/
I'm surprised noone has pursued a course of subtraction rather than
division. Say you want 10 numbers:
>>> s = 1.0
>>> n = []
>>> for x in xrange(9):
... value = random.random() * s
... n.append(value)
... s -= value
...
>>> n.append(s)
>>> n
[0.727922901516, 0.082128708606867745,
> a = now()
> delta = ReltaiveDateTime(days=+6, weekday(mx.DateTime.Friday, 0))
> Next Friday: a+delta
> a: march 23
> a+delta: Gives me March 31st and not March 24th
> Any ideas?
Just an off-beat idea: use Python's datetime instead of mx.DateTime,
and my recur module:
http://projects.amor.org/mis
You can also *almost* do it with a tracehook that blocks until released
by another thread. See http://projects.amor.org/misc/wiki/PyConquer for
the tool I'm sporadically working on that does that (in an effort to
test all possible execution paths). The only limitation is that trace
functions aren't
If you used a Queue, it wouldn't be the container itself; rather, it
would be a gatekeeper between the container and consumer code. A
minimal example of user-side code would be:
class Request:
def __init__(self, op, data):
self.op = op
self.data = data
self.reply = None
I didn't say that right. As long as you are using deepcopy (or any
operation which might iterate over the keys or values in self.data),
your setter methods need that mutex, *and* it should probably be a
threading.Lock, not an RLock, just in case that iteration ends up
mutating the dict somehow. You
There's nothing really *broken* jumping out at me. The last three
methods (set_value, set_data, and clear_data) probably don't need a
mutex, since they will each have their own frame, and the operations
are atomic. If that makes no sense, Google for "Python GIL" ;). If you
just returned a value fro
Diez B. Roggisch wrote:
> "Select * from table where name like '%s%%'" %
> "José".decode("latin-1").encode("utf-8")
Make it easy on yourself and encode the whole statement:
conn.execute(query.encode('utf8'))
Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]
--
http://mail.p
[EMAIL PROTECTED] wrote:
> These objects (such as sqlstring.Select), represent
> complex SQL Statements, but as Python objects. The benefit is that you
> can, at run-time, "build" the statement pythonically, without
> getting bogged down in String Manipulation. The theory is that once in
> use, thi
50 matches
Mail list logo