gry@ll.mit.edu wrote:
>
> You gave it a single string, not a list(sequence) of strings. Try
> something like:
> std_in.writelines(["notgood"])
>
I got this output then:
>>>
something:
Traceback (most recent call last):
File "F:\coding\pwSync\popen_test\popen_test.py", line 8, in ?
I have code that searches under the default folder (inbox) but I would
like to modify it to search for everything in that folder with the
exception of one subfolder where I would like it not to search.
my current code is:
from imaplib import *
import getpass
server = IMAP4("webmail.x.
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> What are some good references for finite state machines? Minimization?
A classic is "Introduction to automata theory, languages and computation"
by Hopcroft and Ullman. But any other book about finite state machines
should cover these topics, too. The
1. "Without a __dict__ variable,
instances cannot be assigned new variables not listed in the __slots__
definition."
So this seemed an interesting restriction to impose in some instances,
but I've noticed that this behavior is being called by some a side effect
the reliance on which is considered
> There isn't a thread pool module in the standard library, but I'm sure
> many have been written by people in the python community.
> Anyone have a favorite? Is there one particular implementation that's
> recommended?
>
> Not looking for anything fancy, just something that lets me queue up
>
Nancy wrote:
> I know there are lots of messages about this already posted but Im
> seeing this on Solaris 5.8. Sunfire
> I'm using the sun compiler. All the other messages blamed it on linux
> red hat gcc compilers and glib. Thanks.
So what is the value of SIZEOF_LONG in pyconfig.h?
When you com
Hi everyone,
I need your help for using python odbc module. I have a simple
table defined as
create table A (
userId char(10),
courseid char(10),
grade integer,
primary key(userId,courseId)
)
userIdcourseId grade
1 1001 50
1 1002 89
With this little DLL you can embed either Mozilla ActiveX Browser
Control or MSIE by just calling it's EmbedBrowser(HWND hwnd, int
i[0,1]) function. 0 = Mozilla Activex Browser Control and 1 = MSIE.
Other available methods include:
>> UnEmbedBrowser()
>> ResizeBrowser(HWND hwnd)
David Hirschfield wrote:
> There isn't a thread pool module in the standard library, but I'm sure
> many have been written by people in the python community.
> Anyone have a favorite? Is there one particular implementation that's
> recommended?
Because of the GIL, thread pools are not as useful in
[lord trousers]
>>> Is there a way I can get hold of these kinds of statistics for
>>> debugging?
[Martin v. Löwis]
>> This is best done when Python is build in debug mode.
>> sys.gettotalrefcount then gives you the number of INCREF
>> calls for which no DECREF has been made; you said that
>> this
>> Wouldn't it be nice to say
>> id, *tokens = line.split(',')
>
>
> id, tokens_str = line.split(',', 1)
But then you have to split tokens_str again.
id, tokens_str = line.split(',', 1)
tokens = tokens_str.split(',')
this is too verbose.
anand
--
http://mail.python.org/mailman/listinfo/python
hi
this is pertain to unix environment.
is it possible to remove a file by it's inode and not it's filename
using Python? Just curious...
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
> lord trousers wrote:
> > Is there a way I can get hold of these kinds of statistics for
> > debugging?
>
> This is best done when Python is build in debug mode.
> sys.gettotalrefcount then gives you the number of INCREF
> calls for which no DECREF has been made; you said th
Quoth gry@ll.mit.edu:
| Martin P. Hellwig wrote:
...
|> import popen2
|>
|> std_out, std_in = popen2.popen2("testia.py")
|>
|> x=std_out.readline()
|> print(x)
|>
|> std_in.writelines("notgood")
|>
|> x=std_out.readline()
|> print(x)
...
|> Traceback (most recent call last):
|>File "F:\coding\p
Did you read
http://diveintopython.org/soap_web_services/index.html ?
and specifically
http://diveintopython.org/soap_web_services/introspection.html ?
These docs are slightly dated but I doubt much has changed. If there is
a problem, you can always try the older version from the site.
--
http:/
Not to interrupt the valuable lesson with Google :-)
Boa Constructor.
--
http://mail.python.org/mailman/listinfo/python-list
dongdong wrote:
> using web browser can get page's content formally, but when use
> urllib2.open("http://tech.163.com/2004w11/12732/2004w11_1100059465339.html";).read()
>
> the result is
>
> CONTENT="0;URL=http://tech.163.com/04/1110/12/14QUR2BR0009159H.html";>
This line here instructs the browse
On 23/03/2006 9:01 AM, [EMAIL PROTECTED] wrote:
> I have just installed PyExcelerator, and now want to use it to read
> Excel spreadsheets with a variable number of rows and columns and with
> multiple sheets. Unfortunately, no documentation seems to accompany
> PyExcelerator. Does anyone know of a
On 23/03/2006 1:53 PM, Kevin F wrote:
> what does it mean when there are [0] or [1] after a variable?
>
> e.g. print 'Message %s\n%s\n' % (num, data[0][1])
Here's the section in the Python Tutorial that should answer your question:
http://docs.python.org/tut/node5.html#SECTION0051400
yeah,u r right, the page uses chinese.(I'm a chinese too.^_^,)
using urllib2.urlopen('').read(),I can't get the contents
between '' and '' ,the reason isn't the chinese encoding
but the 'no-cache' set,I think.
I want to get the contents between
can you find the problem why i can'
> (That long-gone guy is actually me, according to the notes in the program.
> However those brain cells are long gone now, so it might as well not be me.)
I had a great long laugh with this bit. I guess it's because I can
relate so well :)
--
http://mail.python.org/mailman/listinfo/python-list
what does it mean when there are [0] or [1] after a variable?
e.g. print 'Message %s\n%s\n' % (num, data[0][1])
--
http://mail.python.org/mailman/listinfo/python-list
sbaush> Hi all, i'm searching for a tool that draw the UML of a python
sbaush> project. Have you idea about the best way to do it? I prefer a
sbaush> Linux tool, but it's the same, i have only a little bit of
sbaush> time...
Did you try Googling for "UML from Python"?
Skip
--
ht
dongdong wrote:
> using web browser can get page's content formally, but when use
> urllib2.open("http://tech.163.com/2004w11/12732/2004w11_1100059465339.html";).read()
>
> the result is
>
> CONTENT="0;URL=http://tech.163.com/04/1110/12/14QUR2BR0009159H.html";>
> content="no-cache">?y?ú'ò?aò3??
Martin P. Hellwig wrote:
> Hi all,
>
> I was doing some popen2 tests so that I'm more comfortable using it.
> I wrote a little python script to help me test that (testia.py):
>
> -
> someline = raw_input("something:")
>
> if someline == 'test':
> print("yup")
>
I've just been asked to do a soap client for some vendor software. I'm able
to load the WSDL and discover the methods, but when I go to call a method it
doesn't see it. I should be passing in a string that is named "testValue"
I've been working from the soap demoes with soappy 0.12.0. I've foun
using web browser can get page's content formally, but when use
urllib2.open("http://tech.163.com/2004w11/12732/2004w11_1100059465339.html";).read()
the result is
http://tech.163.com/04/1110/12/14QUR2BR0009159H.html";>
?y?ú'ò?aò3??...
,I think the reson is the no-cache, are there person would he
Ben Finney wrote:
> "DataSmash" <[EMAIL PROTECTED]> writes:
> > * random.py:
> >
> > import random
>
> Now that you've tripped over this ambiguity of Python's current
> 'import' behaviour, you may be interested to know that the behaviour
> will change to solve this:
>
> http://www.python.org/de
[EMAIL PROTECTED] writes:
> O'Reilly's Spidering Hacks books terrific. One problem. All the code
> samples are in Perl. Nothing Pythonic. Is there a book out there for
> Python which covers spidering / crawling in depth?
A fair number of the examples in that book use WWW::Mechanize. I
ported tha
Ivan Vinogradov wrote:
> Hello All,
>
> this seems like a trivial problem, but I just can't find an elegant
> solution neither by myself, nor with google's help.
>
> I'd like to be able to keep an array representing coordinates for a
> system of points.
> Since I'd like to operate on each point's c
Nancy wrote:
> When i link with python2.4.a i get this error.
>
> ld: Dwarf Error: Invalid or unhandled FORM value: 14.
>
> I am NOT using the gcc compiler but the linux icc compiler. Google
> hits blame it on gcc compiler binutils being out of date. i dont think
> thats the problem here.
> thank
Hi all, i'm searching for a tool that draw the UML of a python project. Have you idea about the best way to do it? I prefer a Linux tool, but it's the same, i have only a little bit of time...
-- Sbaush
-- Sbaush
--
http://mail.python.org/mailman/listinfo/python-list
Hi all, i'm searching for a tool that draw the UML of a python project. Have you idea about the best way to do it? I prefer a Linux tool, but it's the same, i have only a little bit of time...-- Sbaush
--
http://mail.python.org/mailman/listinfo/python-list
"Dan" <[EMAIL PROTECTED]> writes:
> Ive got the chapter from the net on COM. It looks pretty old, 2000.
> Also the very first example in the chapter on COM doesn't seem to work.
> Is what I am wanting to do possible with Python?
As long as you're doing IDispatch, essentially anything is possible
Julien Fiore wrote:
> Thanks for the psyco information, Serge.
>
> > 2) Rewrite the code to be vectorized (don't use psyco) Right now your
> > code *doesn't* get any speed benefit from numpy
>
> I do not understand this point. How to rewrite the code ?
vectorized code means one operation work on m
Hi all,
I was doing some popen2 tests so that I'm more comfortable using it.
I wrote a little python script to help me test that (testia.py):
-
someline = raw_input("something:")
if someline == 'test':
print("yup")
else:
print("nope")
---
John Salerno wrote:
> Ok, here's a problem I've sort of assigned to myself for fun, but it's
> turning out to be quite a pain to wrap my mind around. It's from a
> puzzle game. It will help if you look at this image:
>
> http://www.johnjsal.devisland.net/switches.jpg
>
> Here's the situation: Each
On 22/03/06, AB <[EMAIL PROTECTED]> wrote:
>> try something like this:> filename = os.path.basename(fullpathname)
I tried the following with the same result:myName = ulImage.filenamenewFile = file (os.path.join(upload_dir, os.path.basename(myName)), 'wb')Any other ideas? Seems like it shouldn't be
"Irmen de Jong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> AB wrote:
>> All right... I already hated IE. But, now I do even more. My scripts
>> upload function is working in Firefox, but not in IE. If I upload a file
>> from Internet Explorer I get a file on the system nam
John Salerno wrote:
> Ok, here's a problem I've sort of assigned to myself for fun, but it's
> turning out to be quite a pain to wrap my mind around. It's from a
> puzzle game. It will help if you look at this image:
>
> http://www.johnjsal.devisland.net/switches.jpg
>
> Here's the situation: E
Fredrik Lundh wrote:
> Gregory Petrosyan wrote:
>
> > 1) From 2.4.2 documentation:
> > There are two new valid (semantic) forms for the raise statement:
> > raise Class, instance
> > raise instance
> >
> > 2) In python:
> > >>> raise NameError
> > Traceback (most recent call last):
> > File "",
[EMAIL PROTECTED] wrote:
> Atanas Banov wrote:
> > [EMAIL PROTECTED] wrote:
> > > Steve Holden wrote:
> > > > [EMAIL PROTECTED] wrote:
> > >
> > > > > Pure cgi is too slow. "Active Scripting" means ASP, yes?
> > > > > I need something that will do cgi scripts (a lot of which I already
> > > > > h
Thanks,
I later discovered that it was a big edian binary as well.
Sheldon
--
http://mail.python.org/mailman/listinfo/python-list
I know there are lots of messages about this already posted but Im
seeing this on Solaris 5.8. Sunfire
I'm using the sun compiler. All the other messages blamed it on linux
red hat gcc compilers and glib. Thanks.
"/depot/Python-2.4/include/python2.4/pyport.h", line 612: #error:
"LONG_BIT definiti
Dan Jacobson <[EMAIL PROTECTED]> writes:
> Here's the deal: I have to maintain this long gone guy's programs and
> lately they've been saying
> ./north_pass.py:14: DeprecationWarning: integer argument expected, got float
> fl=range(1000*(math.floor(25000*f2m/1000)),46000*f2m,1000)
You haven't s
On 22 Mar 2006 13:07:33 -0800
"Byte" <[EMAIL PROTECTED]> wrote:
> The following code will not work for me:
>
> x = 1
>
> while x == 1:
> print 'hello'
> x = input('What is x now?: ')
>
> while x == 2:
> print 'hello again'
> x == input('What is x now?: ')
>
> The second loop dos
I believe "Python in a Nutshell" has a couple of clear examples using
Queue and Threading, including one with a pool of worker threads that
wait for entries in one queue and place results in another.
Also you should look at the Python Cookbook, which probably includes
the same or similar examples
I think you want the Queue module in standard lib. Haven't started a
thread yet without it :)
regards
/rune
--
http://mail.python.org/mailman/listinfo/python-list
AB wrote:
> All right... I already hated IE. But, now I do even more. My scripts
> upload function is working in Firefox, but not in IE. If I upload a file
> from Internet Explorer I get a file on the system named for the full path
> from the users computer...
>
> example...
> They user uplo
"And it doesn't really matter what language you use to implement this
algorithm, it's the idea that counts. Notation aside, all
implementations will be quite similar."
I'll guess I'll get out my Turing tape. ;)
What are some good references for finite state machines? Minimization?
--
http://mai
Randall Parker wrote:
> Using Python 2.4.2 on Windows 2000 in SPE.
>
> Getting:
> TypeError: 'str' object is not callable
>
> on this line:
>
> TmpErrMsg1 = "State machine %s " (StateMachineName)
>
> In Winpdb 1.0.6 the StateMachineName is of type str in the Namespace |
> Local window of local
There isn't a thread pool module in the standard library, but I'm sure
many have been written by people in the python community.
Anyone have a favorite? Is there one particular implementation that's
recommended?
Not looking for anything fancy, just something that lets me queue up
tasks to be pe
"DataSmash" <[EMAIL PROTECTED]> writes:
> * random.py:
>
> import random
Now that you've tripped over this ambiguity of Python's current
'import' behaviour, you may be interested to know that the behaviour
will change to solve this:
http://www.python.org/dev/peps/pep-0328/>
In brief: Python
In <[EMAIL PROTECTED]>, john_sips_tea
wrote:
> For writing testcode, it looks like there's three ways that it's
> typically done:
>
> (1). using the doctest module,
>
> (2). using the unittest module (i.e. "pyunit"), or else
>
> (3). just putting an "if __name__ = '__main__':" at the bottom of
Kevin F wrote:
> I have the following script:
>
> emails = []
> for msg in messagesInfo:
> msgNum = int(msg.split()[0])
> msgSize = int(msg.split()[1])
> if(msgSize < 2):
> message = server.retr(msgNum)[1]
> Message = join(message, "\n")
> ema
I have just installed PyExcelerator, and now want to use it to read
Excel spreadsheets with a variable number of rows and columns and with
multiple sheets. Unfortunately, no documentation seems to accompany
PyExcelerator. Does anyone know of a good source of documentations
and/or examples? The auth
Two things:
1) math.floor returns a float, not an int. Doing an int() conversion on
a float already floors the value, anyways. Try replacing
math.floor(...) with int(...)
e.g.
>>> math.floor(5.9)
5.0
>>> int(5.9)
5
2) What kind of data is in f2m? If f2m is a float, you will get float
values in the
"Dan Jacobson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here's the deal: I have to maintain this long gone guy's programs and
> lately they've been saying
> ./north_pass.py:14: DeprecationWarning: integer argument expected, got
> float
> fl=range(1000*(math.floor(25000*f2m/
Tommy Grav wrote:
> This might not be the venue to ask this but I do not know where else to
> turn.
> I am trying to install a package that is swig'ed from some C code.
> Unfortunately the readme file isn't to informative. Does anyone
> know which libraries to link to to remove the undefined sym
vj enlightened us with:
> Run using lua generates:
>
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried
> to allocate 35 bytes) in
> /home/groups/d/do/doris/htdocs/lua/weblua.php on line 109
Ehm... this can also be done with Python & ulimit.
Sybren
--
The problem with the worl
This might not be the venue to ask this but I do not know where else to turn. I am trying to install a package that is swig'ed from some C code. Unfortunately the readme file isn't to informative. Does anyoneknow which libraries to link to to remove the undefined symbolsbelow?[EMAIL PROTECTED] Pyt
When i link with python2.4.a i get this error.
ld: Dwarf Error: Invalid or unhandled FORM value: 14.
I am NOT using the gcc compiler but the linux icc compiler. Google
hits blame it on gcc compiler binutils being out of date. i dont think
thats the problem here.
thanks.
--
http://mail.python.o
I have updated and moved my SCSI diagnostic tools from starship to
sourceforge. I will be still maintaining these files at both locations
as long as starship exists. These tools allow low level tests to be
conducted on storage devices under the Windows operating system. These
routines access all st
[EMAIL PROTECTED] wrote:
> Hi - I want to take something like ...
>
> lstIn = []
> lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 10, 'LEA_AUTOID': 1000})
> lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 11, 'LEA_AUTOID': 2000})
> lstIn.append({'COM_AUTOID': 1, 'PRG_AUTOID': 11, 'LEA_AUTOID': 2001})
>
Here's the deal: I have to maintain this long gone guy's programs and
lately they've been saying
./north_pass.py:14: DeprecationWarning: integer argument expected, got float
fl=range(1000*(math.floor(25000*f2m/1000)),46000*f2m,1000)
As I don't know python, I tried sticking an int( ) in various p
x=1
while not x==3:
if x==1:
print 'hello'
x = input('what is x now?: ')
if x==2:
print 'hello again'
x=input('what is x now?: ')
any code you want to repeat needs to be in some sort of a loop
structure. Program execution doesn't just jump around unless you t
Bruno Desthuilliers wrote:
> Michael Spencer a écrit :
>> I may be missing the subtlety of what you're up to, but why is
>> overriding __getattribute__ more desirable than simply defining the
>> descriptor in a subclass?
>
> The code snippet I gave as an example was not supposed to reflect how
All right... I already hated IE. But, now I do even more. My scripts
upload function is working in Firefox, but not in IE. If I upload a file
from Internet Explorer I get a file on the system named for the full path
from the users computer...
example...
They user uploads C:\mydocs\test.jpg
i
In article <[EMAIL PROTECTED]>,
Jeffrey Froman <[EMAIL PROTECTED]> wrote:
>EdWhyatt wrote:
>
>> But are you serious about that RFC Compliant thing?
>
>RFC 2822 obsoletes RFC 822, and I don't know of any specification in RFC
>2822 that requires an email address to be present in the To: header. My
>
Ive got the chapter from the net on COM. It looks pretty old, 2000.
Also the very first example in the chapter on COM doesn't seem to work.
Is what I am wanting to do possible with Python?
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On 22 Mar 2006 08:31:16 -0800, "EdWhyatt" <[EMAIL PROTECTED]>
>declaimed the following in comp.lang.python:
>
>> So it's a restriction of Python?
>>
> RFC822 is the /standard/ (well, there are newer versions -- 282
The following code will not work for me:
x = 1
while x == 1:
print 'hello'
x = input('What is x now?: ')
while x == 2:
print 'hello again'
x == input('What is x now?: ')
The second loop dose not seem to be able to activate the loop above
it
Proof from my command line:
$ pyt
Dan:
>New to python. Running under windows xp. Need help getting started
>writing COM server and client.
Highly recommended:
http://safari.oreilly.com/?XmlId=1-56592-621-8
--
http://mail.python.org/mailman/listinfo/python-list
bruno at modulix wrote:
> Hi
>
> I'm currently playing with some (possibly weird...) code, and I'd have a
> use for per-instance descriptors, ie (dummy code):
>
> class DummyDescriptor(object):
> def __get__(self, obj, objtype=None):
> if obj is None:
> return self
> return getatt
I have the following script:
emails = []
for msg in messagesInfo:
msgNum = int(msg.split()[0])
msgSize = int(msg.split()[1])
if(msgSize < 2):
message = server.retr(msgNum)[1]
Message = join(message, “\n”)
emails.append(message)
It downloads
New to python. Running under windows xp. Need help getting started
writing COM server and client. Want to basically have two interfaces on
the server, register() and fire_event1(). register registers a client
to receive the fire_event1() event. The client will then need an event
handler implemented
Phoe6 a écrit :
> Hi all,
> I just read the manual and got to know I can use a for loop to iterate
> through the lines in the file.
>
> But so far, I was strugling with the following:
>
> import os
> file = open('File1.txt','r')
'file' is the builtin type for file objects (like the one returned
Ivan Vinogradov wrote:
> Hello All,
>
> this seems like a trivial problem, but I just can't find an elegant
> solution neither by myself, nor with google's help.
>
> I'd like to be able to keep an array representing coordinates for a
> system of points.
> Since I'd like to operate on each poi
Anand wrote:
> Wouldn't it be nice to say
>
> id, *tokens = line.split(',')
id, tokens_str = line.split(',', 1)
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
I recently came across the Louie package (http://louie.berlios.de/)
I am particularly interested in the TwistedDispatchPlugin, however the
documentation is very sparse.
Does anyone have some example code showing how to use it, please?
--
Richard
--
http://mail.python.org/mailman/listinfo/pyth
Michael Spencer a écrit :
> bruno at modulix wrote:
>
>> Ziga Seilnacht wrote:
>>
>>> bruno at modulix wrote:
>>>
Hi
I'm currently playing with some (possibly weird...) code, and I'd
have a
use for per-instance descriptors, ie (dummy code):
>>>
>>>
>>>
>>>
Now the q
Argh!
I do not know what happened to the percent signs. They used to be
there. Sorry to waste the time of so many people.
--
http://mail.python.org/mailman/listinfo/python-list
Carl J. Van Arsdall wrote:
> Randall Parker wrote:
>>
>>Getting:
>>TypeError: 'str' object is not callable
>>
>>on this line:
>>
>>
>
> You have a boo boo
>
>
>>TmpErrMsg1 = "State machine %s " (StateMachineName)
>>
>
> Should be
>
> TmpErrMsg1 = "State machine %s " %(StateMachineName)
An
Hello All,
this seems like a trivial problem, but I just can't find an elegant
solution neither by myself, nor with google's help.
I'd like to be able to keep an array representing coordinates for a
system of points.
Since I'd like to operate on each point's coordinates individually,
for sp
>From Dick Watson:
> We have a legacy device that exposes an RPC server. We have an RPCL
> defininition of its interface. We want to develop an RPC client of this
> interface in Python that will be usable in both Win32 and open systems
> environments.
>
> I can find some *very* dated references to
Ok, here's a problem I've sort of assigned to myself for fun, but it's
turning out to be quite a pain to wrap my mind around. It's from a
puzzle game. It will help if you look at this image:
http://www.johnjsal.devisland.net/switches.jpg
Here's the situation: Each of the four rows in the diagra
On 22 Mar 2006 12:10:49 -0800, Randall Parker wrote:
>
> TmpErrMsg1 = "State machine %s " (StateMachineName)
>
TmpErrMsg1 = "State machine %s " % (StateMachineName)
--
Richard
--
http://mail.python.org/mailman/listinfo/python-list
Randall Parker wrote:
> Using Python 2.4.2 on Windows 2000 in SPE.
>
> Getting:
> TypeError: 'str' object is not callable
>
> on this line:
>
>
You have a boo boo
> TmpErrMsg1 = "State machine %s " (StateMachineName)
>
Should be
TmpErrMsg1 = "State machine %s " %(StateMachineName)
> In W
Using Python 2.4.2 on Windows 2000 in SPE.
Getting:
TypeError: 'str' object is not callable
on this line:
TmpErrMsg1 = "State machine %s " (StateMachineName)
In Winpdb 1.0.6 the StateMachineName is of type str in the Namespace |
Local window of local variables. It even has the string value I ex
Peter Otten wrote:
> Peter Cole wrote:
>
>> I'm having difficulty understanding why this doesn't work:
>
>> import sys, new, inspect
>>
>> class T:
>> def foo(self):
>> yield 1
>> yield 2
>> yield 3
>>
>>
>> t = T()
>
> im = new.instancemethod(T.foo, t, T)
>
>> prin
Joseph Turian wrote:
> In another thread, it was recommended that I wrap a dictionary in a
> class.
> How do I do so?
>
>Joseph
>
> that thread:
> http://groups.google.com/group/comp.lang.python/browse_frm/thread/9a0fbdca450469a1/b18455aa8dbceb8a?q=turian&rnum=1#b18455aa8dbceb8a
>
Perhaps li
bruno at modulix wrote:
> Ziga Seilnacht wrote:
>> bruno at modulix wrote:
>>
>>> Hi
>>>
>>> I'm currently playing with some (possibly weird...) code, and I'd have a
>>> use for per-instance descriptors, ie (dummy code):
>>
>>
>>
>>> Now the question: is there any obvious (or non-obvious) drawback
Thanks. That works. Like I said I am a newbie :)Cheers TommyOn Mar 22, 2006, at 1:17 PM, Fredrik Lundh wrote:Tommy Grav wrote: for testobs in obslist: print testobs.printmpc() print. def printmpc(self): if self.mag!="": print "%14s %12.5f %5.2f %6.2f %8.3f
Grant Edwards wrote:
> On 2006-03-22, Mark Warburton <[EMAIL PROTECTED]> wrote:
> > Ahh, right. Batteries included! Thanks for the enlightenment. :)
>
> I think that's the third time _today_ that question has been
> answered. Where can we put that information such that you
> would have found it
I think the only option is to come up with my own mini language.
Searching on google, I found several examples where people replaced
python with lua for scripting. Am reading up on lua and looks very
promissing. I also tried doing the following:
for i=1,1 do print(i) end
on:
http://doris.
On 2006-03-22, Mark Warburton <[EMAIL PROTECTED]> wrote:
> Peter Otten wrote:
>> To convert them you need struct.unpack()
>
> Ahh, right. Batteries included! Thanks for the enlightenment. :)
I think that's the third time _today_ that question has been
answered. Where can we put that informatio
doesnt look like you're passing any data to the print statement,
shouldn't it be something like
print '%d' % 4
output:
4\n
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> As pycairo is one of the less pythonish things I ever saw, it went into
> my mind to create some sort of objective wrapper over its python api
> making graphic manipulation much more coherent to the python way.
[...]
> Before going on with more complex forms and objects
Peter Otten wrote:
> To convert them you need struct.unpack()
Ahh, right. Batteries included! Thanks for the enlightenment. :)
--
http://mail.python.org/mailman/listinfo/python-list
You want something like this:
>>> a = '\x1dz'
>>> (ord(a[0])<<8) + ord(a[1])
7546
Each of the two characters represents one byte of a 16-bit integer. It
doesn't matter if they are ascii or hex -- there are still exactly two
bytes in each of your strings.
The ord() function converts a character
1 - 100 of 208 matches
Mail list logo