Part-time job Full-time income
美商高科技生化公司加州百大企業來台拓展亞太市場
誠徵兼職人員,每日2~3小時,月入1萬~3萬
http://www.moonnini.com/w/nica/
上面為在家工作系統網站
若對在家工作有興趣者可去索取電子書
--
[1;30;40m夫兵者不祥之器物或惡之故有道者不處君子居則貴左用兵則貴右兵者不祥之器非君子[m
[1;30m之器不得已[37m[30m而用之恬淡為上勝而不美而美之者是樂殺人夫樂殺人者則不可得志於天下
[m[1;30m矣吉事尚左凶事尚右偏將軍居左上將軍居右言以喪禮處之殺人之眾以哀悲泣之戰勝以
TPJ wrote:
> I have the following code:
>
> ---
> def f():
>
> def g():
> a = 'a' # marked line 1
> exec 'a = "b"' in globals(), locals()
> print "g: a =", a
>
> a = 'A' # marked line 2
> exec 'a = "B"' in globals(), lo
TPJ wrote:
> I have the following code:
>
> ---
> def f():
>
> def g():
> a = 'a' # marked line 1
> exec 'a = "b"' in globals(), locals()
> print "g: a =", a
>
> a = 'A' # marked line 2
> exec 'a = "B"' in globals(), loc
Nicolas Fleury wrote:
> Steven Bethard wrote:
>> Ok, I finally have a PEP number. Here's the most updated version of
>> the "make" statement PEP. I'll be posting it shortly to python-dev.
>>
>> Thanks again for the previous discussion and suggestions!
>
> I find it very interesting.
>
> My onl
hello again,
still having problemsi have the following in a txt file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\software\compete\dca]"UserId"="92005851""PanelId"="mayflower""PanelName"="Consumer Input Toolbar""CaptureType"=dword:0002
"CapTypOvr"=dword:0001"ExePath"="
PATTERN RECOGNITION EVENTS THIS SUMMER, 2006
___
4TH INTERNATIONAL SUMMER SCHOOL ON PATTERN RECOGNITION (ISSPR, 2006), 23-28
JULY, UK
WWW.PatternRecognitionSchool.com
The 4th International Summer School on Pattern Recognition will be organised at
the University of Plymouth, UK
Steven Bethard wrote:
> Should users of the make statement be able to determine in which dict
> object the code is executed? The make statement could look for a
> ``__make_dict__`` attribute and call it to allow things like::
>
> make Element html:
> make Element body:
>
Hi,Could I have some links? It would be very helpful.Thank You.On 4/14/06, Felipe Almeida Lessa wrote:
Em Sex, 2006-04-14 às 13:45 +0800, Rajesh Sathyamoorthy escreveu:> I wanted to know why it is more efficient to read a file in smaller> chunks ( using file() or open() )?It's more efficient in som
On 4/14/06, Rajesh Sathyamoorthy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wanted to know why it is more efficient to read a file in smaller chunks (
> using file() or open() )? If this is not done, will this lead to errors in
> the data read or just results in slower performance?
>
> Thank You.
It
Dennis Lee Bieber <[EMAIL PROTECTED]> writes:
> On Fri, 14 Apr 2006 09:17:05 +0400, Sergei Organov <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>>
>> I, as a newcomer, don't have much trouble understanding the binding vs
>> the assignment by themselves. What does somewhat
Hi there.
I have a list containing integer values from 0 to 255. With this list I
have informations width and height, as width * height = len(my_list)
What I want to do is to convert this array into a pixmap of dimension
width * height in order to draw it inside a pygtk GUI.
Any suggestions abou
"BartlebyScrivener" <[EMAIL PROTECTED]> writes:
> Yes, but for some reason, I get more and better help here with Python
> than on xemacs. Or maybe I've just had bad luck. Something like the
> following just leaves me scratching my head. I'm on Windows XP and
> never compiled anything that I know
Hi,
I try to define a (new-style) class who:
- have a __slots__ defined to be strict attributes,
- return None if the attribute is 'ok' but not set, or raise a 'normal'
error if the attribute isn't in __slots__.
This code runs, but is it the good way?
Thanks.
class test(object):
__slots__ =
Hello,
I'm trying to analyze some autolisp code with python. In the file to
be analyzed there are many functions. Each function begins with a
"defun" statement. And before that, there may or may not have comment
line(s), which begins with ";". My goal is to export each function
into separate f
Hi,
Every time I upgrade python I also have to download all packages and
reinstall them.
http://www.voidspace.org.uk/python/articles/upgrading_python.html
tells me that this is only a problem on windows for some reasons that
have to do with binary distributions, compiling and more.
This leads m
John Machin wrote:
> > $ python2.4 -mtimeit -s "str = 'D c a V e r \" = d w o r d : 0 0 0 0 0 6
> > 4 0'" 'str.replace(" ", "")'
>
> Oi! The OP mentioned "whitespace" ...
yeah. but as is obvious from his examples, he really means "UTF-16", not
whitespace.
--
http://mail.python.org/mailman/l
"david brochu jr" wrote:
> still having problemsi have the following in a txt file:
>
> Windows Registry Editor Version 5.00
if this is a regedit export, the data is encoded as UTF-16. treating
that as plain ASCII doesn't really work.
> for line in new_line.readlines():
> line = re.sub('"'
> def _gn(x):
> return x.upper()
>
> great_name = _gn
>
> class myclass:
> def mymethod(self, great_name=False):
> if great_name:
> return _gn('something')
> else:
> return 'something'
> >>> def great_name(x):
> ... return x.upper()
> ...
> >>
Hi all. I sending email using standard python modules smtplib, email,
coding email in utf but subject of message is not coded properly. In
subject i use my national characters (polish) and after send i get XX in
place these characters.
Here is the code
Message = email.message_from_string(pMessa
Thomas Girod wrote:
> Hi there.
>
> I have a list containing integer values from 0 to 255. With this list I
> have informations width and height, as width * height = len(my_list)
>
> What I want to do is to convert this array into a pixmap of dimension
> width * height in order to draw it in
Hi group,
just out of curiosity, is there a list of all the syntactic sugar that
is used in python? If there isn't such a list, could it be put on a
wiki somewhere? The bit of sugar that I do know have helped me a lot in
understanding the inner workings of python.
To give a few examples (might no
> Use the exec statement without the in-clause to get the desired effect:
>
> >>> def f():
> ... a = "a"
> ... exec "a = 'B'"
> ... print a
> ...
> >>> f()
> B
>
Well... I *do* realize that. But this is *not* my problem. I have a
function with another nested one. If I used "exec ..."
Fredrik Lundh schreef:
> John Machin wrote:
>
>>> $ python2.4 -mtimeit -s "str = 'D c a V e r \" = d w o r d : 0 0 0 0 0 6
>>> 4 0'" 'str.replace(" ", "")'
>> Oi! The OP mentioned "whitespace" ...
>
> yeah. but as is obvious from his examples, he really means "UTF-16", not
> whitespace.
Yes, tha
Grzegorz ¦lusarek:
>I sending email using standard python modules smtplib, email,
>coding email in utf but subject of message is not coded properly. In
>subject i use my national characters (polish) and after send i get XX in
>place these characters.
>Here is the code
>
>Message = email.message_
Bas:
>just out of curiosity, is there a list of all the syntactic sugar that
>is used in python?
http://docs.python.org/ref/specialnames.html
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 14 Apr 2006 02:54:11 -0700, Bas wrote:
> Hi group,
>
> just out of curiosity, is there a list of all the syntactic sugar that
> is used in python? If there isn't such a list, could it be put on a
> wiki somewhere? The bit of sugar that I do know have helped me a lot in
> understanding the
>
> So when you exec 'a = "B"' in globals(), locals() you might think you
> were changing the local namespace. In fact you are changing a copy of
> the local namespace:
>
Well, that explains much, but not all that I want to be explained. Why?
Because now I understand, that by invoking
exec "a =
Hi,
If I try to print a negative integer as a hexadecimal, I get the
following error:
FutureWarning: %u/%o/%x/%X of negative int will return a signed string
in Python 2.4 and up
For example:
>>> print "%X" % -1
__main__:1: FutureWarning: %u/%o/%x/%X of negative int will return a
signed string in
>That kind of depends on what you mean by syntactic sugar.
Mightbe I was misusing the name of syntactic sugar, but I what I
intended to say was "all the possible 'transformations' that can be
made to reduce all the 'advanced' syntax to some sort of minimal core
of the language".
Bas
--
http://m
hi
just curious , if i have a code like this?
def a():
def b():
print "b"
def c():
print "c"
how can i call c() ??
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
No matter how I try, I just can't find this GdkColor class. I'm trying
to convert some data into a pixmap in order to display it. Here is my
code :
import pygtk
pygtk.require('2.0')
import gtk
xbm = """#define dump_width 4
#define dump_height 4
static unsigned char dump_bits[] = { 0xaa, 0x6c,
Thank you for your reply.
Yes I have read the documentation. But I am not sure what is the SB/SE
suboption. Is this a suboption on the remote machine or for Python.
Maybe you could be so kind and explain it to me with a little code example.
Thany you very much!
Arne
"Dennis Lee Bieber" <[EMAIL
According to the docs, %g formatting is "Same as "e" if exponent is
greater than -4 or less than precision, "f" otherwise." So I would
expect that for any num, '%g'%num == '%e'%num or '%g'%num == '%f'%num.
But this is not the case in fact:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 b
Jerry wrote:
> Kind of like AppleScript then?
Same fundamental goal, i.e. language-independent application scripting.
They seem to have a similar sort of approach to decoupling a scripting
language from its host application (Kross::API::ScriptManager vs. the
Open Scripting Architecture API) but a
[EMAIL PROTECTED] wrote:
> hi
> just curious , if i have a code like this?
>
> def a():
> def b():
> print "b"
> def c():
> print "c"
>
> how can i call c() ??
c is a name in the local scope of a(). You can call c from within a,
where the name is in scope, or you can return c or in
On 14 Apr 2006 04:37:54 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> def a():
> def b():
> print "b"
> def c():
> print "c"
>
> how can i call c() ??
Function c() is not meant to be called from outside function a().
That's what a nested function is for: localizing it's usage a
I found an answer :
color = gtk.gdk.Color()
and then use color for fg et bg
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-04-14, Sergei Organov <[EMAIL PROTECTED]> wrote:
> Dennis Lee Bieber <[EMAIL PROTECTED]> writes:
>> It always means bind... But if the LHS is a mutable object, AND you
>> have specified a component of that object, it is the component that is
>> being rebound...
>>
>> lst[:] = []
Kelie wrote:
> Hello,
>
> I'm trying to analyze some autolisp code with python. In the file to
> be analyzed there are many functions. Each function begins with a
> "defun" statement. And before that, there may or may not have comment
> line(s), which begins with ";". My goal is to export each
> That kind of depends on what you mean by syntactic sugar. For instance, I
> wouldn't call any of your examples syntactic sugar.
AFAIK that is exactly what syntactic sugar means. Apart from non-strictness,
all syntax can be expressed by function application. Even
foo.bar()
is nothing but
bar
Thx for the help in finding the search page for this mailing list!!
BartlebyScrivener pointed me to the right place.
>From there
http://groups.google.com/group/comp.lang.python
, I found what I needed
I also discovered I can load mysql-python on my mac fairly easily, if I use
Darwin Ports.
http:
Hi!
what's the standard way for a "for" loop with float increments?
Anton
--
http://mail.python.org/mailman/listinfo/python-list
If you don't write or otherwise maintain Python Extension Modules
written in C (or C++) or embed Python in your application,
you can stop reading.
Python 2.5 alpha 1 was released April 5, 2006. The second alpha
should be released in a few weeks. There are several changes
which can cause C extens
Awesome, thanks for the explaination. It was very informative.
--
http://mail.python.org/mailman/listinfo/python-list
Hi Harry,
* Harry George <[EMAIL PROTECTED]> wrote:
> Fabian Braennstroem <[EMAIL PROTECTED]> writes:
>
>> Hi,
>>
>> I am pretty new to python and will use it mainly in
>> combination with scientific packages. I am running ubuntu
>> breezy right now and see that some packages are out of date.
>>
Aahz a écrit :
> In article <[EMAIL PROTECTED]>,
> Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote:
>
>>Em Ter, 2006-04-11 Ã s 07:17 -0700, Aahz escreveu:
>>
>>>Can, yes. But should it? The whole point of adding the () option to
>>>classes was to ease the learning process for newbies who don't
>
http://www.medievaltours.ro/en/about.php";>http://www.medievaltours.ro/en/about.php";>http://www.medievalart.ro/img/img-cavaler.gif"; border="0"
height="155" width="92">Discover
Medieval Romaniahttp://www.medievalart.ro/img/logo-medieval.gif"; height="139"
width="99">http://www.medievaltours.ro/
Kent Johnson wrote:
> According to the docs, %g formatting is "Same as "e" if exponent is
> greater than -4 or less than precision, "f" otherwise." So I would
> expect that for any num, '%g'%num == '%e'%num or '%g'%num == '%f'%num.
> But this is not the case in fact:
>
> Python 2.4.3 (#69, Mar 29
Are you saying you're on Windows?
If so, try:
http://www.activestate.com/Products/ActivePython/
It's a one-click, msi install with everything you need for win32,
including IDE etc.
Only thing to watch for is that sometimes the msi file won't install
from a logical drive other than c:\. So if yo
On 2006-04-14, Arne <[EMAIL PROTECTED]> wrote:
> Yes I have read the documentation. But I am not sure what is
> the SB/SE suboption. Is this a suboption on the remote machine
> or for Python. Maybe you could be so kind and explain it to me
> with a little code example.
SB/SE are used for telnet p
[EMAIL PROTECTED] wrote:
> just curious , if i have a code like this?
>
> def a():
> def b():
> print "b"
> def c():
> print "c"
>
> how can i call c() ??
in the same way as you'd access the variable "c" in this example:
def a():
c = 10
(that is, by calling the function
Hi,
I need to decompress zip archive. I wrote a parser of zip file, i obtain
the compressed data, but when i call zlib.decompress(data) on them,
it throws this error:
decbuf = decompressor.decompress(compressed_data)
error: Error -3 while decompressing: unknown compression method
I try to compre
Hi,
I need to decompress zip archive. I wrote a parser of zip file, i obtain
the compressed data, but when i call zlib.decompress(data) on them,
it throws this error:
decbuf = decompressor.decompress(compressed_data)
error: Error -3 while decompressing: unknown compression method
I try to compr
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi
> just curious , if i have a code like this?
>
> def a():
> def b():
> print "b"
> def c():
> print "c"
>
> how can i call c() ??
Your function 'a' is it's own little world where functions 'b' and 'c'
exist.
Your code ins
On 14 Apr 2006 06:11:38 -0700,
[EMAIL PROTECTED] wrote:
> what's the standard way for a "for" loop with float increments?
Use a while loop instead:
f = initial_value
while f <= final_value:
process(f)
f = f + increment
Note that there is no general guarantee that f will
Thomas Bartkus wrote:
> I, for one, am so glad to have nested functions again ;-)
again ?
Python has always supported nested functions. it's the scoping rules
that have changed; before the change from LGB to LEGB, you had to
explictly import objects from outer scopes.
--
http://mail.pytho
[EMAIL PROTECTED] wrote:
> Hi!
>
> what's the standard way for a "for" loop with float increments?
AFAIK there is no, but you should be easily able to write an frange
yourself:
def frange(from, to, step):
while from < to:
yield from
from += step
for x in frange(10.5, 23.4, 0
Duncan Booth wrote:
> Steven Bethard wrote:
>
>> Should users of the make statement be able to determine in which dict
>> object the code is executed? The make statement could look for a
>> ``__make_dict__`` attribute and call it to allow things like::
>>
>> make Element html:
>> ma
Hi,
I'm trying to embed python into an chat bot I've made in c++. After
googling around and reading docs for almost a day I have a few
questions. First of all it seems like the best way to be able to run
separate scripts in different, isolated environments is to create a
sub-interpreter (by us
Jan Prochazka wrote:
> Hi,
> I need to decompress zip archive. I wrote a parser of zip file, i obtain
> the compressed data, but when i call zlib.decompress(data) on them,
> it throws this error:
>
> decbuf = decompressor.decompress(compressed_data)
>
> error: Error -3 while decompressing: unknow
Kent,
Running
path = "d:/emacs files/emacsinit.txt"
lines = open(path).readlines()
# my defun lines are lowercase,
# next two lines are all on one
starts = [i for i, line in enumerate(lines) if
line.startswith('(defun')]
for i, start in starts:
while start > 0 and lines[start-1].startswith(';
Em Sex, 2006-04-14 às 07:47 -0700, BartlebyScrivener escreveu:
> starts = [i for i, line in enumerate(lines) if
> line.startswith('(defun')]
This line makes a list of integers. enumerate gives you a generator that
yields tuples consisting of (integer, object), and by "i for i, line"
you unpack the
Michael Ekstrand napsal(a):
> Jan Prochazka wrote:
>
>> Hi,
>> I need to decompress zip archive. I wrote a parser of zip file, i obtain
>> the compressed data, but when i call zlib.decompress(data) on them,
>> it throws this error:
>>
>> decbuf = decompressor.decompress(compressed_data)
>>
>> erro
Em Sex, 2006-04-14 às 17:14 +0200, Jan Prochazka escreveu:
> Here is my module for parsing zip files:
1) Have you checked the source of Python's zipfile module?
> import struct, zlib
>
> class ZipHeaderEntry:
> name = ''
> offset = 0
> uncomlen = 0
> comlen = 0
2) You know that
News wrote:
> Hi everyone,
>
> My goal is to pull command switches/options from a file and then assign
> the values to select variables which would eventually be included in a
> class object.
>
> The data file looks something like this but the switches could be in any
> order and not all may be u
[EMAIL PROTECTED]
>> what's the standard way for a "for" loop with float increments?
[Dan Sommers]
> Use a while loop instead:
>
> f = initial_value
> while f <= final_value:
> process(f)
> f = f + increment
>
> Note that there is no general guarantee that f will actually b
Steven Bethard wrote:
> Duncan Booth wrote:
>> Steven Bethard wrote:
>>
>>> Should users of the make statement be able to determine in which dict
>>> object the code is executed? The make statement could look for a
>>> ``__make_dict__`` attribute and call it to allow things like::
>>>
>>> mak
I haven't compared them, and you may be exacly right.
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Yes, thanks. I was just going to reinstall anyway. That usually fixes
it.
Rick
--
http://mail.python.org/mailman/listinfo/python-list
Em Sex, 2006-04-14 às 09:31 -0600, Steven Bethard escreveu:
> [1] Here's the code I used to test it.
>
> >>> def make(callable, name, args, block_string):
> ... try:
> ... make_dict = callable.__make_dict__
> ... except AttributeError:
> ... make_dict = dict
> ... bloc
Felipe Almeida Lessa napsal(a):
>Em Sex, 2006-04-14 às 17:14 +0200, Jan Prochazka escreveu:
>
>
>>Here is my module for parsing zip files:
>>
>>
>
>1) Have you checked the source of Python's zipfile module?
>
>
Nice, i thought, that zipfile is written in C, it should be possible to
solve
BartlebyScrivener wrote:
> Kent,
>
> Running
>
> path = "d:/emacs files/emacsinit.txt"
> lines = open(path).readlines()
> # my defun lines are lowercase,
> # next two lines are all on one
> starts = [i for i, line in enumerate(lines) if
> line.startswith('(defun')]
> for i, start in starts:
>
I'm trying to learn about Python and XML. I would like to be able
to add standalone="no" to my xml declaration when writing an xml file,
but I am unable to figure out how. So far, I have the following
code:
import xml.dom.minidom
doc2 = xml.dom.minidom.Document()
print doc2.toxml('iso-8859-1')
Felipe Almeida Lessa wrote:
> Em Sex, 2006-04-14 às 09:31 -0600, Steven Bethard escreveu:
>> [1] Here's the code I used to test it.
>>
>> >>> def make(callable, name, args, block_string):
>> ... try:
>> ... make_dict = callable.__make_dict__
>> ... except AttributeError:
>>
Raymond, I suspect we're not seeing eye to eye on this issue, but I do
appreciate you taking the time and effort. Thank you. My comments follow.
On Thu, 13 Apr 2006
09:34:46 -0700, Raymond Hettinger wrote:
> Both the pros and cons
> were quipped with abrupt perjoratives so the bullet points could
Hi,
Is it possible to define a packed C structure in python and pass it to the c
module, or should the wrapper do that ?
Regards,
Philippe
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have written the following script to illustrate a problem in my code:
class BaseClass(object):
def __init__(self):
self.collection = []
class MyClass(BaseClass):
def __init__(self, name, collection=[]):
BaseClass.__init__(self)
self.name = name
se
Philippe Martin wrote:
> Is it possible to define a packed C structure in python and pass it to the c
> module, or should the wrapper do that ?
You can create a packed structure using string concatenation, and with
the help of the struct module. However, this gives you a string object
in the end,
That's it. Thank you! Very instructive.
Final:
path = "d:/emacs files/emacsinit.txt"
lines = open(path).readlines()
# next two lines all on one
starts = [i for i, line in enumerate(lines) if
line.startswith('(defun')]
for i, start in enumerate(starts):
while start > 0 and lines[start-1].start
Some time ago I bought a newer computer with W2000 already on it so I moved my
old drive
to it as secondary( python was installed on non primary partition ).
Not sure if the .msi installers were broken before, but they are now (on this
installation)
and the reason I can't move to brand new instal
Em Sex, 2006-04-14 às 09:18 -0700, wietse escreveu:
> def __init__(self, name, collection=[]):
Never, ever, use the default as a list.
> self.collection = collection
This will just make a reference of self.collection to the collection
argument.
> inst.collection.append(i)
A
Em Sex, 2006-04-14 às 13:30 -0300, Felipe Almeida Lessa escreveu:
> To solve your problem, change
> def __init__(self, name, collection=[]):
> BaseClass.__init__(self)
> self.name = name
> self.collection = collection # Will reuse the list
> to
> def __init__(self,
Thanks,
It's a pretty big structure: painfull to pass each item as a param.
Regards,
Philippe
"Martin v. Löwis" wrote:
> Philippe Martin wrote:
>> Is it possible to define a packed C structure in python and pass it to
>> the c module, or should the wrapper do that ?
>
> You can create a pack
Steven Bethard wrote in news:[EMAIL PROTECTED]
in comp.lang.python:
> Open Issues
> ===
>
> Does the ``make`` keyword break too much code? Originally, the make
> statement used the keyword ``create`` (a suggestion due to Nick
> Coghlan). However, investigations into the standard librar
Paul Rubin wrote:
> [EMAIL PROTECTED] writes:
> > Here's my question: Suppose a form has more than one submit button.
> > Now the COM 'form' object has a 'submit' method that doesn't take any
> > arguments, so how do I tell it which button I want to press?
>
> What difference does it make? Don'
Felipe Almeida Lessa wrote:
> Em Sex, 2006-04-14 às 09:31 -0600, Steven Bethard escreveu:
>> [1] Here's the code I used to test it.
>>
>> >>> def make(callable, name, args, block_string):
>> ... try:
>> ... make_dict = callable.__make_dict__
>> ... except AttributeError:
>> ...
Philippe Martin wrote:
> It's a pretty big structure: painfull to pass each item as a param.
So how else would you like to pass them? Define the API you want,
and then just implement it. It still shouldn't require to define
the layout in Python.
Regards,
Martin
--
http://mail.python.org/mailman/
>> Not sure if the .msi installers were broken before,
>> but they are now (on this installation)
Are you installing from c:\ ?
With administrator rights?
Check other requirements. It chokes if you are installing from another
logical drive, e.g., d:\
http://aspn.activestate.com/ASPN/docs/Active
Szabolcs Berecz wrote:
> On 14 Apr 2006 04:37:54 -0700, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>
>>def a():
>> def b():
>>print "b"
>> def c():
>>print "c"
>>
>>how can i call c() ??
>
>
> Function c() is not meant to be called from outside function a().
> That's what a nested
Well,
The call actually is an IOCtl: depending on the control code, the structure
has a different format.
Although the number of control codes/structures is finite, it would make the
wrapper function fairly large.
You seem to think that building the structure from python would be a
mistake: why
[EMAIL PROTECTED] wrote:
> If I try to print a negative integer as a hexadecimal, I get the
> following error:
print "%X" % -1
> __main__:1: FutureWarning: %u/%o/%x/%X of negative int will return a
> signed string in Python 2.4 and up
>
>
> Does that mean that in the future it will
This is new to me. I did not know that emacs HAD a word star mode.
I may have to look at emacs again (last time was 1995).
I am still looking for a python editor I like. Yes I used to write asm
code in
wordstar in nondocument mode. And yes all of the old dos editors used
the wordstar keys. Eve
On Fri, 14 Apr 2006 13:30:49 -0300, Felipe Almeida Lessa wrote:
> Em Sex, 2006-04-14 às 09:18 -0700, wietse escreveu:
>> def __init__(self, name, collection=[]):
>
> Never, ever, use the default as a list.
Unless you want to use the default as a list.
Sometimes you want the default to mutat
I came across an interesting (as in the Chinese curse) problem today. I
had to modify a piece of code using generator expressions written with
Python 2.4 in mind to run under version 2.3, but I wanted the code to
continue to use the generator expression if possible.
My first approach was to use a
I am new to python and I love it. I am hacking a file. I want to not
print a line if it contains the word 'pmos4_highv'. I also don't want
to print the next line. The following code works but it "smells bad"
and just doesn't look right. I was reading about generators. If I was
using one, I could do
BartlebyScrivener wrote:
>>>Not sure if the .msi installers were broken before,
>>>but they are now (on this installation)
>
>
> Are you installing from c:\ ?
almost never
>
> With administrator rights?
>
pretty sure "YES"
> Check other requirements. It chokes if you are installing from anothe
Hi Arne
On 2006-04-12 18:05, Arne wrote:
> I am working on Windows XP and I want to do the following:
>
> 1. Connecting to a server using ftp
> 2. Getting the directory structure and the size of each directory in the
> root
> 3. Getting the owner of a file
>
> All these steps I want to do with
Em Sáb, 2006-04-15 às 04:03 +1000, Steven D'Aprano escreveu:
> Sometimes you want the default to mutate each time it is used, for example
> that is a good technique for caching a result:
>
> def fact(n, _cache=[1, 1, 2]):
> "Iterative factorial with a cache."
> try:
> return _cache
Cool. I hope I got the bits about Kross right; I only just found out
about it from seeing your post so haven't been long learning about it
(I'm a sucker for this stuff). Hopefully some nice expert can correct
anything I may've got wrong. :)
BTW, if you're curious about how Python hooks into this s
Steven D'Aprano wrote:
> I came across an interesting (as in the Chinese curse) problem today. I
> had to modify a piece of code using generator expressions written with
> Python 2.4 in mind to run under version 2.3, but I wanted the code to
> continue to use the generator expression if possible.
1 - 100 of 158 matches
Mail list logo