Hi,
I'm a the maintainer for the new project 'libmsgque'
hosted at SF (see below for details) and need a volunteer
to develop the language bindings for python.
Is somebody available to take over this job ?
An example language binding for tcl is allready available.
This is the initi
On May 10, 8:31 am, Jacob Lee <[EMAIL PROTECTED]> wrote:
> Funny enough, I'm working on a project right now that is designed for
> exactly that: PARLEY,http://osl.cs.uiuc.edu/parley. (An announcement
> should show up in clp-announce as soon as the moderators release it). My
> essential thesis is th
On Wed, 09 May 2007 18:37:32 +0200, <[EMAIL PROTECTED]> wrote:
> Hi,
> I have developed a GUI using tkinter (grid geometory manager).
> The structure is a top frame containing multiple subframes. Each
> subframe has a combination of widgets like(Entry, label,
> button,listboxes). The subframes are
[EMAIL PROTECTED] wrote:
> I am writing a reminder program for our Zimbra email client. One of
> the requirements I was given was to automatically increment or
> decrement the display to show something like the following:
>
> 5 minutes until appointment
>
> or
>
> 10 minutes past your appointmen
-the code:
class A:
b=2
import inspect
print inspect.getsource(A)
class A:
c=2
print inspect.getsource(A)
-unavailable from the console, but gets you:
class A:
b=2
class A:
b=2
One thought is, in inspect, could at least:
def findsource(object):
#snip
Hi,
I need to replace a string in xml file with something else.Ex
-
rate
rate
-
Here i have opened an xml
file(small part is pasted here).I want to replace the word 'localId'
with 'dataPackageID' wherever it comes in xml file.I have asked
On May 9, 11:21 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote:
...
> I too vote for VIM. I use it on both Windows XP and Debian Etch. I
> can't find anything it doesn't do.
I also use Vim (well, GVim).
The only thing I find missing is an integrated console for running
code snippets/entire scrip
thank you everybodyvery well answered.just one question
remains
where do i find documentation on zip ...i was looking for a function
like this, but could not even find a relevant list of functions!!
--
http://mail.python.org/mailman/listinfo/python-list
Have you seen Candygram?
http://candygram.sourceforge.net/
jon N
--
http://mail.python.org/mailman/listinfo/python-list
On May 10, 6:00 pm, [EMAIL PROTECTED] wrote:
> thank you everybodyvery well answered.just one question
> remains
> where do i find documentation on zip ...i was looking for a function
> like this, but could not even find a relevant list of functions!!
ooops...even that was answered. ag
Hello Tim,
thank you for your quick and detailed reply. So I will try it at the
python-win32 list.
Many thanks for your help and if you want I will let you know when I know more.
Best regards,
Peter.
-
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tip
"Steve Holden" <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano wrote:
> > On Wed, 02 May 2007 19:47:28 -0700, Huck Phin wrote:
> [a request for peace, love and understanding, concluding with]
> >> We all should be a little more considerate of each other.
> >
> > And if the hippy hug fest fails to s
On May 10, 6:51 am, [EMAIL PROTECTED] wrote:
...
> into a list of tuples to allow moving through multiple lists, or is
> the for i in range(len(listkeys)): the only solution?
>
> Any suggestions?
For the specific case of indexing lists, the following is cleaner than
the 'for i in range...' solutio
"Terry Reedy" <[EMAIL PROTECTED],,.edu> wrote:
> "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | I am relatively new on this turf, and from what I have seen so far, it
> | would not bother me at all to tie a name's type to its first use, so that
> | the name
<[EMAIL PROTECTED]> wrote:
> I'm writing a driver in Python for an old fashioned piece of serial
> equipment. Currently I'm using the USPP serial module. From what I can
> see all the serial modules seem to set the timeout when you open a
> serial port. This is not what I want to do. I need to ch
"John Nagle" <[EMAIL PROTECTED]> wrote:
> Paul Boddie wrote:
> > On 9 May, 08:09, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> >
> >>I am relatively new on this turf, and from what I have seen so far, it
> >>would not bother me at all to tie a name's type to its first use, so that
> >>the n
I am trying to time a function's execution, but I get 'TypeError:
'bool' object is not callable' when I try to run it.
I suspect it is my calling of 'timeloop' with the function name
'lookup' and its associated variables or it could just be some stupid
error on my part.
function 'lookups' was wor
In <[EMAIL PROTECTED]>, saif.shakeel
wrote:
> Although this works alone it is nto
> working when i handle multiple file I/O.Is there a alternative to do
> this.(maybe without read() operation)
Why do you want to change the part that *works* instead of fixing the c
Hello,
I'have just install Python 2.5.1 on Linux and the IDLE doesn't seem to
works because it didn't find Tcl/Tk
Is there someone to explain how to modify the file "setup.py"
to tell the install that Tcl/Tk are at the paht : "/usr/bin/tclsh" and
"usr/bin/wish/" ?
I have attached to log file of
I prefer PsPad.
If you like Notepad++, PSPad might be a better choice. More intuitive.
I've used Notepad++ for a while, I really disliked the fact that every
new install my settings XML file would get overwritten, and what does
that guy have with Comic sans MS? Every default style is hard coded
in
I've got a question regarding matplotlib. I use the command:
pylab.plot(...)
to create a graph.
Then, the execution of the code stops after the line:
pylab.show()
which is off course the last line of my code.
My problem is that I have to close the figure window before in order
to finish the execut
In <[EMAIL PROTECTED]>, James T. Dennis wrote:
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> In <[EMAIL PROTECTED]>, James T. Dennis wrote:
>
>> You can change it by simply assigning to the name:
>
>> In [15]: tempfile.template = 'spam'
>
>> In [16]: tempfile.template
>> Out[16]: 'sp
On May 10, 1:28 am, Ron Adam <[EMAIL PROTECTED]> wrote:
> Nick Vatamaniuc wrote:
> > Ron,
>
> > Consider using epydoc if you can. Epydoc will sort the methods and it
> > will also let you use custom CSS style sheets for the final HTML
> > output. Check out the documentation of my PyDBTable module.
On May 10, 12:56 am, [EMAIL PROTECTED] wrote:
> Hi,
> I need to replace a string in xml file with something else.Ex
>
> -
> rate
> rate
>
>
>
> -
>
> Here i have opened an xml
> file(small part is pasted here).I want to replace the word 'loca
What I'm trying to say here : a numpy array is supposed to have it's
shape stored as a tuple. What I want to do is to access this
information from my C++ code, in order to do some validity check.
So, by looking around in the doc of boost/python/numeric.hpp I was
able to do this :
void
Layer::set_
On May 10, 6:31 pm, Romain FEUILLETTE <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I'have just install Python 2.5.1 on Linux and the IDLE doesn't seem to
> works because it didn't find Tcl/Tk
>
Perhaps you haven't installed Tkinter?
I'm not sure which distribution you are using, but on my box (with
Py
Hi,
I'm looking for a way to convert en unicode string encoded in UTF-8 to
a raw string escaped with HTML Entities. I can't seem to find an easy
way to do it.
Quote from urllib will only work on ascii (which kind of defeat the
purpose imho) and escape from cgi doesn't seems to do anything with my
On May 10, 12:56 am, [EMAIL PROTECTED] wrote:
> Hi,
> I need to replace a string in xml file with something else.Ex
>
> -
> rate
> rate
>
>
>
> -
>
> Here i have opened an xml
> file(small part is pasted here).I want to replace the word 'loca
T. Crane a écrit :
> Right now I'm using Notepad++. What are other people using?
>
> trevis
Notepad++ :-)
And still use ConTEXT from time to time when I have big (MB) xml files
to look at.
--
http://mail.python.org/mailman/listinfo/python-list
On May 10, 1:42 pm, [EMAIL PROTECTED] wrote:
> On May 10, 12:56 am, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > Hi,
> > I need to replace a string in xml file with something else.Ex
>
> > -
> > rate
> > rate
> >
> >
> >
> > -
>
> > Here i have ope
James T. Dennis <[EMAIL PROTECTED]> scribis:
> In fact I realized, after reading through tempfile.py in /usr/lib/...
> that the following also doesn't "work" like I'd expect:
>
># foo.py
>tst = "foo"
>def getTst(arg):
If I change this line:
>return "foo-%s"
ldng wrote:
> Hi,
>
> I'm looking for a way to convert en unicode string encoded in UTF-8 to
> a raw string escaped with HTML Entities. I can't seem to find an easy
> way to do it.
>
> Quote from urllib will only work on ascii (which kind of defeat the
> purpose imho) and escape from cgi doesn't
Ant wrote:
>
> What method of executing code snippets in a Python shell do other Vim
> users use? Other than just copy/paste?
>
Not vim, but good old vi so should work in vim
1. Mark the start of the fragment, for exampls ms (to mark
with label s). Labels a through z are available.
2. Move to t
Try again ...
Just looking over your code quickly ... the function 'lookup' returns
either True or False (a boolean) depending on whether matchcount ==
pattcount. Then in the declaration of the function 'timeloop' this
return value gets bound to 'dofunction.' The subsequent call
'dofunction()' f
On 10 mai, 11:03, Tim Golden <[EMAIL PROTECTED]> wrote:
>
> Probably worth having a look at this:
>
>http://effbot.org/zone/unicode-convert.htm
Great ! You made my day :-)
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Bjoern Schliessmann <[EMAIL PROTECTED]>
wrote:
> Sounds more familiar than the analog approach. Maybe I misunderstood
> something ... but I can't transfer my problem to this way of
> thinking yet. My biggest problem is the fact that relays aren't
> really interes
ldng wrote:
> On 10 mai, 11:03, Tim Golden <[EMAIL PROTECTED]> wrote:
>> Probably worth having a look at this:
>>
>>http://effbot.org/zone/unicode-convert.htm
>
> Great ! You made my day :-)
>
> Thanks.
That's all right, but it's the effbot you
need to thank. (Hope Fredrik's reading this).
On 9 Mai, 11:00, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> I often have the need to match multiple regexes against a single
> string, typically a line of input, like this:
>
> if (matchobj = re1.match(line)):
> ... re1 matched; do something with matchobj ...
> elif (matchobj = re2.match(line)):
On 10 Mai, 10:27, mosscliffe <[EMAIL PROTECTED]> wrote:
> I am trying to time a function's execution,
Do you know the timeit module ? : Tool for measuring execution time of
small code snippets
Steffen
--
http://mail.python.org/mailman/listinfo/python-list
As Stephan said, you can investigate the timeit module. If you want to
test it your way, wrap up your function call in another function:
On May 10, 9:27 am, mosscliffe <[EMAIL PROTECTED]> wrote:
...
> def timeloop(dofunction,iters=10):
...
>
> def lookup(recs,patterns):
...
> myrecs = ...
>
def t
On May 6, 6:44 pm, revuesbio <[EMAIL PROTECTED]> wrote:
> Hi
> Does anyone have the python version of the conversion from msbin to
> ieee?
> Thank u
Not sure if this helps, but I think this thread has the answer;
http://groups.google.com/group/comp.lang.python/browse_thread/thread/286d9f6daff9bfab
On 10 Mai, 10:31, redcic <[EMAIL PROTECTED]> wrote:
> I've got a question regarding matplotlib. I use the command:
> pylab.plot(...)
> to create a graph.
> Then, the execution of the code stops after the line:
> pylab.show()
> which is off course the last line of my code.
>
> My problem is that I h
On May 10, 1:55 pm, [EMAIL PROTECTED] wrote:
> On May 10, 12:56 am, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > Hi,
> > I need to replace a string in xml file with something else.Ex
>
> > -
> > rate
> > rate
> >
> >
> >
> > -
>
> > Here i have ope
Many thanks. I think I see what you mean.
I will try 'timeit' as well.
Aren't examples wonderful ?
On 10 May, 11:42, Ant <[EMAIL PROTECTED]> wrote:
> As Stephan said, you can investigate the timeit module. If you want to
> test it your way, wrap up your function call in another function:
>
> On
Nick Vatamaniuc wrote:
> Thanks for the info, Ron. I had no idea pydoc was that powerful!
> -Nick
Change *was* to *will be*.
It really needed to be re factored. ;-)
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
At 11:06 AM 5/9/2007, T. Crane wrote:
>Right now I'm using Notepad++. What are other people using?
Ulipad.
Dick Moores
--
http://mail.python.org/mailman/listinfo/python-list
> you will probably have to make the port non blocking, and roll your own
> using different time.sleep(n) values between invocations to port.read(1) calls
What I actually want to do is to respond immediately if the expected
string comes in, but not raise a timeout unless it takes longer than
the m
On May 10, 8:48 pm, imageguy <[EMAIL PROTECTED]> wrote:
> On May 6, 6:44 pm, revuesbio <[EMAIL PROTECTED]> wrote:
>
> > Hi
> > Does anyone have the python version of the conversion from msbin to
> > ieee?
> > Thank u
>
> Not sure if this helps, but I think this thread has the
> answer;http://group
Grant Edwards <[EMAIL PROTECTED]> wrote:
>In the C implementations, the algorithms will be done
>implemented in single precision, so doing my Python prototyping
>in as close to single precision as possible would be "a good
>thing".
Something like numpy might give you reproducable IEEE 32-bit floa
Hi,
please consider the following code:
from __future__ import with_statement
class safe_dict(dict):
def __init__(self, *args, **kw):
self.lock = threading.Lock()
dict.__init__(self, *args, **kw)
def __getitem__(self, key):
with self.lock:
return dict
On 9 Mag, 09:10, Alexander Schliep <[EMAIL PROTECTED]> wrote:
> andrea <[EMAIL PROTECTED]> writes:
> > Well then I wanted to draw graphs and I found that pydot is working
> > really nicely.
> > BUT I'd like to do this, an interactive program to see ho the
> > algorithms works...
> > For example in
On 10 May 2007 05:45:24 -0700, [EMAIL PROTECTED] wrote:
>Hi,
>
>please consider the following code:
>
>
>from __future__ import with_statement
>
>class safe_dict(dict):
>def __init__(self, *args, **kw):
>self.lock = threading.Lock()
>dict.__init__(self, *args, **kw)
>def __g
Hi Pythonistas,
I'm stuck in a maze of new style classes and generators. While I love the
concepts, I obviously didn't grok them throughout.
I'm trying to generate a bunch of similar classes, where some are contained
in list attributes of others, e.g.:
class A:
def __init__(self):
self.i
Jean-Paul Calderone schrieb:
> On 10 May 2007 05:45:24 -0700, [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> please consider the following code:
>>
>>
>> from __future__ import with_statement
>>
>> class safe_dict(dict):
>>def __init__(self, *args, **kw):
>>self.lock = threading.Lock()
>>
> From: Alan Isaac
>
> I'm sure my first pass will be flawed, but here goes:
>
> http://docs.python.org/lib/typesmapping.html:
> to footnote (3), add phrase "which may depend on the memory location of
> the
> keys" to get:
>
> Keys and values are listed in an arbitrary order,
> which may
On Thu, 2007-05-10 at 08:01 -0500, Hamilton, William wrote:
> It's possible there are other factors that can affect this as well. A more
> general statement is probably more appropriate:
>
> "Keys and values are listed in an arbitrary order. This order is
> non-random, varies across Python imple
>> Alan Isaac requested:
>> http://docs.python.org/lib/typesmapping.html: to footnote (3), add phrase
>> http://docs.python.org/lib/types-set.html: append a new sentence to 2nd
paragraph
"Hamilton, William " <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Keys and values are listed
Hi
I try to check whether a given input is keyword or not. However this
script won't identify keyword input as a keyword. How should I modify it
to make it work?
#!usr/bin/env python
import keyword
input = raw_input('Enter identifier to check >> ')
if input in keyword.kwlist:
print input
On May 8, 5:53 pm, John Nagle <[EMAIL PROTECTED]> wrote:
> The point here is that we don't need language changes or declarations
> to make Python much faster. All we need are a few restrictions that
> insure that, when you're doing something unusual, the compiler can
> tell.
Franz, CMUCL, SB
On May 9, 6:51 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> Is there any way to do single-precision floating point
> calculations in Python?
Yes, use numpy.float32 objects.
> I know the various array modules generally support arrays of
> single-precision floats. I suppose I could turn all my
James Stroud wrote:
> I included code in my previous post that will parse the entire bib,
> making use of the numbering and eliminating the most probable, but still
> fairly rare, potential ambiguity. You might want to check out that code,
> as my testing it showed that it worked with your exam
On 2007-05-10, Ross Ridge <[EMAIL PROTECTED]> wrote:
> Grant Edwards <[EMAIL PROTECTED]> wrote:
>>In the C implementations, the algorithms will be done
>>implemented in single precision, so doing my Python prototyping
>>in as close to single precision as possible would be "a good
>>thing".
>
> So
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>>- would I need to override another methods e.g. update() or items() in
>>order to remain thread-safe or is this enough?
No, you'll need to protect almost everything. items may be safe. update,
clear, get, has_key, pop, and setdefault all need a lo
Just got a new Vista system and puter
Installed a newer version of Python, up from 2.2 or so...
Tried to install Win extensions, but have forgotten how it's done.
Clicking on setup in the Win Extsions package flashes a window by,
but cannot read it. and I don't see a way to load the setup i
sturlamolden wrote:
> On May 8, 5:53 pm, John Nagle <[EMAIL PROTECTED]> wrote:
>
>> The point here is that we don't need language changes or declarations
>> to make Python much faster. All we need are a few restrictions that
>> insure that, when you're doing something unusual, the compiler ca
Can a class inside a module, access a method, outside of class, but
inside of the module?
Eg. Can instance of class a access main, if so how? What is the
scope of "def main()" interms of class A?
myModule:
class A:
main()
def main():
thnx.
--
http://mail.python.org/mailman/listinfo/pyt
This works for me.Also tried importing this module into another program.
The class is inside the module so like the different function's of a module
can access each other,the same thing applies to a class and
functions/classes
#Test Module
class foo:
def __init__(self):
self.
On 10 Mag, 15:38, [EMAIL PROTECTED] wrote:
> Hi
>
> I try to check whether a given input is keyword or not. However this
> script won't identify keyword input as a keyword. How should I modify it
> to make it work?
>
> #!usr/bin/env python
> import keyword
>
> input = raw_input('Enter identifier to
johnny <[EMAIL PROTECTED]> wrote:
> Can a class inside a module, access a method, outside of class, but
> inside of the module?
>
> Eg. Can instance of class a access main, if so how? What is the
> scope of "def main()" interms of class A?
>
> myModule:
>
> class A:
>main()
>
> def main(
Is it possible to call threads inside another thread (nested threads)?
The example above creates a thread to call a function "eat" every time
based on a specified interval.
Now for example, if I make the called function "eat" to spawn threads
to do the work in a queue and when all jobs are done, s
Hello,
I try to write a python application with wx that shows images from a
MySQL database. I use the following code to connect and get data when
some event was triggered:
dbconn = MySQLdb.connect(host="localhost", user="...", passwd="...",
db="images")
dbcurs = dbconn.cursor()
dbcurs.execute("""
On Thu, 2007-05-10 at 07:19 -0700, Christoph Krammer wrote:
> Hello,
>
> I try to write a python application with wx that shows images from a
> MySQL database. I use the following code to connect and get data when
> some event was triggered:
>
> dbconn = MySQLdb.connect(host="localhost", user="..
On Do, 10.05.2007, 16:19, Christoph Krammer wrote:
> Hello,
>
> I try to write a python application with wx that shows images from a
> MySQL database. I use the following code to connect and get data when
> some event was triggered:
>
> dbconn = MySQLdb.connect(host="localhost", user="...", passwd=
On 9 Maj, 03:23, John Nagle <[EMAIL PROTECTED]> wrote:
> Hendrik van Rooyen wrote:
> > "Tim Roberts" <[EMAIL PROTECTED]> wrote"
> > It is also possible to keep the timer list sorted by "expiry date",
> > and to reprogram the timer to interrupt at the next expiry time
> > to give arbitrary resoluti
On Wed, 9 May 2007 13:06:52 -0500, "T. Crane"
<[EMAIL PROTECTED]> wrote:
>Right now I'm using Notepad++. What are other people using?
SPE, out of the trunk. http://sourceforge.net/projects/spe/
John
--
http://mail.python.org/mailman/listinfo/python-list
Release Announcement: PARLEY version 0.2
PARLEY is an API for writing Python programs that implement the Actor
model of distributed systems, in which lightweight concurrent processes
communicate through asynchronous message-passing. Actor systems typically
are easier to write and debug than tradit
>
> Hmm... I tried, and identify it.
> Try to change the 'input' variable name with other...
>
Changed input variable to myInput, but the result is still the same.
for example, 'else' isn't identified as a keyword by the script though
it exists in keyword.kwlist.
--
http://mail.python.org/mail
On 2007-05-10, johnny <[EMAIL PROTECTED]> wrote:
> Is it possible to call threads inside another thread (nested threads)?
No. It's not possible to call threads because they're not
callable objects. (I'm assuming you're talking about Thread
objects from the threading module.)
If you're asking if
Hello!
I'm pleased to announce the 0.7.7 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 quick to get started wit
andrea <[EMAIL PROTECTED]> writes:
> On 9 Mag, 09:10, Alexander Schliep <[EMAIL PROTECTED]> wrote:
>> Check outhttp://gato.sf.net(LGPL license). It does exactly what you
>> want to do and there is a binary for MacOS X. Algorithms are implemented
>> using Gato's graph class and rudimentary visualiz
Hello!
I'm pleased to announce the 0.8.4 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 quick to get started wi
On May 10, 9:59 am, Charles Sanders <[EMAIL PROTECTED]>
wrote:
> Ant wrote:
>
> > What method of executing code snippets in a Python shell do other Vim
> > users use? Other than just copy/paste?
>
> Not vim, but good old vi so should work in vim
>
> 1. Mark the start of the fragment, for exampls ms
Hello!
I'm pleased to announce the 0.9.0 release of SQLObject, the first stable
release of the 0.9 branch.
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 t
> From: [EMAIL PROTECTED]
>
> Hi
>
> I try to check whether a given input is keyword or not. However this
> script won't identify keyword input as a keyword. How should I modify it
> to make it work?
>
> #!usr/bin/env python
> import keyword
>
> input = raw_input('Enter identifier to check >> '
Hans-Peter Jansen schrieb:
> Hi Pythonistas,
>
> I'm stuck in a maze of new style classes and generators. While I love the
> concepts, I obviously didn't grok them throughout.
>
> I'm trying to generate a bunch of similar classes, where some are contained
> in list attributes of others, e.g.:
In <[EMAIL PROTECTED]>, Hans-Peter Jansen wrote:
> class Gen(object):
> def records(self, cls):
> for i in range(3):
> setattr(cls, "id", "%s%s" % (cls.__doc__, i))
> yield cls
>
> […]
>
> class GenA(Gen):
> def __init__(self):
> self.genB = GenB()
ANNOUNCING
eGenix.com mx Base Extension Package
Version 3.0.0
Open Source Python extensions providing important and useful
services for Python programmers
ANNOUNCING
eGenix.com mxODBC Database Interface
Version 3.0.0
Our commercially supported Python extension providing
ODBC database connectivity to Python applications
On Thu, 10 May 2007 13:38:40 +, tom wrote:
> Hi
>
> I try to check whether a given input is keyword or not. However this
> script won't identify keyword input as a keyword. How should I modify it
> to make it work?
It works for me.
Try printing keyword.__file__ to make sure you are impor
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote:
[ ... ]
>> Try to change the 'input' variable name with other...
>Changed input variable to myInput, but the result is still the same.
That was good advice, but isn't going to help here. Because "input"
isn't a keyword, it's a builtin. If
Still no go. I just can't get it right. My current script:
#!usr/bin/env python
import keyword
myInput = raw_input('Enter identifier to check >> ')
if myInput in keyword.kwlist:
print myInput, "is keyword"
else:
print myInput, "is not keyword"
print keyword.kwlist
print keyword.__file
I learned to program with Pascal, way back when. Went into software
development for a while, then went into systems admin. Have programmed
in several languages, just learning Python.
Some things I find odd:
1) 5/-2 == -3?
2) list assignment handling, pointing two vars to the same list:
With sim
On Thu, 2007-05-10 at 08:58 -0700, walterbyrd wrote:
> I learned to program with Pascal, way back when. Went into software
> development for a while, then went into systems admin. Have programmed
> in several languages, just learning Python.
>
> Some things I find odd:
>
> 1) 5/-2 == -3?
Divisio
On 2007-05-10, walterbyrd <[EMAIL PROTECTED]> wrote:
> 2) list assignment handling, pointing two vars to the same list:
Python doesn't have variables. It has objects to which you can
bind names.
> But with lists:
a = list("1234")
That creates a list object and binds the name "a" to it.
Alan Isaac wrote:
> "Carsten Haese" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> I was simply pointing out all the ways in which you made it difficult for
> the
>> community to explain your problem.
>
> And without that community, I would still not have a clue.
> Thanks to all!
On 10 May 2007 08:58:54 -0700, walterbyrd <[EMAIL PROTECTED]> wrote:
> I learned to program with Pascal, way back when. Went into software
> development for a while, then went into systems admin. Have programmed
> in several languages, just learning Python.
>
> Some things I find odd:
>
> 1) 5/-2 =
walterbyrd wrote:
> I learned to program with Pascal, way back when. Went into software
> development for a while, then went into systems admin. Have programmed
> in several languages, just learning Python.
>
> Some things I find odd:
>
> 1) 5/-2 == -3?
>
> 2) list assignment handling, pointing
On May 10, 4:21 am, [EMAIL PROTECTED] wrote:
> On May 10, 1:55 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > On May 10, 12:56 am, [EMAIL PROTECTED] wrote:
>
> > > Hi,
> > > I need to replace a string in xml file with something else.Ex
>
> > > -
> > > rate
> > > rate
> > >
> > >
> > >
>
On May 10, 11:58 am, walterbyrd <[EMAIL PROTECTED]> wrote:
>[snip]
>
> 2) list assignment handling, pointing two vars to the same list:
>
> With simple data types:>>> a = 5
> >>> b = a
> >>> a = 3
> >>> a,b
>
> (3, 5)
>
> Which is what I'd expect, since I have changed a, but not b.
>
> But with lis
On Thu, 2007-05-10 at 11:29 -0500, Robert Kern wrote:
> """Never rely on the order of dictionaries and sets."""
Easy, Robert, there's a baby in that bathwater.
I think it's useful to note that the arbitrary ordering returned by
dict.keys() et al. is locally stable in the absence of intervening
mo
1 - 100 of 206 matches
Mail list logo