Hi
> the perl code finds a line that matches something like
> "sometext<\tag1>" in the line and then assign $variable the value
> of "sometext"
No, but if you use a closing instead of <\tag1> it does. You had me
scratching my head for a while there. :-)
This should do it in python:
Since you are a Windows user, I strongly recommend that you install
activestate python instead of the one you download from python.org. The
PythonWin from active state is much more user friendly. It's basically
an IDE (integrated development environment), which includes interactive
shell, editor, d
You may want to read up on http://python.org/doc/faq/installed.html
--
http://mail.python.org/mailman/listinfo/python-list
Hi, I am very sorry for confusing you with the file names. Now i want to say you one more thing and i change my ex filenames to the exact filenames. The below is what i explained in my previous mail: ** My files are: 1. D:\TestDir\module\config.py 2. D:\TestDir\scripts\http
This seems like a web page parsing question. Another approach can be as
follows if you know the limiting token strings:
a.split('')[1].split('\r\n')[0]
--
http://mail.python.org/mailman/listinfo/python-list
One liners are cool. Personally however, I would not promote one liners
in Python. Python code is meant to be read. Cryptic coding is in perl's
world.
Code below is intuitive and almost a three year old would understand.
for line in open('C:\\switches.txt'):
print line.rstrip()
BTW, if t
bruno at modulix wrote:
(snip)
> Je ne vois pas très bien à quoi sert cette classe (à moins bien sûr
> qu'il y ait d'autre code). Pour ce que je vois là, pourquoi ne pas
> appeler directement les classes HtmlPage, HtmlElement et HtmlLiteral ?
>
oops, sorry, forgot to remove this before posting :(
On 3 Mar 2006 00:20:21 -0800, P Boy <[EMAIL PROTECTED]> wrote:
This seems like a web page parsing question. Another approach can be asfollows if you know the limiting token strings:a.split('SIZE=2>')[1].split('\r\n')[0]
As others have mentioned , you really need a an HTML parser. But the fo
P Boy wrote:
> BTW, if the file is huge, one may want to consider using
> open('c:\\switches.txt', 'rb') instead.
Why?
--
http://mail.python.org/mailman/listinfo/python-list
Tom Leggio wrote:
> Do I need this on my computer---Python---can I remove it without hurting
> anything?
Without further information it is hard to answer, you haven't even said
what operating system you are running, let alone what programs you have
installed. Your message headers imply you are
Gerard Flanagan wrote:
> bruno at modulix wrote:
>
(snip french)
>
> I was trying to implement the factory pattern.
> The recipe above uses 'apply' which is deprecated according to the
> docs, and I suppose I was curious how to do the same sort of thing
> without 'apply'.
def fun(*args, **kwargs
_wolf wrote:
> then the output is ::
>
> Hello, oops!
> Hello, oops!
> <20 lines omitted/>
> Hello, oops!
> Hel
Are you running Python unbuffered? I.e. python -u
--
http://mail.python.org/mailman/listinfo/python-list
I had some issues while ago trying to open a large binary file.
Anyway, from file() man page:
If mode is omitted, it defaults to 'r'. When opening a binary file, you
should append 'b' to the mode value for improved portability. (It's
useful even on systems which don't treat binary and text files
I want to install scipy 0.4.6 (windows)on my computer ,but i cannot
download it from www.scipy.org. who can tell me another place to
download it?
--
http://mail.python.org/mailman/listinfo/python-list
ajones wrote:
(snip)
> I would suggest getting a good grasp on OOP before you get into design
> patterns. When most people start with any new concept they tend to try
> and see everything in terms of their new toy, so sticking to one or two
> new concepts at a time will make things a little easie
Hello,
How can I convert a dictionary into a HTTP POST string?
I have an example below, but this is not working correctly for special
characters. (" ' and others). In other words, if I use "Bessy's cat"
instead of "Bessy" then the http server will parse that to "Bessy's cat"
Probably the prob
Glurt Wuntal (02.03.2006 15:56):
> I am a newbie with Python. It's a great language, but I would like to be
> able to present a simple gui menu for some of my scripts; something better
> than using 'raw_input' prompts.
>
If you only need some dialogs, input and/or message boxes, you could start
Hi
I, too, am a python newbie and have wrestled with GUI programming. I
think I am winning, but its been a struggle.
>From what I have gleaned, there are three and a half options. The half
is easygui - see http://www.ferg.org/easygui - which allows you to
place pop up dialogues in procedural co
On 26 Feb 2006 22:30:28 -0800, rumours say that "Crutcher"
<[EMAIL PROTECTED]> might have written:
>This seems great, except why can't I compare strings? It seems too
>useful when dealing with user input, or parsing messages or config
>files.
>
Weekdays = enum('sun', 'mon', 'tue', 'wed', 'thu
Scott David Daniels enlightened us with:
> One reason is such code changes too much on code edits, which makes
> code differences hard to read.
Good point. I'll keep it in mind :)
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, bu
rtilley enlightened us with:
> I took it literally when I first read it b/c it made sense to me and
> I did not notice the date. I don't think it will ever be _required_
> of all Python hackers, but I may be wrong.
Well, part of it is a serious PEP. It being _required_ was the joke.
Sybren
--
Th
Steven, does your technique fix my problem? Would that delete the
objects I've created within a program if I suffix my code with it?
--
http://mail.python.org/mailman/listinfo/python-list
Laszlo Zsolt Nagy enlightened us with:
> How can I convert a dictionary into a HTTP POST string? I have an
> example below, but this is not working correctly for special
> characters. (" ' and others).
URL-quote it.
> In other words, if I use "Bessy's cat" instead of "Bessy" then the
> http serv
Hello!
I think
for i in range(10):
is more readable than a while loop with explicit incrementation of i.
However, range(10) in the command interpreter obviously returns a list. Is
this list optimized away in the code above, or is it actually constructed
internally? (With, say, CPython in
Em Sex, 2006-03-03 às 10:26 +0100, Blackbird escreveu:
> However, range(10) in the command interpreter obviously returns a list. Is
> this list optimized away in the code above, or is it actually constructed
> internally? (With, say, CPython in one of the recent versions.)
It's constructed. That'
Laszlo Zsolt Nagy wrote:
> Hello,
>
> How can I convert a dictionary into a HTTP POST string?
> I have an example below, but this is not working correctly for special
> characters. (" ' and others). In other words, if I use "Bessy's cat"
> instead of "Bessy" then the http server will parse tha
On Thu, 02 Mar 2006 19:24:48 -0800, mforbes wrote:
[snip]
> I know, but the point is that I want to allow the user of the module to be
> able to specify which sqrt function should be used depending on the type
> of x. Importing math in the module would prevent the user from using f()
> with c
John Salerno wrote:
> But I read in the PEP that spaces are recommended over tabs. If this is
> the case, it would involve pressing backspace 4 times (or 8, etc.) to
> get back to column 1.
In the editor which I use, pressing the tab key indents the current line
under the previous one the firs
... how?
I'm writing an app that holds a public data dictionary from which other
objects obtain part of their __dict__ values so they all work on the
same dataset (yes I'm fiendishly clever and a constructor of unreadable
sentences (and code) ;)).
My problem is that I haven't found an easy way
On Thu, 02 Mar 2006 22:35:51 -0800, Michael McNeil Forbes wrote:
> What I was thinking was: is there some way to pass a parameter to the
> module on import so that the module can then use the correct environment.
>
> If I could pass a dictionary to the module with all of the overloaded
> functi
Paul Rubin wrote:
> Roy Smith <[EMAIL PROTECTED]> writes:
> > > Somewhat less often, something is easy in Java and difficult in
> > > Python.
> > Example?
>
> Sandboxed code is a real obvious one.
I don't disagree that this is true in general, but is that actually
covered in the design patterns bo
On Fri, 03 Mar 2006 01:03:38 -0800, P Boy wrote:
> I had some issues while ago trying to open a large binary file.
The important term there is BINARY, not large. Many problems *reading*
(not opening) binary files will go away if you use 'rb', regardless of
whether they are small, medium or large.
ajones <[EMAIL PROTECTED]> wrote:
> I would suggest getting a good grasp on OOP before you get into design
> patterns. When most people start with any new concept they tend to try
> and see everything in terms of their new toy, so sticking to one or two
> new concepts at a time will make things
In article <[EMAIL PROTECTED]>,
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote:
> ... how?
>
> I'm writing an app that holds a public data dictionary from which other
> objects obtain part of their __dict__ values so they all work on the
> same dataset (yes I'm fiendishly clever and a constru
bruno at modulix wrote:
[...]
>
> I don't know this HtmlElement class, nor where it comes from.
> 'to_string()' (or is it toString() ?) is javaish. The pythonic idiom for
> this is implementing the __str__() method and calling str(obj) on the
> obj (which will call obj.__str__()). Hence my (bad) gu
Joel Hedlund enlightened us with:
> regexp = re.compile(r"<(tag1)>(.*)")
I'd go for
regexp = re.compile(r"<(tag1)>(.*?)")
Otherwise this:
line = "sometextothertext"
match = regexp.search(line)
will result in 'sometextothertext'
Sybren
--
The problem with the world is stupidity. Not saying t
Hi, When i run the python file, the python compiled file is created. Is it possible to relocate the python compiled file to some other directory?. Is it possible to frequent update the relocated pyc file while running the py file?thanks and regards, abbi
Yahoo! Mail
Bring photos to
On Thu, 02 Mar 2006 20:45:10 -0500, John Salerno wrote:
> To test this out a wrote a little script as an exercise:
>
> for num in range(1, 10):
> x = 'c' * num
> y = 'c' * num
>
> if x is y:
> print 'x and y are the same object with', num, 'characters'
> el
Hi list,
Playing with the great pysvn I get this problem:
Traceback (most recent call last):
File "D:\avn\mail.py", line 80, in ?
mailbody += diff
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position
10710: ordinal not in range(128)
It seems the pysvn.client.diff fun
Hi all,
I want to use python on a server to access incoming TCP port accesses. So I
need to use the socket interface which is new to me. To quote the Py Library
Reference "7.2 socket -- Low-level networking interface":-
For an introduction to socket programming (in C), see the following papers:
Fabian Steiner wrote:
> David Boddie wrote:
> > In Qt 4, the demos/textedit demo does this with a lot less code.
> >
> > Or are you think of something else?
>
> Thank you very much for this hint! Thanks to this example I was able to
> print out my first pages :)
That's good to hear. :-)
> But so
> I'd go for
> regexp = re.compile(r"<(tag1)>(.*?)")
Indeed. I second that.
/Joel
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> This is a real small point, but I'd like to hear what others do in this
> case. It's more an 'administrative' type question than Python code
> question, but it still involves a bit of syntax.
>
> One thing I like to do is use tabs for my indentation, because this
> ma
I think you are trying to concatenate a unicode string with regular
one so when it tries to convert the regular string to unicode with
ASCII(default one) encoding it fails. First find out which of these
strings is regular and how it was encoded, then you can decode it like
this(if regular string is
it does look like it, no? but i don't---at least i think i don't. in my
httpd conf it says
``AddHandler cgi-script .py``, and at the top of my script,
``#!/usr/local/bin/python``. standard, no ``-u`` here.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 03 Mar 2006 11:41:05 GMT, John Pote wrote:
> Where can I get the various papers mentioned in the manual? And as I like
> books sitting on the shelf can someone recommend a book on sockets.
Unix Network Programming by Stevens
--
USB Priests for only 10$
--
http://mail.python.org/mailma
ianaré wrote:
>> you did make me understand a way to sort this thing finally: sort by
> base path then by full path, which is how i came up with:
>
> files.sort(key=lambda x: x.lower())
> files.sort(key=lambda x: os.path.dirname(x))
>
> well actually i am sorting first by full name, then by base
Michele Petrazzo <[EMAIL PROTECTED]> wrote:
>some days ago I posted here and say that python "forgot" to raise an
>exception, but my code was too long for make some tries possible.
>But now I can reproduce the problem into another, little, project:
>
>www.unipex.it/vario/wxFrameSchedule.py
>www.un
hi,
I need to get the index of an object in a list. I know that no two objects
in the list are the same, but objects might evaluate as equal. for example
list = [obj1, obj2, obj3, obj4, obj5]
for object in list:
objectIndex = list.index(object)
print objectIndex
prints 0, 1, 2, 3, 2
On 3 Mar 2006 01:16:23 -0800, [EMAIL PROTECTED]
> I, too, am a python newbie and have wrestled with GUI programming. I
> think I am winning, but its been a struggle.
I started with wxPython and struggled with it for a long time. I was
able to get the job done, but using it never seemed natural.
On Thu, 02 Mar 2006 18:58:50 GMT, John Salerno wrote:
> I use UltraEdit right now, and it is possible to convert spaces and tabs
> back and forth, but it's just an extra step.
I wouldn't definitely suggest UltraEdit to code Python.
Probably you should try scite.
I'm using TextMate (but it's M
Ben Cartwright wrote:
> Ben Cartwright wrote:
> > orangeDinosaur wrote:
> > > I am encountering a behavior I can think of reason for. Sometimes,
> > > when I use the .strip module for strings, it takes away more than what
> > > I've specified. For example:
> > >
> > > >>> a = 'Hughes. John\r
Sion Arrowsmith wrote:
> Michele Petrazzo <[EMAIL PROTECTED]> wrote:
>> some days ago I posted here and say that python "forgot" to raise
>> an exception, but my code was too long for make some tries
>> possible. But now I can reproduce the problem into another, little,
>> project:
>>
>> www.unip
William Meyer wrote:
> hi,
>
> I need to get the index of an object in a list. I know that no two objects
> in the list are the same, but objects might evaluate as equal. for example
>
> list = [obj1, obj2, obj3, obj4, obj5]
> for object in list:
> objectIndex = list.index(object)
> pr
Um, what about:
for oindex in xrange(len(list)):
object = list[oindex]
print oindex
You can't create a generic function for this.
Sebastjan
On 3/3/06, William Meyer <[EMAIL PROTECTED]> wrote:
> hi,
>
> I need to get the index of an object in a list. I know that no two objects
> in the
William Meyer wrote:
>I need to get the index of an object in a list. I know that no two objects
> in the list are the same, but objects might evaluate as equal. for example
>
> list = [obj1, obj2, obj3, obj4, obj5]
> for object in list:
>objectIndex = list.index(object)
>print objectI
Iain King gmail.com> writes:
> what's wrong with:
>
> i = 0
> for object in list:
> objectIndex = i
> print objectIndex
> i += 1
>
> Iain
>
The issues with that is you might have a complex structure below the for object
in list: with lots of continues or breaks and you don't want
Kent Johnson kentsjohnson.com> writes:
> In either case enumerate() is your friend. To find an
> item by identity:
>
> def index_by_id(lst, o):
>for i, item in enumerate(lst):
> if item is o:
>return i
>raise ValueError, "%s not in list" % o
>
> If you just want the index
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if the RPC you're talking about is Sun RPC, the whole concept is pretty
> dated (the original RFCs are from the late eighties).
Just because it's dated doesn't meant it isn't still something that
occasionally needs don
Iain King wrote:
> William Meyer wrote:
> > hi,
> >
> > I need to get the index of an object in a list. I know that no two
> > objects
> > in the list are the same, but objects might evaluate as equal. for example
> >
> > list = [obj1, obj2, obj3, obj4, obj5]
> > for object in list:
> > o
For a good general book on networking with python, try Foundations of
Python Network Programming by John Goerzen.
http://www.amazon.com/gp/product/1590593715/qid=1141390241/sr=1-9/ref=sr_1_9/104-7194399-1227965?s=books&v=glance&n=283155
--
http://mail.python.org/mailman/listinfo/python-list
Em Sex, 2006-03-03 às 12:48 +, William Meyer escreveu:
> Kent Johnson kentsjohnson.com> writes:
>
> > In either case enumerate() is your friend. To find an
> > item by identity:
> >
> > def index_by_id(lst, o):
> >for i, item in enumerate(lst):
> > if item is o:
> >return i
Iain King wrote:
> Iain King wrote:
> > William Meyer wrote:
> > > hi,
> > >
> > > I need to get the index of an object in a list. I know that no two
> > > objects
> > > in the list are the same, but objects might evaluate as equal. for example
> > >
> > > list = [obj1, obj2, obj3, obj4, obj5
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I've developed a program that uses a socket to receive information 24h a
~ day.
The problem is that the socket seems to freeze. By that I mean the
program stops getting information but doesn't raise any error.
I tried to solve this by writing t
William Meyer wrote:
> hi,
>
> I need to get the index of an object in a list. I know that no two objects
> in the list are the same, but objects might evaluate as equal. for example
>
> list = [obj1, obj2, obj3, obj4, obj5]
> for object in list:
> objectIndex = list.index(object)
> p
John Pote:
>I want to use python on a server to access incoming TCP port accesses. So I
>need to use the socket interface which is new to me.
You may also want to look at Twisted:
http://twistedmatrix.com/trac/
>Where can I get the various papers mentioned in the manual? And as I like
>books s
>
>
>See urllib.urlencode(). No idea why they don't include it in urllib2 as
>well, but there you go.
>
> >>> from urllib import urlencode
> >>> urlencode({'a':'& "Simple string"', 'b': '<>[EMAIL PROTECTED]&*()_+='})
>'a=%26+%22Simple+string%22&b=%3C%3E%21%40%23%24%25%5E%26%2A%28%29_%2B%3D'
> >>>
Iain King enlightened us with:
> i = 0
> for object in list:
> objectIndex = i
> print objectIndex
> i += 1
Why not:
for index, object in enumerate(list):
print index
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity
Gerard Flanagan wrote:
> bruno at modulix wrote:
> [...]
>
>>I don't know this HtmlElement class, nor where it comes from.
>>'to_string()' (or is it toString() ?) is javaish. The pythonic idiom for
>>this is implementing the __str__() method and calling str(obj) on the
>>obj (which will call obj._
Bo Peng a écrit :
> Dear list,
>
> I have not done a thorough test, but it occurs to me that
>
> 1. python code can be interrupted by Ctrl-C.
> 2. A C module, if I add a main() function and run independently, can be
> interrupted by Ctrl-C.
> 3. If I load the C module in python and run, the prog
Personally, I find many of the design patterns apply but require
modification.
For example, the Factory pattern is mostly to work around the fact that
it's difficult in Java and C++ to dynamically load classes. Not so in
Python, especially with exec. A simple configuration file and an exec
call ca
[copied to list]
Laszlo Zsolt Nagy wrote:
>>
>>
>> See urllib.urlencode(). No idea why they don't include it in urllib2
>> as well, but there you go.
>>
>> >>> from urllib import urlencode
>> >>> urlencode({'a':'& "Simple string"', 'b': '<>[EMAIL PROTECTED]&*()_+='})
>> 'a=%26+%22Simple+string%22
John Salerno wrote:
> John Coleman wrote:
> > John Coleman wrote:
> >> Greetings,
> >>I am currently trying to learn Python through the excellent
> >> "Learning Python" book.
>
> me too!
>
> > It isn't just #hash, but also things like #dict, #int, #len at the
> > start of a comment line which
Question 1 : How to set and get the content of my system clip-board?
2 : How to print the current line no in a python program? --
每一种结局都有可能感触动观众心底的某一颗眼泪。以死亡为结尾的故事和大团圆故事一样多,是因为人们最不能承受的反
倒是漫长而不可知的人生,让传奇湮灭,让真情淡去,让英雄苍老,让美人迟暮。他爱他,他死了,另一个人终身铭记。再没有了世俗压力,他与他的往昔相依相伴
在断臂山下,他与他的未来活在永恒的回忆里。
Laszlo Zsolt Nagy enlightened us with:
> The values of some inputs are encoded using html entities. How can
> I decode a string like "Bessy's cat" in "Bessy's cat"?
This should help:
http://docs.python.org/lib/module-htmlentitydefs.html
Sybren
--
The problem with the world is stupidity. Not sa
> Well I don't understand what's encoding the apostrophe as an encoded
> entity anyway. That's only supposed to be done for HTML content, not
> form content.
You are right. I was wrong. The problem was not with quote. It was
reading out the VALUE of an INPUT from HTML source.
> How about an
In article <[EMAIL PROTECTED]>,
"msoulier" <[EMAIL PROTECTED]> wrote:
> For example, the Factory pattern is mostly to work around the fact that
> it's difficult in Java and C++ to dynamically load classes.
You're over-specifying. Most of most design patterns is to work around the
fact that it'
Laszlo Zsolt Nagy wrote:
> The values of some inputs are encoded using html entities.
> How can I decode a string like "Bessy's cat" in "Bessy's cat"?
http://groups.google.com/group/comp.lang.python/browse_frm/thread/819731a536a4c1a2/fce6c2f6c3d46e9c?q=htmlentitydefs&rnum=2#fce6c2f6c3d46e9c
Kent
Hi,
Grzegorz Smith wrote:
> Hi all. I have got situation: i load data from database(MSSQL) wchich are
> encoded cp1250 and I fill template with that data (Cheetah Template), after
> all i want to save template to file on disk. I'm using
> newfile = open("template.html",w")
> newfile.write(str(temp
Luis P. Mendes:
>I've developed a program that uses a socket to receive information 24h a
>~ day.
>
>The problem is that the socket seems to freeze. By that I mean the
>program stops getting information but doesn't raise any error.
That's weird. There's probably a bug in your program.
>I tried t
John Coleman <[EMAIL PROTECTED]> skrev:
> John Salerno wrote:
>> John Coleman wrote:
>>> John Coleman wrote:
Greetings,
I am currently trying to learn Python through the excellent
"Learning Python" book.
>>
>> me too!
>>
>>> It isn't just #hash, but also things like #dict, #int,
Roy Smith wrote:
>
>> For example, the Factory pattern is mostly to work around the fact that
>> it's difficult in Java and C++ to dynamically load classes.
>
> You're over-specifying. Most of most design patterns is to work around the
> fact that it's difficult in Java and C++ to do many thing
On Linux you can try out Scribes. It has a function to convert tabs to
spaces. Personally, I use tabs in all my projects.
http://scribes.sf.net/snippets.htm
http://scribes.sf.net/
--
http://mail.python.org/mailman/listinfo/python-list
Laszlo Zsolt Nagy wrote:
> The values of some inputs are encoded using html entities.
> How can I decode a string like "Bessy's cat" in "Bessy's cat"?
this snippet might help:
http://effbot.org/zone/re-sub.htm#strip-html
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Matthias Huening <[EMAIL PROTECTED]> wrote:
> Glurt Wuntal (02.03.2006 15:56):
> > I am a newbie with Python. It's a great language, but I would like to be
> > able to present a simple gui menu for some of my scripts; something better
> > than using 'raw_input' pro
Luis P. Mendes wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I've developed a program that uses a socket to receive information 24h a
> ~ day.
>
> The problem is that the socket seems to freeze. By that I mean the
> program stops getting information but doesn't raise any
[EMAIL PROTECTED] wrote:
> # Print new list
> print recordList
>
>
[872L, 'ACTIVE', , >>>00EA1428>, None, '1.0.0.0', None, None, None]
Read the Python library manual chapter 2. Read all of it, it's all
very useful information, but take a particular look at str() and
repr(). All Python object
>[EMAIL PROTECTED] wrote:
> dananrg> Are you saying I'm getting the "L" as an artifact of printing?
>
> No, you're getting the "L" because you're printing a long integer. If you
> execute
>
> x = 872L
> y = 872
>
> at a Python prompt, x will be a long integer and y will be an integer. Lon
Title: Re: Write a GUI for a python script?
Glurt Wuntal (02.03.2006 15:56):
> I am a newbie with Python. It's a great language, but I would like to be
> able to present a simple gui menu for some of my scripts; something better
> than using 'raw_input' prompts.
>
Another option is to u
Fabian Steiner <[EMAIL PROTECTED]> wrote:
> I am currently working on an application where the user is able to
> create new worksheets and to delete existing ones. All of these
> worksheets have the same structure (--> template?), only some values
> should be changed. A minimal example would be
bruno at modulix wrote:
> Gerard Flanagan wrote:
> > The functions were kind of related
> > and meaningless outside the module they were declared -
>
> FWIW (and from the snippet I saw), these functions are useless even in
> the module !-)
>
ok, ok... :-)
> Unless you want to dynamically choose t
robert wrote:
> There is a strange freeze/crash only on dual core machines:
>
> I have a python app (Python 2.3.5 /Pythonwin build 203 / Windows)
> running with no stability problems on normal machines (Or a crash is so
> rare, that absolutely nobody obverses it, though the overall majority of
> u
[EMAIL PROTECTED] wrote:
> Incidentally, I have just ordered:
>
> * Learning Python
> * Python Cookbook
> * Python Pocket Reference
>
> Are there any other books y'all would recommend as essential Python
> references and/or books for becoming fluent in Python?
Both Beazley's "Python Essential Re
orangeDinosaur wrote:
> Hello,
>
> I am encountering a behavior I can think of reason for. Sometimes,
> when I use the .strip module for strings, it takes away more than what
> I've specified. For example:
>
a = 'Hughes. John\r\n'
>
a.strip('')
>
> returns:
>
> 'ughes. John
I am banging my head against the wall.
I have a Web application server that uses xml.sax. When I build it
using FreezePython I get the following error when trying to use it:
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/sax2exts.py", line
37, in make_parser
File "/usr/lib/python2.3/site-p
I have difficulties with a weird Python 2.4.2 behaviour in comparing Decimal to
Floats.
For Example :
>>> from decimal import Decimal
>>> a=Decimal('3.7')
>>> b=6.3
>>> if a > b :print a,b,'a is greater than b - NOT TRUE'
... else: print a,b,'b is greater than a - CORRECT'
...
3.7 6.3 a
Cassiano, Marco wrote:
> I have difficulties with a weird Python 2.4.2 behaviour in comparing Decimal
> to Floats.
>
> For Example :
>
>
>
from decimal import Decimal
a=Decimal('3.7')
b=6.3
>
>
if a > b :print a,b,'a is greater than b - NOT TRUE'
>
> ... else: print a,b,
computer1 wrote:
> I want to install scipy 0.4.6 (windows)on my computer ,but i cannot
> download it from www.scipy.org. who can tell me another place to
> download it?
http://www.scipy.org/Download
links to the Sourceforge download site. I assume that you are trying to download
the files by simp
Mc Osten wrote:
> On Thu, 02 Mar 2006 18:58:50 GMT, John Salerno wrote:
>
>> I use UltraEdit right now, and it is possible to convert spaces and tabs
>> back and forth, but it's just an extra step.
>
> I wouldn't definitely suggest UltraEdit to code Python.
Why do you say that?
--
http://mail.
"Cassiano, Marco" wrote:
> I have difficulties with a weird Python 2.4.2 behaviour in comparing
> Decimal to Floats.
>
> For Example :
>
>
> >>> from decimal import Decimal
> >>> a=Decimal('3.7')
> >>> b=6.3
>
> >>> if a > b :print a,b,'a is greater than b - NOT TRUE'
> ... else: print a,b,'b
1 - 100 of 205 matches
Mail list logo