On 2005-05-14, M.E.Farmer wrote:
> I explained what i meant in previous post there was nothing more than
> just a discussion
No. You claimed
This will only create a tuple in memory
But we just learned that this is not the case.
> I have no real problem here just more of a sore point in style
Johnny Gentile wrote:
> aa.
I just added a second monitor and have over two feet of monitor as 1280 x
1024.
Outlook expands this message and it still runs off the right side of the
second monitor.
--
http://mail.python.org/mailman/listinfo/python-list
Lese selbst:
http://brandenburg.rz.fhtw-berlin.de/poetschke.html
--
http://mail.python.org/mailman/listinfo/python-list
Since the DNS servers hosting prothon.org have stopped responding, the
sole source of the source of prothon online that I can find has become
inaccessable. I was wondering if anyone subscribed has a copy of the
source for the last C version of prothon, and would be kind enough to
post a copy o
Thank you for the pointer. I'll upgrade to 2.4.
Best,
Mack
--
http://mail.python.org/mailman/listinfo/python-list
Bernd Nawothnig wrote:
> > You're thinking you're passing the arguments as reference
>
> That is the way Fortran handles them:
which is one of the things you really love when you link against
underdocumented Fortran programs from C. ("is that parameter
a scalar or an array? crash! oh, an array.
tlviewer wrote:
> Next I'm going to load all 53 card resources into a list (array) of
> strings, then write it out, pickled. That should smooth out loading the
>game when I use 4-6 decks (Blackjack-21).
# -*- coding: cp1252 -*-
"""
keywords: resource bitmap pickle
description: pickle reso
M.E.Farmer wrote:
> I said exactly what I meant, the parentheses around the values creates
> a tuple that you have no reference to!
repeating it doesn't make you right; no extra tuple is created, and the
parens are part of the syntax:
If the target is a target list enclosed in parentheses or
[EMAIL PROTECTED] wrote:
> I wonder if it is possible to change (temporarily) a built-in function
> for logging purposes.
> Let me explain:
> I want to log all the 'open' operations, recording the file to be
> opened, the "mode" (r/w/a...) and (possibly) the module which made the
> call.
import s
"none <"@bag.python.org> wrote:
> > no, it would mean writing some python code. if all you need is a scrolling
> > text list, you can simply use the code on this page:
> >
> > http://effbot.org/zone/wck-4.htm
> >
> > (see "A scrollable list view, with scrollbar support" and, optionally,
> > t
bill wrote:
> Consider:
> >>> import shlex
> >>> shlex.split('$(which sh)')
> ['$(which', 'sh)']
>
> Is this behavior correct? It seems that I should
> either get one token, or the list
> ['$','(','which','sh',')'],
> but certainly breaking it the way it does is
> erroneous.
>
> Can anyone explain
Ron Adam wrote:
>
> Do exceptions that take place get stored in a stack or list someplace?
[snip]
> I know I can catch the error and store it myself with,
>
> except Exception, exc:
>
> or possibly,
>
> errlist = []
> errlist.append(sys.exc_info())
>
> But what I want to know is do
Enough salvation for one day.
--
http://mail.python.org/mailman/listinfo/python-list
Lese selbst:
http://www.rp-online.de/public/article/nachrichten/wirtschaft/finanzen/deutschland/85815
--
http://mail.python.org/mailman/listinfo/python-list
Lese selbst:
http://www.npd.de/npd_info/deutschland/2005/d0405-39.html
--
http://mail.python.org/mailman/listinfo/python-list
I'm so glad you've decided what everyone believes
"don freeman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> > http://www.gotquestions.org/sinners-prayer.html << I saw this site on a
> > search directory. Great Resource!
> >
>
>
> C'mon, this is the 21st century. Nobody be
Robert Kern wrote:
> MackS wrote:
>
>> Dear all,
>>
>> I've got several large sets in my program. After performing several
>> operations on these I wish to present one set to the user [as a list]
>> sorted according to a certain criterion. Is there any direct way to do
>> so? Or must I
>>
>> list
"MackS" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can I somehow avoid doing this in two stages? Can I somehow avoid first
> creating a long list only to immediately sort it afterwards?
Yes, you could interatively extract and append the min of the set
(selection sort), but th
I'm trying to understand exception handling better and have a question I
haven't been able to find an answer too. Which probably means It won't
work, but...
Do exceptions that take place get stored in a stack or list someplace?
For example in:
try:
try:
try:
riskyf
Thank you for your feedback.
Due to high levels of spam and virus activity on this mailing list the
message you sent (attached below) requires confirmation before it can be
delivered. To confirm that you sent the message below, simply reply to this
message, leaving the Subject line unchanged (yo
MackS wrote:
> Dear all,
>
> I've got several large sets in my program. After performing several
> operations on these I wish to present one set to the user [as a list]
> sorted according to a certain criterion. Is there any direct way to do
> so? Or must I
>
> list = []
>
> for item in set1:
>
[EMAIL PROTECTED] wrote:
> Hi Greg,
> thank for your replay, but I didn't succeed in any way. You must
> consider however that I'm not a Python "expert"...
> IMHO, it must be a script that change part of the interpreter, and
> substitute a new module (py) in the place of the standard one (py or
> p
Lese selbst:
http://brandenburg.rz.fhtw-berlin.de/poetschke.html
--
http://mail.python.org/mailman/listinfo/python-list
Dear all,
I've got several large sets in my program. After performing several
operations on these I wish to present one set to the user [as a list]
sorted according to a certain criterion. Is there any direct way to do
so? Or must I
list = []
for item in set1:
list.append(item)
list.sort(...
"M.E.Farmer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> But if the parens are just fluff then get rid of them, it is clearer *
> at least to me * ;)
While I find unnecessary parens on the right of '=' tolerable, I agree as
to the style preference.
Terry J. Reedy
--
http:
Volker Grabsch wrote:
> Peter Hansen wrote:
>
>>Or just use the .timetuple() method on datetime objects and sort on the
>>8th element of the 9-element tuple, which is the day-of-the-year.
>
> An interesting idea. But wouldn't sorting by (dd.month,dd.day) be more
> effective?
Depending on the me
aa.
--
http://mail.python.org/mailman/listinfo/python-list
Ok I give up you have convinced me. Of what I am not sure ;)
Anyway I have always viewed :
a,b,c= (1,2,3)
as unpacking a tuple
and :
(a,b,c) = (1,2,3)
as creation of a tuple
It was a false assumption, I have used Python for years and have never
written an unpacking as:
(a,b,c) = (1,2,3)
I have alwa
> http://www.gotquestions.org/sinners-prayer.html << I saw this site on a
> search directory. Great Resource!
>
C'mon, this is the 21st century. Nobody believes that silly story about
God having a son anymore.
Think about it. The original story is always the best. The sequel is
always a com
vincent wehren wrote:
>
>| > If you don't care about the year, why not just "normalize" the year
>| > to all be the same using the replace method of the date instance?
>|
>| That's a very bad idea. In my example, this would work, but in "reality"
>| I don't sort datetime objects, of course! (Is th
I explained what i meant in previous post there was nothing more than
just a discussion I have no real problem here just more of a sore point
in style for me. I feel that parens are quite overloaded and it can be
confusing to newbies.
But if the parens are just fluff then get rid of them, it is cle
M.E.Farmer wrote:
>>They're both an UNPACK_SEQUENCE byte-code.
>
> I have dissed it myself ;)
> My argument, if you can call it that, is that it is not clear that
> Python is going to do a tuple unpacking here or not !
Hmm... Well, I wouldn't say that. I think it's quite clear that
Python's do
Hi Greg,
thank for your replay, but I didn't succeed in any way. You must
consider however that I'm not a Python "expert"...
IMHO, it must be a script that change part of the interpreter, and
substitute a new module (py) in the place of the standard one (py or
pyc). The standard module must be save
>It actually is the same, and I don't think implicit or explicit is the
>difference you should be citing here.
Why not it is relevant and true that Python is doing an implicit
unpacking of the values in that unnamed tuple.
Quoting myself """It might be the "same" as
no parens but it isn't very clea
On 14 May 2005 13:25:55 -0700, "M.E.Farmer" <[EMAIL PROTECTED]> wrote:
>I said exactly what I meant, the parentheses around the values creates
>a tuple that you have no reference to! It also has a side effect of
I don't understand what you are saying, or meaning ;-)
BTW, the function call has noth
On 14 May 2005 10:44:30 -0700, "M.E.Farmer" <[EMAIL PROTECTED]> wrote:
[...]
>Be sure to study up on namespaces, it will ease your Python woes.
>Namespaces are the most fundamental part of Python that new users don't
>understand. Namespace mastery will take you far.
>Just remember there are only tw
Steven Bethard wrote:
>
> I don't know the implementation enough to know whether or not a tuple is
> actually created when "b" and "c" are bound to their values, but I'd be
> willing to bet that whatever happens to "(b, c)" is exactly the same as
> what happens to "b, c".
Some corroborating ev
M.E.Farmer wrote:
> I said exactly what I meant, the parentheses around the values creates
> a tuple that you have no reference to! It also has a side effect of
> binding the names inside the tuple to a value and placing them in the
> local namespace( implicit tuple unpacking ). It might be the "sa
Martin Franklin <[EMAIL PROTECTED]> writes:
> I suspect you need to look at the columnconfigure / rowconfigure methods
> of the container (toplevel or frame)
Thanks, columnconfigure turned out to be the answer and Peter Otten's
post showing how to use it was very informative. For some reason
colu
Consider:
>>> import shlex
>>> shlex.split('$(which sh)')
['$(which', 'sh)']
Is this behavior correct? It seems that I should
either get one token, or the list
['$','(','which','sh',')'],
but certainly breaking it the way it does is
erroneous.
Can anyone explain why the string is being split
t
[EMAIL PROTECTED] wrote:
> Hi all,
> I wonder if it is possible to change (temporarily) a built-in function
> for logging purposes.
> Let me explain:
> I want to log all the 'open' operations, recording the file to be
> opened, the "mode" (r/w/a...) and (possibly) the module which made the
> call.
I said exactly what I meant, the parantheses around the values creates
a tuple that you have no reference to! It also has a side effect of
binding the names inside the tuple to a value and placing them in the
local namespace. It might be the "same" but it isn't very clear. If you
want a tuple make
I said exactly what I meant, the parentheses around the values creates
a tuple that you have no reference to! It also has a side effect of
binding the names inside the tuple to a value and placing them in the
local namespace( implicit tuple unpacking ). It might be the "same" as
no parens but it is
On Sat, 14 May 2005 20:38:26 +0200, Bernd Nawothnig <[EMAIL PROTECTED]> wrote:
>
>> On 2005-05-14, M.E.Farmer wrote:
>
>> (x,y,dotp,sumx,maxv) = abc(x,y,dotp,sumx,maxv)
>> This will only create a tuple in memory that has no name to reference
>> it by!
>
>Maybe. But it does not seem to hurt. And I
"Volker Grabsch" <[EMAIL PROTECTED]> schrieb im
Newsbeitrag news:[EMAIL PROTECTED]
| vincent wehren wrote:
| >
| > If you don't care about the year, why not just "normalize" the year
| > to all be the same using the replace method of the date instance?
|
| That's a very bad idea. In my example, t
That's a good point about the amount of text available at once. As
long as I could swap the visible section fast enough that might be a
good solution.
This will run mostly on Windows, but I'd like for it to be equally
usable on Linux.
--
http://mail.python.org/mailman/listinfo/python-lis
>
> no, it would mean writing some python code. if all you need is a scrolling
> text list, you can simply use the code on this page:
>
> http://effbot.org/zone/wck-4.htm
>
> (see "A scrollable list view, with scrollbar support" and, optionally,
> the virtual data modifications under "Displ
David wrote:
> Thank you very much. Tulpes are really neat now that I've looked at
> them. So after just fixing it, I changed it up and I would like to
> show it off now.
>
> #! /usr/bin/python
> #This program takes two vectors and multiplies them
> #against a 10X10 array. It also then gives th
Peter Moscatt wrote:
> I am wanting to return the system date using the following:
>
> date.today()
>
> How would I then convert this to a string ?
Use the strftime method. The formatting directives are documented here:
http://docs.python.org/lib/module-time.html
Example: date.today().str
Hi all,
I wonder if it is possible to change (temporarily) a built-in function
for logging purposes.
Let me explain:
I want to log all the 'open' operations, recording the file to be
opened, the "mode" (r/w/a...) and (possibly) the module which made the
call.
After that the 'open' can carry on foll
Abuse reports to
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL
PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
>
> Or just use the .timetuple() method on datetime objects and sort on the
> 8th element of the 9-element tuple, which is the day-of-the-year.
An interesting idea. But wouldn't sorting by (dd.month,dd.day) be more
effective?
In other words: Does .timetuple() create a tuple,
http://www.gotquestions.org/sinners-prayer.html << I saw this site on a
search directory. Great Resource!
--
http://mail.python.org/mailman/listinfo/python-list
vincent wehren wrote:
>
> If you don't care about the year, why not just "normalize" the year
> to all be the same using the replace method of the date instance?
That's a very bad idea. In my example, this would work, but in "reality"
I don't sort datetime objects, of course! (Is there any real a
Yes, I gathered.
We all get our habits from somewhere :-)
Regards,
Philippe
Bernd Nawothnig wrote:
> On 2005-05-14, Philippe C. Martin wrote:
>
>> You're thinking you're passing the arguments as reference
>
> That is the way Fortran handles them:
>
> [...]
>
>>> Right now I'm taking a simp
Paul> It seems to me that the socket module itself should be rewritten
Paul> to use new style classes, so that socket.socket objects can extend
Paul> _socket.socket instead of wrapping them.
Paul> Am I missing something?
Probably not. The socket module could use some attention.
Steven Bethard wrote:
> Robert Kern wrote:
> def mykey(d):
> return (d.month, d.day)
>
> The point here is that rather than chaining cmp() calls with ors, you
> should just use a tuple -- the standard comparison order in tuples is
> exactly what you're looking for.
That's an excel
> On 2005-05-14, M.E.Farmer wrote:
> (x,y,dotp,sumx,maxv) = abc(x,y,dotp,sumx,maxv)
> This will only create a tuple in memory that has no name to reference
> it by!
Maybe. But it does not seem to hurt. And I am not sure the tupel _is_
really created in that situation.
> How would you access the
Hmm don't know what happened. I guess the formatting got all chewed up.
--
http://mail.python.org/mailman/listinfo/python-list
Thank you very much. Tulpes are really neat now that I've looked at
them. So after just fixing it, I changed it up and I would like to
show it off now.
#! /usr/bin/python
#This program takes two vectors and multiplies them
#against a 10X10 array. It also then gives the dot product,
#sum, and ma
M.E.Farmer wrote:
> (x,y,dotp,sumx,maxv) = abc(x,y,dotp,sumx,maxv)
> This will only create a tuple in memory that has no name to reference
> it by!
Huh? This binds the names "x", "y", "dotp", "sumx" and "maxv" to the
values returned by abc:
py> def abc(*args):
... return args
...
py> (x,y,d
(x,y,dotp,sumx,maxv) = abc(x,y,dotp,sumx,maxv)
This will only create a tuple in memory that has no name to reference
it by!
How would you access the returned value?
If you want a tuple you need to assign all the return vales to a single
name.
mytup = abc(x,y,dotp,sumx,maxv)
M.E.Farmer
--
http://m
David wrote:
> Hi I'm trying to teach myself python and so far to good, but I'm
having
> a bit of trouble getting a function to work the way I think it should
> work. Right now I'm taking a simple program I wrote in Fortran and
> trying to do it in Python. I got it to work, but now I'm trying to
"Greg Krohn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> tlviewer wrote:
> > hello,
>
> hi
>
> > fp = open( "e:/batch/python/aceclub.bmp", "wt")
>
> wt? Should this be wb?
>
> > # gives: ValueError: String length does not equal format and resolution
size
> > img = gm.image.fromst
On 2005-05-14, Philippe C. Martin wrote:
> You're thinking you're passing the arguments as reference
That is the way Fortran handles them:
[...]
>> Right now I'm taking a simple program I wrote in Fortran
Bernd
--
Those who desire to give up freedom in order to gain security,
will not hav
bruno modulix a écrit :
>
> I fail to see why would it would be better to have to open a browser, go
> to python.org, go to the doc, find the right link etc instead of just
> typing dir(xxx) and/or help(xxx).
>
I fully agree with you. I just suspect that you are not more than me a
web develo
Hi,
You're thinking you're passing the arguments as reference (look at mutable
vs non-mutable)
Your function returns the values in a tupple (x,y,...); you need to fetch
the values from that tupple
Regards,
Philippe
David wrote:
> Hi I'm trying to teach myself python and so far to good, bu
On 2005-05-14, David wrote:
> abc(x,y,dotp,sumx,maxv)
(x,y,dotp,sumx,maxv) = abc(x,y,dotp,sumx,maxv)
Bernd
--
Those who desire to give up freedom in order to gain security,
will not have, nor do they deserve, either one. [T. Jefferson]
--
http://mail.python.org/mailman/listinfo/python-list
Hi I'm trying to teach myself python and so far to good, but I'm having
a bit of trouble getting a function to work the way I think it should
work. Right now I'm taking a simple program I wrote in Fortran and
trying to do it in Python. I got it to work, but now I'm trying to
modularize it. My fo
Python's InteractiveInterpreter uses the built-in compile function.
According to the ref. manual, it doesn't seem to concern about the
encoding of the source string.
When I hand in an unicode object, it is encoded in utf-8 automatically.
It can be a problem when I'm building an interactive enviro
Does anyone have suggestions on how to improve this further?
Cheers,
Ron_Adam
def getobjs(object, dlist=[], lvl=0, maxlevel=1):
""" Retrieve a list of sub objects from an object. """
if object not in dlist:
dlist.append(object)
if lvl200:
s = object[0:
StepH wrote:
>>
>> A little googling found the following which may give you a clue or
>> ideas of further searches. Also run a virus scanner on the file
>> before hand.
>>
>> http://www.noteworthysoftware.com/composer/faq/90.htm
>
>
> Argg... I always find me stupid when i don't have find my
Robert Kern wrote:
> I find that using the "key" argument to sort is much nicer than "cmp"
> for these tasks.
>
> In [5]:L = [datetime.date(2005,5,2), datetime.date(1984,12,15),
> datetime.date(1954,1,1)]
>
> In [7]:L.sort(key=lambda x: (x.month, x.day))
>
> In [8]:L
> Out[8]:
> [datetime.date
Hi,
I am a very happy user of http://www.amk.ca/python/code/crypto.html
Regards,
Philippe
Blake T. Garretson wrote:
> I want to save some sensitive data (passwords, PIN numbers, etc.) to
> disk in a secure manner in one of my programs. What is the
> easiest/best way to accomplish strong fil
Torsten Bronger wrote:
> I write a module, and so I must raise exceptions at several points.
> The PEP 8 says that a module should define their own exceptions base
> class, derived from "Exception", and derivatives of that.
>
> However, the build-in exceptions cover most of the error types that
>
vincent wehren wrote:
> "Volker Grabsch" <[EMAIL PROTECTED]> schrieb im
> Newsbeitrag news:[EMAIL PROTECTED]
> | However, I don't want to sort them the default way. These are birthdays,
> | so only the month and day do matter, not the year. E.g.:
> |
...
> If you don't care about the year, why not
Torsten Bronger wrote:
> Is it considered good style to raise build-in exceptions whereever
> one thinks it's appropriate?
yes.
> Is the definition of module exceptions derived from "IOError", "TypeError"
> etc. a good idea?
sure (when absolutely necessary).
> Is there some sort of style guide
Xah Lee wrote:
> I think it would be a improvement for the built-in range() so that step
> needs not be an integer. [...]
>
> Range( 5, 7, 0.3); # returns [5, 5.3, 5.6, 5.9, 6.2, 6.5, 6.8]
This may not return what you expect it to return.
For example let's use a naive implementation like this:
Ok, thanks. I didn't know about new-style classes (I had learned python
from a book prior to them).
After reading about new-style classes, I find that your solution is
better because, using super (in general) avoids cl2 from having to know
the implementation details of cl1. This is clearly explai
On 14 May 2005 02:23:55 -0700, "Dan Bishop" <[EMAIL PROTECTED]> wrote:
>Svennglenn wrote:
>> I'm having problems replacing text in a
>> unicode string.
>> Here's the code:
>>
>> # -*- coding: cp1252 -*-
>>
>> titel = unicode("ä", "iso-8859-1")
To the OP:
This is not causing the later problem, but
HallÃchen!
I write a module, and so I must raise exceptions at several points.
The PEP 8 says that a module should define their own exceptions base
class, derived from "Exception", and derivatives of that.
However, the build-in exceptions cover most of the error types that
occur in a standard pro
found the answer five minutes after posting the question. Isn't that
always the way?
I had not granted the Apache user permission to launch IE. To do so:
* launch DCOMCNFG.exe
* choose "internet explorer" and click "properties"
* choose the "security" tab and and "custom launch permissions"
* "
Sorry in advance if this is not the correct forum ...
I'm trying to upload what appears to be a perfectly OK zip file as a
"source" file type to PyPI, and am getting this response:
Error...
There's been a problem with your request
exceptions.ValueError: invalid distribution file
I have managed
I'm trying to have a Python script (which is being launched by Apache
as a CGI) control Internet Explorer. I have this working on my
development box, but when I moved the code to my integration test box,
I get "Access Denied" when trying to launch IE. This only seems to
happen when running Apache
Volker Grabsch wrote:
> Hello!
>
> Ich just found a very nice 'pythonic' solution for an often appearing
> problem. I didn't find it documented anywhere, so I'm posting it here.
> If this isn't new in any way, I'd really like to get to know it.
>
> Example problem:
> I have some "datetime" object
Xah Lee wrote:
> on a related topic,
> I think it would be a improvement for the built-in range() so that step
> needs not be an integer.
There are easy workarounds but I'd find it useful as well.
> Further, it'd be better to support decreasing range. e.g.
>
> Range( 5, 7, 0.3); # returns [5, 5.
As Jp asked already: "indepenedent" from what?
I do such things all the time in a wx-App that controls a 6-axes robot. For
example, there I have a LED-Widget for displaying the actual pos. and
orient. of the tool. In a wxTimer handler I read OPC variables, whose values
are displayed in the LED-Wid
CONTEXT:
Trying to modularize (is this english?) application development : MVC
style, team distributed so that a visual component can be in one module
imported and used by the __main__, and connected (read packed) at
runtime to other components coming from the main or other modules.
PROBLEM:
Afte
"Volker Grabsch" <[EMAIL PROTECTED]> schrieb im
Newsbeitrag news:[EMAIL PROTECTED]
| Hello!
|
| Ich just found a very nice 'pythonic' solution for an often appearing
| problem. I didn't find it documented anywhere, so I'm posting it here.
| If this isn't new in any way, I'd really like to get to
When using Idle, Call Tips are floating windows which display function,
class, and method parameter and docstring information when you type an
opening parenthesis, and which disappear when you type a closing
parenthesis.
But when you use new-style classes, they don't work fine and don't show
the a
"km" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> does python currently support 80 bit precision Floating Point Unit ?
>
> regards,
> KM
I've just been using the decimal module for Python 2.3 (native in Python
2.4) at 100 digit precision to solve some very high order
Peter Moscatt <[EMAIL PROTECTED]> wrote:
> I am wanting to return the system date using the following:
>
> date.today()
>
> How would I then convert this to a string ?
>
> Pete
datetime.data objects have a __str__() method. To convert one to a string,
you just have to cause its __str__
Ron Adam a écrit :
> StepH wrote:
>
>> Ron Adam a écrit :
>>
>>> StepH wrote:
>>>
>>>
Ron Adam a écrit :
> StepH wrote:
>
>
>
>> Hi,
>>
>> I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1)
>> distibution...
>>
>> I'v try to dow
Here's my situation:
I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.
I want to run python scripts from this computer. At home I have a
multi-computer network (f
if you're using date.today():
x=date.today()
--
http://mail.python.org/mailman/listinfo/python-list
I am wanting to return the system date using the following:
date.today()
How would I then convert this to a string ?
Pete
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to all for the reply. (i should've known better)
on a related topic,
I think it would be a improvement for the built-in range() so that step
needs not be an integer.
Further, it'd be better to support decreasing range. e.g.
Range( 5, 7, 0.3); # returns [5, 5.3, 5.6, 5.9, 6.2, 6.5, 6.8]
Ran
Hello!
Ich just found a very nice 'pythonic' solution for an often appearing
problem. I didn't find it documented anywhere, so I'm posting it here.
If this isn't new in any way, I'd really like to get to know it.
Example problem:
I have some "datetime" objects and want to sort them, as here:
Terry Reedy a écrit :
> [...]
> Last I read, in CPython, the float type encapsulates a C double.
> So, does any C compiler implements doubles as 80 bit floats?
I seriously doubt it.
> Or, if it has 64 bit
> doubles and 80 bit long doubles, are the latter transparently
> substitutible for the form
Svennglenn wrote:
> I'm having problems replacing text in a
> unicode string.
> Here's the code:
>
> # -*- coding: cp1252 -*-
>
> titel = unicode("ä", "iso-8859-1")
> print titel
> print type(titel)
>
> titel.replace("ä", "a")
>
> When i run this program I get this error:
>
> titel.replace("ä",
1 - 100 of 106 matches
Mail list logo