Re: loop in python

2005-08-23 Thread km
> 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 proj

Network performance

2005-08-23 Thread Roland Hedberg
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

Re: Eve from Adams' Ribs

2005-08-23 Thread Gregory Bond
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

Re: loop in python

2005-08-23 Thread Peter Otten
km wrote: > the first thing any newbie to python asks me is abt "raw speed in > comparison with similar languages like perl" when i advocate python to > perl. In that case it is easy enough to follow the common industry practice and tweak your test cases until your favourite product comes out fas

RE: while c = f.read(1)

2005-08-23 Thread Delaney, Timothy (Tim)
Donn Cave wrote: > 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 ignore, where she addresses q

RE: Well, another try Re: while c = f.read(1)

2005-08-23 Thread Delaney, Timothy (Tim)
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 answer

Doubt C and Python

2005-08-23 Thread praba kar
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 win

Reg python nature.

2005-08-23 Thread praba kar
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 att

Re: loop in python

2005-08-23 Thread Randy Bush
computers are cheap. i am expensive. give me clear and maintainable code every time. randy -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the difference between built-in func getattr() and normal call of a func of a class

2005-08-23 Thread Diez B. Roggisch
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

Re: What's the difference between built-in func getattr() and normal call of a func of a class

2005-08-23 Thread Johnny
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 > don

Re: Doubt C and Python

2005-08-23 Thread James
> 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

Re: while c = f.read(1)

2005-08-23 Thread Antoon Pardon
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

gtkmozembed in fedora core 3

2005-08-23 Thread Martin DeMello
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

Re: What's the difference between built-in func getattr() and normal call of a func of a class

2005-08-23 Thread Robert Kern
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

check whether directory is readable

2005-08-23 Thread eels
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

RE: X-Platform method of remote execution of Windows programs

2005-08-23 Thread Tim Golden
[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

Re: Revised PEP 349: Allow str() to return unicode strings

2005-08-23 Thread wolf
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 works

Re: Running multiple console processes and watching their output

2005-08-23 Thread Markus
If you are under UNIX, try the 'screen' command. Markus -- http://mail.python.org/mailman/listinfo/python-list

Doubt Regarding link between C and Python

2005-08-23 Thread praba kar
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 win

Re: loop in python

2005-08-23 Thread rafi
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 fal

Re: while c = f.read(1)

2005-08-23 Thread Antoon Pardon
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 > st

Re: Python and the web

2005-08-23 Thread bruno modulix
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,

Re: Urgent: Embedding Python problems - advice sought

2005-08-23 Thread adsheehan
Thanks Michael. I will look into the areas you have suggested... Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Network performance

2005-08-23 Thread Michael Sparks
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

What's the difference between built-in func getattr() and normal call of a func of a class

2005-08-23 Thread Johnny
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

Re: passing arguments from scale widget to function

2005-08-23 Thread m7b52000
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 want...

Library and real path name

2005-08-23 Thread Michele Petrazzo
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 (s

Re: Network performance

2005-08-23 Thread Roland Hedberg
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 ha

Re: loop in python

2005-08-23 Thread bruno modulix
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 v

Re: Library and real path name

2005-08-23 Thread Robert Kern
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

Re: loop in python

2005-08-23 Thread bruno modulix
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 > keyboar

Re: Eve from Adams' Ribs

2005-08-23 Thread gene tani
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=browse&asdf=256 -- http://mail.python.org/mailman/listinfo/python-list

Re: Library and real path name

2005-08-23 Thread Fredrik Lundh
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

Import Error ('mutual inclusion of modules'?)

2005-08-23 Thread icoba
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 self

Re: Import Error ('mutual inclusion of modules'?)

2005-08-23 Thread Fredrik Lundh
<[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

Re: loop in python

2005-08-23 Thread bruno modulix
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

Re: loop in python

2005-08-23 Thread Fredrik Lundh
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 lo

Re: while c = f.read(1)

2005-08-23 Thread Magnus Lycka
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

Re: Import Error ('mutual inclusion of modules'?)

2005-08-23 Thread icoba
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 __init

Re: Python Light Revisted?

2005-08-23 Thread Robin Becker
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

Re: [Python-Dev] Revised PEP 349: Allow str() to return unicode strings

2005-08-23 Thread M.-A. Lemburg
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

Re: Revised PEP 349: Allow str() to return unicode strings

2005-08-23 Thread Thomas Heller
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 > p

Re: check whether directory is readable

2005-08-23 Thread Jonas Geiregat
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" -- http://mail.python.

Re: Python and the web

2005-08-23 Thread Jonas Geiregat
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 si

Re: check whether directory is readable

2005-08-23 Thread Ben Finney
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, presum

Re: Doubt C and Python

2005-08-23 Thread Sybren Stuvel
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

Re: while c = f.read(1)

2005-08-23 Thread Antoon Pardon
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 > wr

py-serial + CSV

2005-08-23 Thread McBooCzech
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 Fedo

Re: X-Platform method of remote execution of Windows programs

2005-08-23 Thread utabintarbo
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 thi

Re: while c = f.read(1)

2005-08-23 Thread rafi
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

Re: Library and real path name

2005-08-23 Thread Michele Petrazzo
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

Re: Doubt C and Python

2005-08-23 Thread Will McGugan
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 -- http://mail.pyth

Re: while c = f.read(1)

2005-08-23 Thread Antoon Pardon
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 us

Re: while c = f.read(1)

2005-08-23 Thread Sybren Stuvel
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 w

Re: Sanitizing untrusted code for eval()

2005-08-23 Thread Paul McGuire
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

Re: py-serial + CSV

2005-08-23 Thread Michael Hoffman
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

Re: Best way to 'touch' a file?

2005-08-23 Thread Peter Hansen
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

str() representation of sequences and dicts

2005-08-23 Thread Kwikrick
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 often

Re: Revised PEP 349: Allow str() to return unicode strings

2005-08-23 Thread Nick Craig-Wood
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...

Re: Doubt C and Python

2005-08-23 Thread Jeff Schwab
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:

RE: X-Platform method of remote execution of Windows programs

2005-08-23 Thread Tim Golden
[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 Servic

Re: py-serial + CSV

2005-08-23 Thread McBooCzech
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

Re: while c = f.read(1)

2005-08-23 Thread Antoon Pardon
Op 2005-08-23, Sybren Stuvel schreef <[EMAIL PROTECTED]>: > 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 >>

Re: [Python-Dev] Revised PEP 349: Allow str() to return unicode strings

2005-08-23 Thread Wolfgang Lipp
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' does

Re: Jargons of Info Tech industry

2005-08-23 Thread Lah Xee
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!

what's the difference between *.dll and *.pyd if both of them are extended python module?

2005-08-23 Thread wen
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. what'

Re: py-serial + CSV

2005-08-23 Thread Michael Hoffman
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

Re: Best way to 'touch' a file?

2005-08-23 Thread Steve Holden
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".

Re: gtkmozembed in fedora core 3

2005-08-23 Thread Jonas Geiregat
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 t

Re: Python Light Revisted?

2005-08-23 Thread Fuzzyman
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.

Re: Network performance

2005-08-23 Thread Sion Arrowsmith
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 sen

Re: Jargons of Info Tech industry

2005-08-23 Thread l v
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

Re: what's the difference between *.dll and *.pyd if both of them are extended python module?

2005-08-23 Thread Daniel Dittmar
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 unrel

Re: Reg python nature.

2005-08-23 Thread gene tani
Do some reading, and stop hijacking threads http://www.python.org/doc/faq/general.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Doubt C and Python

2005-08-23 Thread en.karpachov
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 -- http://mail.python.org/mailman/listinfo/pyt

Re: Eve from Adams' Ribs

2005-08-23 Thread Magnus Lycka
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

Re: Network performance

2005-08-23 Thread Roland Hedberg
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( r

Re: Jargons of Info Tech industry

2005-08-23 Thread Mike Schilling
"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 marketee

Re: Reg python nature.

2005-08-23 Thread Rick Wotnaz
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 i

yapsnmp port issues

2005-08-23 Thread [EMAIL PROTECTED]
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=2&q=yapsnmp+port#48924041d27b748b that is, I can't for

Re: Doubt C and Python

2005-08-23 Thread Grant Edwards
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 fo

Re: py-serial + CSV

2005-08-23 Thread Grant Edwards
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 = cs

Convert float to string ...

2005-08-23 Thread Konrad Mühler
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

Re: Convert float to string ...

2005-08-23 Thread Simon Brunning
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/ -- http://mail

Re: Sanitizing untrusted code for eval()

2005-08-23 Thread Alan Kennedy
[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().

Re: Convert float to string ...

2005-08-23 Thread Grant Edwards
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_value

Re: Convert float to string ...

2005-08-23 Thread deelan
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://mail.python.org/mail

Re: Convert float to string ...

2005-08-23 Thread Fredrik Lundh
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

Re: Convert float to string ...

2005-08-23 Thread Matt Hammond
> 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 | R&D Engineer, BBC Resear

Re: Jargons of Info Tech industry

2005-08-23 Thread Richard Bos
"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 > > se

High Level FTP library

2005-08-23 Thread Paulo Pinto
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

Re: High Level FTP library

2005-08-23 Thread Jonas Geiregat
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 th

Re: literal accented characters in python asp page with Microsoft IIS

2005-08-23 Thread nicolas_riesch
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

Nested Regex Conditionals

2005-08-23 Thread Paul Dale
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

PEPM 2006: Call for Papers -- ACM SIGPLAN 2006 Workshop on Partial Evaluation and Program Manipulation

2005-08-23 Thread John Hatcliff
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

How to execute python script in Windows

2005-08-23 Thread David Fickbohm
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

Re: pythonXX.dll size: please split CJK codecs out

2005-08-23 Thread Neil Benn
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

RE: How to execute python script in Windows

2005-08-23 Thread Tim Golden
[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 __

python asp page keeps state across queries !?!?

2005-08-23 Thread nicolas_riesch
I am writing asp pages in python, running on IIS 5 on Windows. I notice that variables outside functions keep their value across queries. I don't know if it is normal. Here is a little script that demonstrates it: -- problem.asp - <[EMAIL PROTECTED]> <% try

  1   2   >