I also use Python to access database on Windows.
You can speed up your program by doing that:
Open PythonWin, then click on the Tools menu and the item COM Makepy
Utility.
It will display all libraries available.
Then, select Microsoft ActiveX Data Objects 2.7 Library or whatever
last version of
jan V [EMAIL PROTECTED] wrote:
+---+ .:\:\:/:/:.
| PLEASE DO NOT |:.:\:\:/:/:.:
| FEED THE TROLLS | :=.' - - '.=:
| | '=(\ 9 9 /)='
| Thank you, |
I try to use python as the language in an asp page with Microsoft IIS
5.0.
I have these two files, req_bad.asp and req_ok.asp
-- req_bad.asp -
[EMAIL PROTECTED]
%
# il y a un problème ici
Response.write('Hello')
%
-
-- req_ok.asp
Russell E. Owen wrote:
I have several situations in my code where I want a unique identifier
for a method of some object (I think this is called a bound method). I
want this id to be both unique to that method and also stable (so I can
regenerate it later if necessary).
def
If you want a fast language, try Holden. I've just invented it.
Unfortunately it gets the answer to every problem wrong unless the
answer is 42, but boy it runs quickly. The code for the whole
interpreter (it's written in Python) follows:
print 42
great ! u can use it for ur own
Hi!
I need a fast protocol to use between a client and a server, both
sides written i Python.
What the protocol has to accomplish is extremely simple; the client
sends a number of lines (actually a RDF) and the server accepts or
rejects the packet. That's all !
Now, presently I'm using
Godwin wrote:
But the funny fact is that i want this class to be dynamically
generated at run
time simply from a table name string.
The thing you are looking for is called an object-relational mapper.
try SQLObject http://sqlobject.org/
This is mainly intended to work the other way (i.e.
Robert Kern wrote:
James asked a question in such a way that I didn't think it would get
answered. Judging from the other non-responses to his post, I was
right. I showed him the way to ask questions such that they *will* get
answered, and he came back, did so, and got his questions answered.
Dear All,
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
regards
Prabahar
Send a rakhi to your brother, buy gifts and
Dear All,
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
regards
Prabaha
Send a rakhi to your brother, buy gifts and win
computers are cheap. i am expensive. give me clear and maintainable
code every time.
randy
--
http://mail.python.org/mailman/listinfo/python-list
Johnny wrote:
Hi,
I wonder what is the difference between the built-in function
getattr() and the normal call of a function of a class. Here is the
details:
getattr( object, name[, default])
Return the value of the named attributed of object. name must be a
string. If the string
Diez B. Roggisch wrote:
No, it will only return _always_ a value if you provide a default one.
If not, they have the exact same semantics.
What you've got here is something usually called syntactic sugaring -
a specialized syntax that performs certain instructions that _could_ be
done by
Some people with C background use Python instead
of programming in C.why?
Becuase it is much more efficient.
-James
--
http://mail.python.org/mailman/listinfo/python-list
Op 2005-08-22, Magnus Lycka schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
Python doesn't guess. There are a range of values that will be treated,
in a Boolean context (how perlish) as equivalent to False.
Yes it does.
No it doesn't!
Python has no way to know what would be the most
Could someone help me get gtkmozembed working under fc3? The only
available rpms need gnome-python2 = 2.9 and fc3 ships with 2.6. I can't
find any fc3 rpms to upgrade gnome-python2 and I can't quite figure out
what I'd need to compile just to install gtkmozembed and the python
bindings (I need to
Johnny wrote:
Hi,
I wonder what is the difference between the built-in function
getattr() and the normal call of a function of a class. Here is the
details:
getattr( object, name[, default])
Return the value of the named attributed of object. name must be a
string. If the string
Hello,
how can I check whether a directory is readable or not. Are there
differences between unix and windows?
Thank you for your hints, Eels
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]
| Well, I can do this using WMI thru VBScript for Windows-Windows
| connections. What I would like is a method using python for both
| Windows-Windows and Linux-Windows connections. I've looked at pyWMI
| (http://tgolden.sc.sabren.com/python/wmi.html), and found it
| unclear in
neil,
i just intended to worry that returning a unicode object from ``str()``
would break assumptions about the way that 'type definers' like
``str()``, ``int()``, ``float()`` and so on work, but i quickly
realized that e.g. ``int()`` does return a long where appropriate!
since the principle
If you are under UNIX, try the 'screen' command.
Markus
--
http://mail.python.org/mailman/listinfo/python-list
Dear All,
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
regards
Prabahar
Send a rakhi to your brother, buy gifts and
km wrote:
that this obsession reveals a certain inexperience.
its neither obsession nor inexperience ... its just the requirement.
i think less buggy code is not the main concern for all.
Argh (choking)
Then you are definitely a dangerous person! If your program is fast to
give a false
Op 2005-08-22, Donn Cave schreef [EMAIL PROTECTED]:
Before leaving this topic, I wanted to make a rare visit
to the ruins of Google's USENET archive and pull out this
giant post on the subject of True and False, when they were
being considered for adoption into Python. There is some
stuff to
Joe T. wrote:
Hello group, I'm new to Python and have a couple of beginner questions that
I'm hoping someone can answer.
1. Is python something that you would recommend using for server side web
programming?
Definitively yes.
Something like C# or Java?
Far better IMHO.
If so, are
Thanks Michael.
I will look into the areas you have suggested...
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Roland Hedberg wrote:
What the protocol has to accomplish is extremely simple; the client
sends a number of lines (actually a RDF) and the server accepts or
rejects the packet. That's all !
...
Now, presently I'm using ( why so is a long
history which I will not go into here) and that is a
Hi,
I wonder what is the difference between the built-in function
getattr() and the normal call of a function of a class. Here is the
details:
getattr( object, name[, default])
Return the value of the named attributed of object. name must be a
string. If the string is the name of one of the
Problem solved. use 'command = Calc' to call my Calc function but ignore
the argument passed to it. Create a list with the following elements -
a.get(), b.get() and c.get(). Every time a scale slider is moved, Calc
will retrieve the current scale values and I can do with them whatever I
I want to redistribute the library that I create.
I create a project, its setup.py that when launched copy all files into
the site-packages/library directory. And here it's all ok.
When I call my library with:
import library
library.class()
I want that my library know where are its real path
23 aug 2005 kl. 10.14 skrev Michael Sparks:
Roland Hedberg wrote:
I was surprised to find that the performance was equal to what
Twisted/XMLRPC did. Around 200 ms per set, not significantly less.
That should tell you two things:
* Twisted/XMLRPC is as efficient as you can hand craft.
Terry Reedy wrote:
Benjamin Niemann [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
(snip)
In that case, you are interested in IO performance. The time spent
handling
the loop is not significant compared to the time spent executing the
'print' statement - which is a very complex
Michele Petrazzo wrote:
I want to redistribute the library that I create.
I create a project, its setup.py that when launched copy all files into
the site-packages/library directory. And here it's all ok.
When I call my library with:
import library
library.class()
I want that my library
Steve Holden wrote:
(snip)
If you want a fast language, try Holden. I've just invented it.
Unfortunately it gets the answer to every problem wrong unless the
answer is 42, but boy it runs quickly. The code for the whole
interpreter (it's written in Python) follows:
print 42
keyboard !
ORM: Several to choose from:
http://blogs.nuxeo.com/sections/blogs/florent_guillaume/2005_08_11_object_relational
http://en.wikipedia.org/wiki/Object-relational_mapping#Python
http://www.python.org/pypi?:action=browseasdf=256
--
http://mail.python.org/mailman/listinfo/python-list
Michele Petrazzo wrote:
I want to redistribute the library that I create.
I create a project, its setup.py that when launched copy all files into
the site-packages/library directory. And here it's all ok.
When I call my library with:
import library
library.class()
I want that my library
I have the following code:
A.py
from B import B
class R:
def __str__(self):
return hello world
b = B()
print b
B.py
from A import R
class B:
def __init__(self):
self.r = R()
def __str__(self):
return
[EMAIL PROTECTED] wrote:
I have the following code:
A.py
from B import B
B.py
from A import R
I think python does not support this kind of 'mutual inclusion'. Am I
right? Thanks. Cesar.
this page
http://effbot.org/zone/import-confusion.htm
might help you figure out
km wrote:
If you want a fast language, try Holden. I've just invented it.
Unfortunately it gets the answer to every problem wrong unless the
answer is 42, but boy it runs quickly. The code for the whole
interpreter (it's written in Python) follows:
print 42
great ! u can use it for ur
Steve Holden wrote:
If you want a fast language, try Holden. I've just invented it.
Unfortunately it gets the answer to every problem wrong unless the
answer is 42, but boy it runs quickly. The code for the whole
interpreter (it's written in Python) follows:
print 42
Why are you looking
Antoon Pardon wrote:
Following a well defined specification is not contradictory
to guessing. It may just mean that the guess was formalized
into the specification.
If you want the behaviour of Python to change, you should
write a PEP. It always felt natural to me to interpret empty
as false,
Thanks,
I had not found anything about it. But I had not search correctly.
There is an entry in the FAQ about it:
http://www.python.org/doc/faq/programming.html#how-can-i-have-modules-that-mutually-import-each-other
I like the most the third way.
I have also tried to move the import to the
Steve Holden wrote:
Bryan wrote:
Someone recently produced a distribution capable of running from a CD
and designed to make it easy to use Python on machines where it wasn't
actually installed. That might be a useful starting point too, but I
can't find the right incantation to get Google to
Thomas Heller wrote:
Neil Schemenauer [EMAIL PROTECTED] writes:
[Please mail followups to [EMAIL PROTECTED]
The PEP has been rewritten based on a suggestion by Guido to change
str() rather than adding a new built-in function. Based on my
testing, I believe the idea is feasible. It would be
Neil Schemenauer [EMAIL PROTECTED] writes:
[Please mail followups to [EMAIL PROTECTED]
The PEP has been rewritten based on a suggestion by Guido to change
str() rather than adding a new built-in function. Based on my
testing, I believe the idea is feasible. It would be helpful if
people
eels wrote:
Hello,
how can I check whether a directory is readable or not. Are there
differences between unix and windows?
As far as I know there aren't any differences,
code:
import os
if access(/root, os.R_OK):
print You are able to read the /root dir
--
Terry Hancock wrote:
Yes. If you're into killer apps, try out Zope. But it does have a learning
curve.
There are probably a dozen or so alternatives that are all smaller and
quicker
to learn.
Very true zope is a killer app, but different from all the other well
know server side
eels [EMAIL PROTECTED] wrote:
how can I check whether a directory is readable or not. Are there
differences between unix and windows?
The Pythonic way would be to just do what you need to do (in this
case, presumably, read the directory) and catch the specific exception
(in this case,
Will McGugan enlightened us with:
Because I can create software many times faster. And its more fun.
Same here. And because it's very easy to write unittests, for
instance.
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why
Op 2005-08-23, Magnus Lycka schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
Following a well defined specification is not contradictory
to guessing. It may just mean that the guess was formalized
into the specification.
If you want the behaviour of Python to change, you should
write a PEP.
Hi
I am just trying to analyze (parse) data from the serial port (I have
connected GPS receiver to the ttyS0, so I can read ASCII characters in
the CSV form on the serial port 1).
I am doing this just to understand how Python works (yes, you can call
me Python/Linux newbie :)
My environment is
It seems as if I am doomed to use additional software on the windows
box. Damn!
The unclarity is in the authentication for the remote box. If I wish
to start a process on a remote box with another user's credentials
(other than the user I am logged in as), I am unsure as to how to
accomplish
Antoon Pardon wrote:
In that case you wouldn't return an empty sequence if you wanted
a false value in a sequence context but would throw an exception.
So this would be fine by me, I just don't understand how this
would support the use of empty sequences as false.
I also don't see how a
Fredrik Lundh wrote:
Michele Petrazzo wrote:
I want to redistribute the library that I create.
I create a project, its setup.py that when launched copy all files into
the site-packages/library directory. And here it's all ok.
When I call my library with:
import library
library.class()
I want
praba kar wrote:
Dear All,
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
Because I can create software many times faster. And its more fun.
Will McGugan
--
http://www.kelpiesoft.com
--
Op 2005-08-23, rafi schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
In that case you wouldn't return an empty sequence if you wanted
a false value in a sequence context but would throw an exception.
So this would be fine by me, I just don't understand how this
would support the use of empty
Antoon Pardon enlightened us with:
The problem with interpreting empty as false is that empty just
means no data now. But no data now can mean no data yet or it can
mean no more data. The problem is not so much as having empty
interpreted as false but that people don't seem to think about
Here's the pyparsing rendition - about 24 lines of code, and another 30
for testing.
For reference, here's the JSON bnf:
object
{ members }
{}
members
string : value
members , string : value
array
[ elements ]
[]
elements
value
elements , value
value
string
McBooCzech wrote:
r = csv.reader(s.readline())
csv.reader expects an iterable, not a str.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Peter Hansen wrote:
You've quoted selectively. He also said Unix-style 'touch', from
which one could quite legitimately infer
nope. read his post again.
Sigh. You're being tiring, Fredrik:
'''I'm looking for an easy way to perform a UNIX-style touch, to
update the
When calling str() on a sequence or dict object, the elements of the
sequence/dict will be represented as if their __repr__ method was
called. Why is this? Wouldn't it be more consistent when calling str()
on sequence to use the __str__ method of the elements in the sequence?
As it is now, I
Thomas Heller [EMAIL PROTECTED] wrote:
I like the fact that currently unicode(x) is guarateed to return a
unicode instance, or raises a UnicodeDecodeError. Same for str(x),
which is guaranteed to return a (byte) string instance or raise an
error.
I guess its analogous to this...
praba kar wrote:
Dear All,
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
For me, the choice is typically among C++, Perl, Python, and Java. The
arguments for Python relative to these languages are:
[EMAIL PROTECTED]
| It seems as if I am doomed to use additional software on the windows
| box. Damn!
'Fraid so. If your question is: given a vanilla Windows box, can
I invoke an executable on the Windows box from a Linux box? I
believe the later versions of Windows run or can run Terminal
So do I have to save to the file first and analyze later on?
Or there is an other way how to process it (read from the serial and
analyze data) on the fly?
Petr Jakes
--
http://mail.python.org/mailman/listinfo/python-list
just tested the proposed implementation on a unicode-naive module
basically using
import sys
import __builtin__
reload( sys ); sys.setdefaultencoding( 'utf-8' )
__builtin__.__dict__[ 'str' ] = new_str_function
et voilà, str() calls in the module are rewritten, and
print u'düsseldorf'
Xah Lee wrote:
You stupid UNIX donkey! Why you wrap your email? You wasted time
formatting email that you could have used to read Python documentation
and critique it! How you expect to change world if you spend time
formatting email??? And I no want hear you let Google groups format
it!
i have written python extend module by c/c++, but i saw a module of a
software(pyMOL, you can get it from http://pymol.sourceforge.net/) called
_cmd.pyd instead of _cmd.dll. and it is written by c/c++ also, the author
use makefile to compile it into _cmd.pyd. i have some question about it:
1.
McBooCzech wrote:
So do I have to save to the file first and analyze later on?
Certainly not.
Or there is an other way how to process it (read from the serial and
analyze data) on the fly?
I've never used py-serial, so I was hoping someone else would jump in
with the best way to do this
Peter Hansen wrote:
Fredrik Lundh wrote:
Peter Hansen wrote:
You've quoted selectively. He also said Unix-style 'touch', from
which one could quite legitimately infer
nope. read his post again.
Sigh. You're being tiring, Fredrik:
You probably mean tiresome. Bots can be like that
Martin DeMello wrote:
Could someone help me get gtkmozembed working under fc3? The only
available rpms need gnome-python2 = 2.9 and fc3 ships with 2.6. I can't
find any fc3 rpms to upgrade gnome-python2 and I can't quite figure out
what I'd need to compile just to install gtkmozembed and the
Steve M wrote:
I agree with you in part and disagree in part.
[snip..]
Now, what I do agree with is a Python that can be run from a folder
without having to be installed on the system. That could have lots of
benefits, if the details with pythonpath and whatever could be sorted
out. For
Roland Hedberg [EMAIL PROTECTED] wrote:
[ ... ]
The client sends a number of lines (each ending with \n) and ends one
set of lines with a empty line.
When the client sends a line with only a . it means I'm done close
the connection.
Letting the client open the connection and sending a
Xah Lee wrote:
(circa 1996), and email should be text only (anti-MIME, circa 1995),
I think e-mail should be text only. I have both my email and news
readers set to display in plain text only. It prevents the marketeers
and spammers from obtaining feedback that my email address is valid. A
wen wrote:
1. what's the difference between them? i saw the code is same as common c++
extended python module, can i use microsoft visual C++ to create a dll
project for compiling it as _cmd.dll?
.pyd is just a naming convention. It was probably introduced to prevent
name clashes with
Do some reading, and stop hijacking threads
http://www.python.org/doc/faq/general.html
--
http://mail.python.org/mailman/listinfo/python-list
On 23 Aug 2005 01:22:31 -0700
James wrote:
Some people with C background use Python instead
of programming in C.why?
Becuase it is much more efficient.
It's rather because _they_ are much more efficient (that is, with Python).
--
jk
--
Godwin wrote:
I think its possible with python as it is called a dynamic
language.
Certainly, but what's really the point with these classes?
If they are completely generated from tables, they won't
have different behaviour anyway, just a different chunk
of attributes to fetch, save and update.
23 aug 2005 kl. 15.14 skrev Sion Arrowsmith:
Roland Hedberg [EMAIL PROTECTED] wrote:
The easy solutions are to either change:
def send( self, rdf ):
self.s.send( rdf )
self.s.send( \n )
to
def send( self, rdf ):
self.s.send( rdf+\n )
or to
l v [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Xah Lee wrote:
(circa 1996), and email should be text only (anti-MIME, circa 1995),
I think e-mail should be text only. I have both my email and news readers
set to display in plain text only. It prevents the marketeers and
praba kar [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Dear All,
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
I will now reveal the secret that explains why some people who know
how to program in C
Hello c.l.py,
Does anyone else have experience with that? I'm somewhat stuck.
The problem is basically the same as here:
http://groups-beta.google.com/group/mailing.unix.net-snmp-users/browse_thread/thread/92fdea477a2f67ba/48924041d27b748b?tvc=2q=yapsnmp+port#48924041d27b748b
that is, I can't
On 2005-08-23, praba kar [EMAIL PROTECTED] wrote:
I want to know the link between c and python.
Some people with C background use Python instead
of programming in C.why?
Because C is a dangerous, low-level language unsuitable for
general-purposed application programming.
I use C for:
On 2005-08-23, McBooCzech [EMAIL PROTECTED] wrote:
import serial
s = serial.Serial(port=0,baudrate=4800, timeout=20)
s.readline()
'$GPRMC,101236.331,A,5026.1018,N,01521.6653,E,0.0,328.1,230805,,*09\r\n'
my next intention was to do something like this:
import csv
r =
Hi,
a simple question but i found no solution:
How can i convert a float value into a string value?
string_value1 = string(float_value) + ' abc'
doesn't work ...
Thanks
Konrad
--
http://mail.python.org/mailman/listinfo/python-list
On 8/23/05, Konrad Mühler [EMAIL PROTECTED] wrote:
How can i convert a float value into a string value?
string_value1 = string(float_value) + ' abc'
string_value1 = str(float_value) + ' abc'
--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
--
[Jim Washington]
I'm still working on yet another parser for JSON (http://json.org). It's
called minjson, and it's tolerant on input, strict on output, and pretty
fast. The only problem is, it uses eval(). It's important to sanitize the
incoming untrusted code before sending it to eval().
On 2005-08-23, Konrad Mühler [EMAIL PROTECTED] wrote:
Hi,
a simple question but i found no solution:
How can i convert a float value into a string value?
string_value1 = string(float_value) + ' abc'
string_value1 = str(float_value) + ' abc'
Or the more versatile:
string_value1 =
Konrad Mühler wrote:
Hi,
a simple question but i found no solution:
How can i convert a float value into a string value?
just use the str built-in type:
f = 9.99
str(f)
'9.99'
--
deelan, #1 fan of adriana lima!
http://www.deelan.com/
--
Konrad Mühler wrote:
a simple question but i found no solution:
How can i convert a float value into a string value?
string_value1 = string(float_value) + ' abc'
str(float_value) + 'abc'
repr(float_value) + abc
'%fabc' % float_value
'%gabc' % float_value
(etc)
the tutorial has more
How can i convert a float value into a string value?
Try:
string_value1 = str(float_value) + ' abc'
or:
string_value1 = repr(float_value) + ' abc'
Type in an interactive python session.
help(str)
or:
help(repr)
regards
Matt
--
| Matt Hammond
| RD Engineer, BBC
Mike Schilling [EMAIL PROTECTED] wrote:
l v [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Xah Lee wrote:
(circa 1996), and email should be text only (anti-MIME, circa 1995),
I think e-mail should be text only. I have both my email and news readers
set to display in
Hello,
Is there any Python library similar to NET::FTP from Perl?
ftplib seems too lowlevel.
I already found a few, but would like to get one that is
endorsed by the community.
Thanks,
Paulo
--
http://mail.python.org/mailman/listinfo/python-list
Paulo Pinto wrote:
Hello,
Is there any Python library similar to NET::FTP from Perl?
ftplib seems too lowlevel.
I already found a few, but would like to get one that is
endorsed by the community.
Thanks,
Paulo
libftp sucks just look at how it's written such evil code!
Not that I know
I've tried it, but I still get this message from IIS :
HTTP/1.1 500 Server Error
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
I know that several of you will probably want to reply you should write
a parser, and I may. For that matter any tips on theory in that
direction would be appreciated.
However, if you would indulge me in my regex question I would also be
most grateful.
I'm writing an edi parser and
C A L L F O R P A P E R S
=== P E P M 2006 ===
ACM SIGPLAN 2006 Workshop on Partial Evaluation and Program Manipulation
(Affiliated with POPL 2006)
http://www.cis.ksu.edu/santos/pepm06
People,
Can someone please tell me how to execute a python script in windows?
Thanks
DaveDave FickbohmUse Technology to the Fullest1250 45th st suite 200Emeryville, CA, 94608510 594 4151 voice--
http://mail.python.org/mailman/listinfo/python-list
Giovanni Bajo wrote:
Hello,
python24.dll is much bigger than python23.dll. This was discussed already on
the newsgroup, see the thread starting here:
http://mail.python.org/pipermail/python-list/2004-July/229096.html
I don't think I fully understand the reason why additional .pyd modules were
[David Fickbohm]
People,
Can someone please tell me how to execute a python script in windows?
Thanks
Dave
Have a look at this:
http://www.python.org/doc/faq/windows.html#how-do-i-run-a-python-program-under-windows
TJG
1 - 100 of 205 matches
Mail list logo