you should have that file i/o in some try: except: pairs for starters.
and you should close data_file when you are done. isn't it just
data_file.read() ?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks MyHaz,
Now its oke :) thanks for that example
--
http://mail.python.org/mailman/listinfo/python-list
Undoubtably Wax :-)
Easier to learn than TKinter, with none of the limitations (it's built
on top of wxPython).
See http://zephyfalcon.org
I've just started using it and I'm really impressed.
Best Regards,
Fuzzy
http://www.voidspace.org.uk/python
--
http://mail.python.org/mailman/listinfo/pyth
Florian Lindner <[EMAIL PROTECTED]> writes:
> I have a script which is readable and executable by a user, but not
> writable.
> The users executes the scripts, it reads in a value and based on this value
> it computes a result and stores it in a variable.
> Can the user read out the value of this v
Max M wrote:
> Sean Dodsworth wrote:
>> Can anyone tell me how to get a message's number from the message-id
>> using IMAP4.search?
>> I've tried this:
>> resp, items = server.search(None, 'HEADER', '"Message-id"', msgID)
>> but it gives me a 'bogus search criteria' error
>
>
> Why do you ne
"Doug Helm" <[EMAIL PROTECTED]> wrote:
>Hey, Folks:
>
>I'm trying to write a very simple file upload CGI. I'm on a Windows server.
>I *am* using the -u switch to start Python for CGIs, as follows:
>
>c:\python\python.exe -u %s %s
>
>I *do* have write permissions on the directory I'm trying to wri
I posted a question about string concatination just last week. There is
plenty of discussion on it, if you just search the group.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel <[EMAIL PROTECTED]> wrote:
Instead of indexing self.lab by strings, you can index them by the
attributes themselves : self.lab[self.i], and change line 23 into
for var in (self.s, self,i)
I really think this is asking for trouble: I suppose t
Kash <[EMAIL PROTECTED]> wrote:
>Hi Everyone,
>
>I am new to python. I have just installed it. I am went to the python
>website and used it to download python and a beginners tutorial. I set
>the environment variables as explained in the faq.
>However when I start idle and run a program from it;
On 29 Mar 2005 23:41:15 -0800, [EMAIL PROTECTED] (OPQ) wrote:
[...]
>> > for k in hash.keys()[:]: # Note : Their may be a lot of keys here
>> >if len(hash[k])<2:
>> > del hash[k]
>>
>> - Try if it isn't faster to iterate using items instead of iterating
>> over keys
>
>items are huge l
On Wed, 30 Mar 2005 07:02:57 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote:
Steve wrote:
[an anecdote on distinguishing l1 and 11]
What are some of other people's favourite tips for
avoiding bugs in the first place, as opposed to finding
them once you know they are there?
There's a good book on this
> > [Julian Hernandez Gomez]
> >> is there a "easy way" to make eval() convert all floating
> >> numbers to Decimal objects and return a Decimal?
[Raymond Hettinger]
> > from decimal import Decimal
> > import re
> >
> > number =
> > re.compile(r"((\b|(?=\W))(\d+(\.\d*)?|\.\d+)([eE][+-]?\d{1,3})?)"
Ron_Adam wrote:
> I've been playing around with a way to explore name spaces, but once
> you drop into class's, and functions, the references can lead you into
> an endless loops.
>
Here is a rough attempt at printing the names of a variable. It will pick
up several names where appropriate, but
[Steven]
> If you have access to a syntax-aware editor, it will
> help avoid such problems
Seconded. Here's my favourite real-world example of where the lack of
syntax colouring cost several man-days of work (though this couldn't
happen with modern C compilers):
extern void get_s(short* s);
v
Op 2005-03-30, Paul Rubin schreef :
>> > I think the best bet for the short term is handling it at the C level,
>> > with sigalarm. Another way is to have chained sigalarm handlers in
>> > the main thread.
>>
>> Possible, but I don't have the time to investigate that possibility now.
>
> Actuall
ehh.. I did a little more reading and found that this function can be
easily done by the new distutils parameter "package_data" in 2.4.
However, I am using python2.3 :(
So, my question becomes: how to emulate the package_data function in
python 2.3?
--
http://mail.python.org/mailman/listinfo/p
Hi!
> Can someone please tell me how to compile pyogg/pyvorbis for Python 2.3 with
> MinGW.
Build lobogg, build pyogg, build libvorbis (linked against your libogg),
build pyvorbis. I haven't been able to produce any working binaries..
greets,
Marek
--
http://mail.python.org/mailman/listinfo/pyt
Tian wrote:
> I have tried using "sysctx=None" instead of "global sysctx", but it
> doesn't work either.
> It seems my initialization work in the previous calling of init() has
> no persistent effect when "utils" is imported using "from
> myproj.utils import getContext".
>
> What's weird, when a mo
Antoon Pardon <[EMAIL PROTECTED]> writes:
> I'm not sure that this would be an acceptable approach. I did the man
> semop and it indicates this is part of system V IPC. This makes me
> fear that semaphores will use file descriptors or other resources
> that are only available in a limited amount. N
Ville Vainio wrote:
The issue that really bothers me here is bloating the builtin
space. We already have an uncomfortable amount of builtin
functions. Of course the additions that have been suggested would not
pollute the builtin namespace, but they would still be there, taking
space. I'd rather se
Ron Garret wrote:
Note that you don't need the class redirection:
py> ref('')
Traceback (most recent call last):
File "", line 1, in ?
TypeError: cannot create weak reference to 'str' object
But I don't know why strings aren't valid arguments to ref...
None of the native types (int, float, list,
Do Re Mi chel La Si Do wrote:
Hi !
Good idea. I take this interpreter with jubilation.
Can I add your URL at http://mclaveau.com/esolang ?
Certainly, be my guest.
Other question : do you know PATH ? (http://pathlang.sourceforge.net)
Yes, a wonderfully expressive language!
Will McGugan
--
http:/
Qiangning Hong wrote:
> ehh.. I did a little more reading and found that this function can
> be easily done by the new distutils parameter "package_data" in 2.4.
>
> However, I am using python2.3 :(
>
> So, my question becomes: how to emulate the package_data function in
> python 2.3?
There is di
Pierre Quentel wrote:
Instead of indexing self.lab by strings, you can index them by the
attributes themselves : self.lab[self.i], and change line 23 into
for var in (self.s, self,i)
For your example, I wouldn't have used the "text" option in the
definition of the labels, then "textvariable
On behalf of the Python development team and the Python community, I'm
happy to announce the release of Python 2.4.1 (final).
Python 2.4.1 is a bug-fix release. See the release notes at the website
(also available as Misc/NEWS in the source distribution) for details of
the bugs squished in this re
Eric Brunel wrote:
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel
<[EMAIL PROTECTED]> wrote:
[...]
mr brunel,
i thank you for prompt reply. i will take my time to read it carefully.
meanwhile, i inform you and the ng that someone else gave me a quick and
dirty answer to my problem, namely sub
OPQ wrote:
- Try if it isn't faster to iterate using items instead of iterating
over keys
items are huge lists of numbers. keys are simple small strings. And
even if it is faster, how can I find the key back, in order to delete
it ?
for v in hashh.items():
if len(v)<2:
del ???
Hi all ml.
I'm tryng to use TwistedSnmp to make query and walk directly inside my
python code.
The problem i'm facing is that any time there is an hexadecimal value to
be returned by the snmpwalk it is returened in a weird and useless
way... does anyone had any (successfull) experience with twist
> "Steven" == Steven Bethard <[EMAIL PROTECTED]> writes:
Steven> Certainly a valid point. How would you feel about adding
Steven> just a select few itertools functions, perhaps just
Steven> islice, chain and tee?
A minimal set would not be that offensive, yes. But then we would h
Hello,
I installed PyQt-win-nc-msvc-3.13.exe
then complained: no, qt-mt230nc.dll, i found this
and copied into system32 directory.
I installed then:
PyQwt_Qt333-4.2.win32-py2.4.exe
Traceback (most recent call last):
File "Grab.pyw", line 65, in ?
from qt import *
ImportError: Module use o
OK i find this a quark in string.find that i think needs some
consideration.
Normally if a substring is not in the searched_string then string.find
returns -1 (why not len(searched_string) + 1, i don't know but
nevermind that) but what if a searched_string == '' ? Then
string.find(substring,search
"MyHaz" wrote:
searched_string=""
print string.find(substring,searched_string)
> 0
>
> why would this be? And when is someone going to fix it :P
>>> substring[0:0+len(searched_string)] == searched_string
True
--
http://mail.python.org/mailman/listinfo/python-list
MyHaz wrote:
> OK i find this a quark in string.find that i think needs some
> consideration.
You shouldn't use the module string anymore, instead use string-methods.
> Normally if a substring is not in the searched_string then string.find
> returns -1 (why not len(searched_string) + 1, i don't
Fuzzyman wrote:
Undoubtably Wax :-)
Easier to learn than TKinter, with none of the limitations (it's built
on top of wxPython).
See http://zephyfalcon.org
http://zephyrfalcon.org/labs/wax.html works better.
Kent
--
http://mail.python.org/mailman/listinfo/python-list
MyHaz wrote:
import string
searched_string="abcdefg"
substring="123"
print string.find(substring,searched_string)
-1
searched_string=""
print string.find(substring,searched_string)
0
why would this be? And when is someone going to fix it :P
I don't know. When are you going to fix it?
--
hilsen/reg
MyHaz wrote:
why would this be? And when is someone going to fix it :P
Whoops ... This missed the previous message together with the wink ...
;-)
"When *are* you going to fix it ..."
substring="123"
import string
searched_string="abcdefg"
print string.find(searched_string, substring) # note the or
> Hello,
>
> I installed PyQt-win-nc-msvc-3.13.exe
>
> then complained: no, qt-mt230nc.dll, i found this
> and copied into system32 directory.
>
> I installed then:
> PyQwt_Qt333-4.2.win32-py2.4.exe
>
> Traceback (most recent call last):
> File "Grab.pyw", line 65, in ?
> from qt import *
> I
thanks all that clears things up nicely
- Haz
--
http://mail.python.org/mailman/listinfo/python-list
True enough :-)
Thanks
Fuzzy
http://www.voidspace.org.uk/python
--
http://mail.python.org/mailman/listinfo/python-list
OPQ wrote:
for (2):
for k in hash.keys()[:]: # Note : Their may be a lot of keys here
if len(hash[k])<2:
del hash[k]
- use the dict.iter* methods to prevent building a list in memory. You
shouldn't use these values directly to delete the entry as this could
break the iterator:
for key i
Premshree Pillai wrote:
> There's an index here:
http://harvestman.freezope.org/cookbook/creds.html
>
> But dunno if all the recipes were finally included. Maybe somebody
> (Alex?) can confirm?
>
>
[snip..]
Well - my copy just arrived :-)
Three of my recipes are in - but one has been merged with
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it uses
names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion of modules in c is a purely preproces
Eric Brunel wrote:
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel
<[EMAIL PROTECTED]> wrote:
Instead of indexing self.lab by strings, you can index them by the
attributes themselves : self.lab[self.i], and change line 23 into
for var in (self.s, self,i)
I really think this is asking fo
This is to inform those interested in compiling Python in MinGW that
an updated version of pyMinGW is now available.
Get it from here:
http://jove.prohosting.com/iwave/ipython/pyMinGW.html
Regards
Khalid
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to all who responded. Although overwhelmed by the hits from a Google
search initially, it looks like pyro is a good choice for my needs.
-Original Message-
From: Ken Godee [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 3:45 PM
To: python-list@python.org
Subject: Re: Need He
Steven Bethard wrote:
Ron Garret wrote:
None of the native types (int, float, list, tuple, etc.) can have weak
references, but wrapping them in a class is supposed to get around
that. And it does -- for all classes except str.
Interesting. Is the wrapping thing documented somewhere? I didn't s
I have a class Surface with many methods. Working in the interactive
window I receive an error like this when I write the wrong method name:
>>> table.addGlas()
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: 'Surface' object has no attribute 'addGlas'
Is it possibile t
max(01)* wrote:
> hi everybody.
>
> suppose that code-1.py imports code-2.py and code-3.py (because it uses
> names from both), and that code-2.py imports code-3.py.
>
> if python were c, code-1.c should only *include* code-2.c, because the
> latter in turns includes code-3.c.
>
> inclusion of
max(01)* wrote:
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it uses
names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion of modules in c is a
Elmar Haneke wrote:
> I do have an problem with Python and Capisuite.
what's Capisuite? have you check the Capisuite site for support options?
(mailing lists, etc).
> On calling one of the Capisuite functions I get an Exception "global name
> 'Result' is not defined".
>
> Where to search for th
I downloaded PythonDotNet from the Zope site to my laptop. According to
the docs I can use this with my regular Python installation. I copied
CLR.dll and Python.Runtime.dll to my root folder (c:\\Python24). Doing
this I was able to run the dotNet examples with no problems. When I
tried to run py2ex
You really should give an example so that we will know what
you mean by "weird and useless". Otherwise you are asking
us to implement TwistedSnmp to see what you are referring
to.
Larry Bates
Francesco Ciocchetti wrote:
> Hi all ml.
>
> I'm tryng to use TwistedSnmp to make query and walk dire
I know I've seen this somewhere, but can't seem to google it. Is
there a way to use an alternate statement separator, other than the
default ';'?
jw
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have been using Impacket to produce some packets, but unfortunatelly
it does not provide functionality for changing the sequence number of a
packet and leaves it to 0.
Is it possible to cjange the sequense number in some way?
Thank you
--
http://mail.python.org/mailman/listinfo/python-
"Steve" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What are some of other people's favourite tips for
> avoiding bugs in the first place, as opposed to finding
> them once you know they are there?
>
Fonts with slashed zeros and serifs.
-Tom
--
http://mail.python.org/mailman
Paul Rubin wrote:
> Florian Lindner <[EMAIL PROTECTED]> writes:
>> I have a script which is readable and executable by a user, but not
>> writable.
>> The users executes the scripts, it reads in a value and based on this
>> value it computes a result and stores it in a variable.
>> Can the user re
#! rnews 1551
Newsgroups: comp.lang.python
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp
From: Harry George <[EMAIL PROTECTED]>
Subject: Re: why and when we should do it?
X-Nnt
What I wanted it to know how to. Take a function like.
Note replace ... with spaces.
def makeAddr(tAdd):
def add(tNum):
return tNum + tAdd
return add
In a class so I make several functions that do the same thing but on
diffrent objects.
I ended up writing a base function and just
George Yoshida wrote:
> Rakesh wrote:
>
> > To quote a much smaller trimmed-down example, here is how it looks
> > like:
> > ## ---
> > # Entry Point to the whole program
> > ## ---
> > def main():
> >
Also note I can't read or type is seems.
what I want to know is how to take a function like.
I realley need to fininsh my coke before I try to think.
--
http://mail.python.org/mailman/listinfo/python-list
See the following.
-- Paul
class X(object):
pass
def makeAddr(tAdd):
def add(self, tNum):
return tNum + tAdd
return add
# add methods to class X
X.add1 = makeAddr(1)
X.add100 = makeAddr(100)
# create an X object
x = X()
# invoke new methods
print x.add1( 50 )
print x.add100
Here's another real world example, although it was in C:
char* ptr;
assert( ptr = malloc( memsize ); )
Of course, this worked when built in debug, but it took a while to
track down why it wasn't working in the release build (the assert()'s
were stripped out in the release builds, so ptr didn't al
Thanks I will try that.
--
http://mail.python.org/mailman/listinfo/python-list
Francesco Ciocchetti wrote:
>I'm tryng to use TwistedSnmp to make query and walk directly inside my
>python code.
>
>The problem i'm facing is that any time there is an hexadecimal value to
>be returned by the snmpwalk it is returened in a weird and useless
>way... does anyone had any (successfull
Steve Holden <[EMAIL PROTECTED]> wrote:
> Sorry you can't make it to Python. My even-naiver way of approaching the
> problem was to use the sort utility built into Cygwin, thereby avoiding
> writing any code at all.
an easier way is to publish it unsorted, but claim it is sorted.
someone is sur
Hi,
I'm trying to fill the form on page
http://www.cbs.dtu.dk/services/TMHMM/ using urllib.
There are two peculiarities. First of all, I am filling in incorrect
key/value pairs in the parameters on purpose because that's the only
way I can get it to work.. For "version" I am suppose to leave it
u
Thanks that made it work. If I did it that way I think the other
programmers on my team would kill me so I will stick with wrapping the
function over and over again.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have a class Surface with many methods. Working in the interactive
> window I receive an error like this when I write the wrong method name:
>
table.addGlas()
> Traceback (most recent call last):
> File "", line 1, in ?
> AttributeError: 'Surface' object has no
On Wed, 30 Mar 2005 14:42:52 GMT, rumours say that Garry Hodgson
<[EMAIL PROTECTED]> might have written:
>Steve Holden <[EMAIL PROTECTED]> wrote:
>
>> Sorry you can't make it to Python. My even-naiver way of approaching the
>> problem was to use the sort utility built into Cygwin, thereby avoidin
Qiangning Hong wrote:
I am writing a setup.py for my package. I have a pre-compiled
myextmod.pyd file in my package and I want the distutils to
automatically copy it to
C:\Python23\Lib\site-packages\mypackage\myextmod.pyd.
I try to add the following parameter to setup():
data_file = [('mypackag
Paul,
Thank you for your reply.
Here is a test page that I woul like to test with PyParsing
http://www.ourglobalmarket.com/Test.htm
>From that
I would like to extract the tittle ( it is below Lanjin Electronics
Co., Ltd. )
(Sell 2.4GHz Wireless Mini Color Camera With Audio Function )
descriptio
Premshree Pillai wrote:
> There's an index here:
http://harvestman.freezope.org/cookbook/creds.html
That lists the authors. Where is a list of the recipes?
--
http://mail.python.org/mailman/listinfo/python-list
Ville Vainio wrote:
A minimal set would not be that offensive, yes. But then we would have
two places to look for itertools functionality, which may not be
desirable.
True, though this is currently necessary with str objects if you want to
use, say string.maketrans, so it's not without some prece
Peter Hansen wrote:
I believe it's here: http://docs.python.org/lib/module-weakref.html
if you search for the string "Not all" and read the next two
paragraphs.
On the other hand, it says (there) only that "several builtin
types such as list and dict ... can add support through
subclassing", and do
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
> Steven Bethard wrote:
> > Ron Garret wrote:
> >> None of the native types (int, float, list, tuple, etc.) can have weak
> >> references, but wrapping them in a class is supposed to get around
> >> that. And it does -- fo
Timothy Wu wrote:
> After I've done that it works fine for small SEQ values. Then, when I
> try to send large amount of data (1.4MB), it fails miserably with
> AttributeError exception.
the page states that you should send no more than 4000 proteins. how
many proteins do you have in your 1.4 meg
I use PIL for image manipulation.
For drawing rectangles and other shapes PIL was really
good.
Now i am trying to paste 3 images into a single image.
All 3 images that i try to paste are having a
transparent background.
When i try to open the image and paste the background
becomes black. I masked
Thx, Robert. I did some tests:
>>> xs = range(1)
>>> ys = range(0,2,2)
>>> def m1(x, count=100):
... for c in range(count):
...y = map(float, x)
... return y
>>> def L1(x, count=100):
... for c in range(count):
...y = [float(z) for z in x]
... return y
>>> d
> You could achieve this by overriding __getattribute__ (untested):
I believe OP would do better to use __getattr__, which is only called when
the attribute is not found by the normal lookup, which is the only time he
needs/wants customized control.
TJR
--
http://mail.python.org/mailman/lis
"Jaime Wyant" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I know I've seen this somewhere, but can't seem to google it. Is
> there a way to use an alternate statement separator, other than the
> default ';'?
Other than \n, no. Both are builtin to the language definition and
i
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> See the following.
> -- Paul
>
> class X(object):
> pass
>
> def makeAddr(tAdd):
> def add(self, tNum):
> return tNum + tAdd
> return add
>
> # add methods to class X
> X.add1 = makeAddr(1)
> X.add100
Jaime Wyant wrote:
I know I've seen this somewhere, but can't seem to google it. Is
there a way to use an alternate statement separator, other than the
default ';'?
The validity of Terry's answer (which is true for the general case)
aside, it might be possible to do what you are trying to do
if yo
Ron Garret wrote:
foo(int)
foo(float)
foo(dict)
foo(list)
foo(str)
TypeError: cannot create weak reference to 'C' object
foo(tuple)
TypeError: cannot create weak reference to 'C' object
foo(long)
TypeError: cannot create weak reference to 'C' object
Ah, it appears that non-immediate immutable type
Hi
I'm trying to write an hexadecimal file... I mean not a text plain...
I have to convert a float decimal number in float hexadecimal one, and
that's done.
That number is the one I'm gonna write in the hex file... can anybody
help me 'cause i don't know how python write an hex file!
Thanks!
-
Well, I'm embedding python in an old C console app. This app uses a
lot of ; delimited records.
I want to allow the execution of arbitrary python statements inside
some of these records. I was hoping there was an easy way to set the
statement terminator. I will simply make up a new terminator a
Mike Wimpe <[EMAIL PROTECTED]> wrote or quoted:
> Other than being used to wrap Java classes, what other real use is
> there for Jython being that Python has many other GUI toolkits
> available? Also, these toolkits like Tkinter are so much better for
> client usage (and faster) than Swing, so wha
[Ron Garret]
> Why doesn't this work?
>
> >>> from weakref import ref
> >>> class C(str): pass
> ...
> >>> ref(C())
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: cannot create weak reference to 'C' object
. . .
> Everything but strs.
Also subclasses of tuple are not
Over 2 days, this link consistently gives 500 Internal Server Error (from
python.org, says IE):
Decimal interaction with __rop__ (2005-03-19)
http://python.org/sf/1166602 opened by Facundo Batista
while this one works fine:
Fix _tryorder in webbrowser.py (2005-03-20)
http://py
Thank you, __getattr__ does what I need :-)
A smart help can be designed easely...
Bear hugs,
Bearophile
--
http://mail.python.org/mailman/listinfo/python-list
There is not such thing as a hexadecimal file. Files are either
binary or text. Hexadecimal is a representation of binary data
where 4 bits are displayed as a single hex digit (0-F) as
shorthand (because 0000111 is just too difficult to
deal with).
To write binary data to a file in P
Hansan wrote:
I also want the user to choose a date
I will make this with another dropdownbox.
But if the first month is selected, then there should be 31 days in the days
dropdownbox, if the second month is selected there should be 28 days in the
dropdownbow.
I know this isn't the solution to your
QOTW: "This is a Python newsgroup. Assume that we all have been
brainwashed." -- Peter Otten
"[M]y experience porting Java to Jython is that it mostly involves deleting
stuff :-)" -- Kent Johnson
"[K]eep in mind, however, that not all problems in life can be solved with
software." -- Roy Smith
[Cesar Andres Roldan Garcia]
> I'm trying to write an hexadecimal file... I mean not a text plain...
>I have to convert a float decimal number in float hexadecimal one,
> and that's done.
The struct module provides a portable way to convert a float to and from a
sequence of bytes.
The binascii mo
I've googled for the above and get way too many hits..
I'm looking for an 'easy' way to have the last item in a list returned.
I've thought about
list[len(list)-1]
but thought there would be a more gracefull way.
--
http://mail.python.org/mailman/listinfo/python-list
On 30 Mar 2005 10:48:17 -0700, rumours say that David Bear
<[EMAIL PROTECTED]> might have written:
>I've googled for the above and get way too many hits..
>
>I'm looking for an 'easy' way to have the last item in a list returned.
>
>I've thought about
>
>list[len(list)-1]
>
>but thought there wou
[Bearophile]
> Working in the interactive window I receive an error like
> this when I write the wrong method name:
>
> >>> table.addGlas()
> Traceback (most recent call last):
> File "", line 1, in ?
> AttributeError: 'Surface' object has no attribute 'addGlas'
>
> Is it possibile to make the ob
Read the license. If he's released it under GPL or BSD, then you could,
in all good faith, release a fork of the code until he surfaces.
Carsten Haese wrote:
Hello everybody:
I have discovered that the functionality for connecting Python to an
Informix database is currently in a frustrating stat
"Myles Strous" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
>>> satisfy some handy properties, the first of which being:
>>> l[:n] + l[n:] = l
>>
>> I don't think l[:5] + l[5:] = l is a handy property
>> and to me is clearly counterintuitive. Further,
>
> It can be quite usef
[Fuzzyman]
> Three of my recipes are in - but one has been merged with someone elses
> and improved beyond all recognition :-)
Gets my vote for QOTW quote of the week.
The comment captures the spirit of the cookbook and highlights the benefits of
the process (public review, reader comments, compe
[David Bear]
> I'm looking for an 'easy' way to have the last item in a list returned.
Try mylist.pop() or mylist[-1].
Raymond Hettinger
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 191 matches
Mail list logo