y. Look at the HTMLParser module too; depending on your needs, it
may be easier to use.
> -- Original message ------
> From: "Gabriel Genellina" <[EMAIL PROTECTED]>
>> En Thu, 05 Jul 2007 20:23:08 -0300, <[EMAIL PROTECTED]> escribió:
cordingly.
Picasso: a Python-controlled robot for doing paintings
http://youtube.com/watch?v=PsbKq5Kysj0
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
d by common horse carts
at the time. (Some people goes beyond that and say it was the same width
as used in the Roman empire but this may be just a practical coincidence,
no causality being involved).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
program because __file__ may contain a relative path
(and will give a wrong result after changing the current directory).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
list support, thats fine. But
> it's hardly incorrect to configure it with the reply-to set to the
> list, either.
No, it's not correct to modify Reply-To. Some reasons:
http://www.unicom.com/pw/reply-to-harmful.html
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
quot;abc" * 5 (gives "abcabcabcabcabc")
[1,2,3] * 8 (gives a list with 24 numbers)
(4,"z") * 2 (gives (4,"z",4,"z"))
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
.abspath(__file__))
# when opening the file
f = open(os.path.join(dat_path, "filename.dat"))
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
you mean.
The short answer is: don't place standalone scripts inside a package; see
this thread:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/c44c769a72ca69fa/
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
estr('content.xml', content.toxml().encode('utf-8'))
In general, when working with unicode, it's best to decode bytes into
unicode as early as possible (when reading input), process only unicode
inside the program, and encode into bytes at the last step (when writing
ard but not as wide as the original GWR.
Now most of the passenger lines are defunct and cargo lines trend to use
narrow gauge = 1000mm so the proportion may be much smaller now.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ctly 3 characters, the second being a single backslash. The \ is the
escape character; to include an actual \ inside a string, you have to
double it. Another way is to use raw string literals (supressing escape
processing): r"a\\b" contains four characters.
See section 3.1.2 in the P
ogram, but i want to make this in python.
Good luck!
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
if value[:2]=="0x":
return int(value, 16)
else:
return int(value)
Using lxml <http://codespeak.net/lxml/> you could use XPath notation to
simplify the navigation a little.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 10 Jul 2007 13:13:54 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
escribió:
> I want to serialize datetime.datetime.now() object . I could convert it
> to
> string but how do I get a datetime object back from the string?
> Any suggestions?
Use the pickle mo
really. If all % were escaped automatically,
there is no way to write a templatized value. Maybe SafeConfigParser.set
should grow an escape argument, controlling whether one wants the value
escaped or not. For compatibility reasons should default to False, for
usability reasons should default to True.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
olumns might be converted or reencoded in some way, binary data
should never be modified in any way.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
to the problem "Which is
the largest number that can be written with only 3 digits?"
Some people stop at 999, others try 99**9 and 9**99, and the winner is
9**9**9, or:
| 9
| 9
| 9
Sorry, couldn't resist.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 11 Jul 2007 17:34:04 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribió:
> If only there was a built-in base 2 conversion.
No builtin, but you can find uncountable versions if you search this
group, or the Python cookbook, or the entire web...
--
Gabriel Genellina
mExit:
py> help(sys)
Help on built-in module sys:
[...]
excepthook -- called to handle any uncaught exception other than
SystemExit
Unfortunately help(sys.excepthook) does not provide the same information,
neither the docs for the sys module. (Should be corrected...)
--
Gabr
En Thu, 12 Jul 2007 07:30:05 -0300, Nick Craig-Wood <[EMAIL PROTECTED]>
escribió:
> Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> En Wed, 11 Jul 2007 16:39:17 -0300, Paul McGuire <[EMAIL PROTECTED]>
>> escribió:
>>
>> > As was
>> > po
s. You have to write and read the "text"
>> files in binary mode or they break if taken across platform boundaries
>> because of the different line endings in Linux and Windows for instance.
>>
>
> It's fine as long as you use universal line endings mode.
En Thu, 12 Jul 2007 09:30:34 -0300, Ben Finney
<[EMAIL PROTECTED]> escribió:
> "Gabriel Genellina" <[EMAIL PROTECTED]> writes:
>
>> "Which is the largest number that can be written with only 3
>> digits?" Some people stop at 999, others
to use the sequence protocol,
starting at 0; that is, tries to get msg[0]. Message objects support the
mapping protocol, and msg[0] tries to find a *header* 0, converting the
name 0 to lowercase, and fails miserably.
Try with:
for msg in mbox:
print msg
or read the MaildirMessage (and Message) docs to see the ways you can
handle it.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ot;LATIN SMALL LETTER A
WITH ACUTE"; if not, Python thinks your terminal uses a different encoding
than the actual one.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
27;m not convinced this is absolutely the right way to do things, but at
least it's less bug prone.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ts contents
and properties. Modifying an object is not the same as rebinding its name:
x = [1,2,3]
y = x
x[1] = 4
print x # [1, 4, 3]
print y # [1, 4, 3]
x = [1,2,3]
y = x
x = [1,4,3]
print x # [1, 4, 3]
print y # [1, 2, 3]
You can test is two names refer to the same object using the is operator:
x is y. You will get True in the first case and False in the second case.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
have to assume that the error is being generated by some other
> modules loading in the grooves.py stuff ... but really have no idea.
>
> Is there anything I can do to trace though this and get it working
> properly?
See http://effbot.org/zone/import-confusion.htm
Try to move the circular references later in the code (maybe inside a
function, when it is required), or much better, refactor it so there is no
circularity.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ist(csv.reader(open('some.csv', 'rb')))
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ntinue learning Python.
I think you will like it in the near future. But for someone coming from
the microcontroller world, used to think closely in terms of the
implementation, this may be a big paradigm shift.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
message should mean iterating over its headers... Anyway,
if you want to iterate over all the message headers, the simplest way is
using msg.keys()
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
7;
3) shutil.copyfile copies ONE FILE at a time.
4) use glob.glob to find the desired set of files to be copied; and
perhaps you'll find copy2 more convenient.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
40.7 msec per loop
(Generating less values shows larger differences - anyway they're not
terrific)
So, as always, one should measure in each specific case if optimization is
worth the pain - and if csv files are involved I'd say the critical points
are elsewhere, not on how one creates the list of rows.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
Directorio de C:\TEMP
14/07/2007 00:13 4 output.bin
1 archivos 4 bytes
0 dirs 18.806.763.520 bytes libres
"strings" are "strings of bytes" in Python. (If you are mostly concerned
with characters, use unicode objects).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
e is
>> no
>> circularity.
>>
>> --
>> Gabriel Genellina
>
> Yes, thanks. I'd read that page before posting. Helpful.
>
> But, I still don't understand how python can access a function in a
> file I have NOT included. In this case, to get
ot;,"w").writelines(lines)
This of course reads the whole file in memory, but it's a compact way if
you require random line access.
If you can serialize the file operations, try using the fileinput module
with inplace=1.
(Having a true Tie::File implementation for Python would be a
e application's code clean and unified.
I don't see what you mean. You can always enumerate the message headers
using msg.keys(), along with has_key(), items(), etc. And what you want to
unify the code with?
Even if Message becomes iterable, I still don't see why should
o
significance)
(b) I don't consider a one-line function so much ugly, but ugliness is
subjective, so I won't comment further.
> Is there another way of achieving the same behaviour, that allow for
> pickling?
If you insist: Convert the defaultdict into a plain dict before pickling
module is the recommended practice.
See http://www.python.org/dev/peps/pep-0008/
I try only to import locally: a) when it is slow and not always needed,
and b) when the imported module is unrelated to the main purpose (e.g.
import traceback inside some exception handlers).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
serializer,
use pickle (or cPickle) instead.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
et)
# add a pair key, value
d[key].add(value)
The existence check and remove method do not change.
Dicts, lists and sets are documented here:
<http://docs.python.org/lib/types.html> and defaultdict
<http://docs.python.org/lib/defaultdict-objects.html>
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ge has an empty
__init__.py, or does not import grooves itself)
The OP was asking why the second form worked fine for him for a while, but
stopped working after reordering some imports. And the answer (according
to "Greg") is: some other module imported MMA.grooves, and that put
grooves into MMA namespace, available for everyone else.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
.f_lineno). Later, obtaining the class name from
those is a bit tricky (and not even the inspect module does it right), but
perhaps using the tokenizer module, watching for lines that contain
"class" is enough.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ne is available parse it itself. Is
> that
> something you've heard of?
See this (the first solution works on any platform; others are Windows
specific)
<http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html>
or try Google with those keywords.
QOTW: "That's a property of open source projects. Features nobody really
needs are not implemented." - Gregor Horvath
http://groups.google.com/group/comp.lang.python/msg/1fcefd79c7aa4832
"I'm working in a Java shop, with eclipse - one of the most intimate
IDE-lanaguage-relationships imaginabl
;
py> try:
... x = u"á".encode("ascii")
... except Exception,e:
... e.args += ("Sorry",)
... raise
...
Traceback (most recent call last):
File "", line 2, in
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in
position 0:
ordinal not in range(128)
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
.py")
py> get_attributes(f)
['mode', 'name', 'softspace']
The list keeps only the types explicitely enumerated. Other types are
excluded, as well as names starting with "_". Another criterion would be
`not attr.startswith('_') and not callable(getattr(obj,attr))`
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ed in the documentation but
> I couldn't find anything.
See this section in the tutorial
<http://docs.python.org/tut/node6.html#SECTION00670>.
If you want the dirty details: <http://docs.python.org/ref/calls.html>
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
til
> import os
>
> src = "c:\mydata\test\mygeo.mdb"
> dst = "v:\updated\data\mygeo.mdb"
Here you have another problem: \t inside a string means the TAB character.
You have to escape all backslashes or use a raw string:
that is, either use "c:\\myd
7;t hurt.
> I also heard of the inspect module, but I haven't checked it yet.
inspect.getmembers(the_module, inspect.isclass) would do. But this
requires the module to be importable.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 17 Jul 2007 11:05:17 -0300, Alex Popescu
<[EMAIL PROTECTED]> escribió:
> On Jul 17, 4:41 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> > On Jul 17, 1:44 am, Stef Mientki <[EMAIL PROTECTED]>
>> > wrote:
>> >>
families could go mostly unnoticed, as nothing bad would happen).
Regarding Python source files, their encoding declaration is now mandatory
when they contains any non ascii string.
(Reviewing the "What's new" documents would be a good idea anyway)
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
=', str(p)
> exec f1.func_code
> THIS RESULTS IN: "this is nf1" WHICH IS NICE
> exec f2.func_code
> THIS RESULTS IN: TypeError: f2() takes exactly 1 argument (0 given)
> WHICH IS EXPECTED
Instead of using exec, rebuild a new function from the unmarshalled code:
i
quot;.+" (even the non greedy forms); in this
case, I think you want the scan to stop when it reaches the ending
or any other tag, so use: [^<]* instead.
BTW, better to use a raw string to represent the pattern: pattern =
r"...\d+..."
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
into an array of numbers.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ne them as described before pycurl raises the TypeError
Python -with its long "batteries included" tradition- comes with two
powerful tools for diagnosing problems: print and repr
print "c.url", type(c.url), repr(c.url)
print "c.proxy", type(c.proxy), repr(c.pro
En Wed, 18 Apr 2007 18:09:03 -0300, Schwartz, Hillary
<[EMAIL PROTECTED]> escribió:
?
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
takes the current locale into account.
Grouping is applied if the third parameter is true.
py> locale.format('%.2f', 1234567.1234, True)
'1.234.567,12'
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
31...?
C/C++ == 1 most of the time (being C of any integer type, of course - for
arbitrary instances, see the always missing documentation).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ve the same type. If both are numbers, they are
converted to a common type. Otherwise, objects of different types always
compare unequal, and are ordered consistently but arbitrarily."
(Apart from the latter not menctioning string types too, looks good to me).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
oms. How much Python can be put in a nutshell? Almost nothing, so for
me, the famous book starts diminished from the title.
Or, I would not consider "sleepping tight" a good thing, I prefer big and
comfortable beds...
This is getting close to win the "longest off topic thread" award.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
file system.
For windows you can use the techniques described here:
http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
revision
And that's before the earliest tagged release I could find on svn, Python
0.98
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
call and most of the work is done in C code; the second does the iteration
in Python code and is about 4x slower.
> python -m timeit -s "b=dict.fromkeys(range(1));a={}" "a.update(b)"
100 loops, best of 3: 10.2 msec per loop
> python -m timeit -s "b=dict.fromkeys(range(1));a={}" "for key in b:
> a[key]=b[key]"
10 loops, best of 3: 39.6 msec per loop
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ut=outfile)
>> --
>> Michael Hoffman
>
>
> but what if i have python which is 2.4??
Omit the with statement:
import subprocess
outfile = open("test.out", "w")
try:
subprocess.check_call(["ls", "/etc"], stdout=outfile)
finally:
outfile.close()
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
gt;>>
>>> p = 0
>>> while text:
>>> p = text.find('parrot', p)
>>> do_something_with(buffer, p)
>>>
>>> which avoids copying text unnecessarily.
>>
>> ... but increases the care and attention required w
nd_integer(socket_s,a)
socket_s.send(chr(a))
> and receive like this:
> a=receive_integer(socket_s)
a = ord(socket_s.recv(1))
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 20 Apr 2007 23:48:02 -0300, Alex Martelli <[EMAIL PROTECTED]> escribió:
> Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>
>> Reference Manual, 5.9 Comparisons
>>
>> "The objects need not have the same type. If both are numbers, they are
>> co
xt()
> 777
> >>> x.next()
> 888
> >>> x.next()
>
> Traceback (most recent call last):
>File "", line 1, in
> x.next()
> StopIteration
> >>>
This time, the ((tuple) and None) is like saying "discard the tuple and
return None instead", and that fires the usual StopIteration.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
e? Should i not just be able to access the setIP()
> method
> by doing LocationService.setIP('192.168.1.1') Without having to create my
> own inited reference?
Not enough info, without knowing how LocationService is supposed to be
used. But as I said, the setIP call looks suspicious.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
En Sat, 21 Apr 2007 08:13:10 -0300, pradeep nair <[EMAIL PROTECTED]>
escribió:
> How do i determine the type of OS i'm working on using python??(i.e
> whether CentOS,Fedora,SLES,...along with the version)
os.uname()
If you need more detailed information try the platform mo
ithout further information, this would be the way.
What do you want to achieve? Maybe you are looking for the pickle module.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
or something.
You should try the other suggested classes, but if I had to choose among
these two, I'd use the first.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
> would want to do.
You can have a "persistent" state (stored in a backend database) and
"transitory" state (kept in session objects).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
AT__, hdr)
> return t
>
> is now taking > 13s when it was taking less than 0.8s before! (same
> number of calls, nothing changed except the set implementation)
I don't see where your SeaSet class is used.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
e predefined server
classes).
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
em.
>
> I was mistaken to believe that I had to know about attributes at the
> time of class creation. But your expample does not require that. Should
> have read this more carefully.
Welcome to Python and its dynamic nature!
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
En Mon, 23 Apr 2007 03:35:42 -0300, Martin Drautzburg
<[EMAIL PROTECTED]> escribió:
> Gabriel Genellina wrote:
>
>> En Sun, 22 Apr 2007 12:47:10 -0300, Martin Drautzburg
>> <[EMAIL PROTECTED]> escribió:
>>
>>> I was thinking that it would be nic
t of the program and make
> variables local to it?
Python does not have block scope; use a function instead. (It's hard to
define block scopes without variable declarations). Anyway that would make
any difference if you are using huge structures.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
> file.
Using two separate files?
out1 = open("output1.txt", "w")
out2 = open("output2.txt", "w")
...
if some_condition:
out1.write(...)
else:
out2.write(...)
...
out1.close()
out2.close()
(If that's not what you want, I may have misundertstood
time having arrays as their
ONLY structured type, so having a built in dictionary is not just an
optimization, it's a luxury! :)
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
. You could do this:
logfile = open("", "a+)
logfile.write("Command: %s\n" % cmd)
pipe = os.popen(cmd)
for line in pipe:
logfile.write(line)
pipe.close()
logfile.close()
Or try the subprocess module.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
thon. When trying to import calendar in IronPython, I
> get:
>
> SyntaxError: future feature is not defined: with_statement (c:
> \Python25\Lib\calendar.py, line 8)
You could download and use the calendar.py from the 2.4 installation.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
uld use pyWinAuto on Windows.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
2]"?
You can get the 2 as the errno exception attribute. BTW, 2 == errno.ENOENT
try:
export = open(self.exportFileName , 'w')
except IOError, e:
if e.errno==errno.ENOENT:
# handle the "No such file or di
e docs, on a function call like this:
def foo(**kwargs): pass
d = {'a':1, 'b':2)
foo(**d)
Python could bind the existing d object to the formal parameter kwargs and
still comply with the documented behavior. Some of my own code would break
if that happened... :(
--
Gab
cution
> of the program and output a simplified "call graph" to standard out.
> Please help me in this regard.
Maybe you find easier to use one of the existing profiling tools:
http://docs.python.org/lib/profile.html
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ecause there is not a "version 3" (yet).
Let's say, in the future, there is a version 3; the code could become:
if version == 3:
# new code to handle version 3 data
elif version == 2:
# code to handle version 2 data
# this is the current contents
else:
# error mess
tionary for a key like follows.
>
> It would be useful if there was some direct way to get the value
> associated with a key, and None if there's not one.
Such wonderful method exists since immemorial ages -at least since Python
1.5- and its magic name is "get":
belong to
> the "-t" switch and which are arguments (other than using the
> extension).
I can't verify right now, but I think that using -t "*.gpx" would avoid
the shell expansion. (Or perhaps '*.gpx' or \*.gpx or even -t*.gpx)
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
ms that have a POSIX thread (a.k.a. ``pthread'')
implementation."
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
etects that processing is complete, redirect to another page
showing the final results.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
OP methodology with a whole myriad of frameworks, orm's and
> object
> factories.
For a small in-house application, U$S 6000 per server (Coldfusion MX 7
Enterprise) or even U$S 1300 (Standard Edition) might be too much,
depending on the OP budget...
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
On 27 abr, 20:07, [EMAIL PROTECTED] wrote:
> That's what we need: a CopyMemory() routine.
See the copy and pickle modules.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
with SOAP/WSDL and I
> believe that would be more difficult than necessary. The client
> program I have to use does not support FTP.
I don't understand your question. Do you control the server, the client,
or both? Which one is in Python?
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
Joshua J. Kugler ha escrito:
> On Thursday 26 April 2007 14:07, Gabriel Genellina wrote:
>
> > En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler
> > <[EMAIL PROTECTED]> escribió:
> >> CPython only
> >> uses one
> >> CPU core right no
ode, adding a FILE parameter (let's
call it logfile) and replacing every printf("...", xxx) with
fprintf(logfile, "...", xxx); the same for related functions.
Yet another way, and perhaps the easiest and less intrusive on the C code,
would be to use freopen to repla
n you please tell me how to fix it? i get this error:
They go in the "setup" parameter, like this:
t1 = timeit.Timer("callFunc(line, i)","from __main__ import callFunc;
line=%r; i=%d" % (line, i))
If it gets much longer, try this:
setup = ""&q
and DOS ping programs have(never
>> stop, change size, change timeout).
>
> IIRC, MS ping has no "never stop", you can only say "repeat 9
> times".
ping -t hostname
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
odule to lock/unlock the file.
Locking just the first byte is enough.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
quot;" ?
Those things inside () are called "base classes"; this is "class"
inheritance; you create a new "class" inheriting from existing ones. That
is, you cant inherit from select, because select is a function, not a
class.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
901 - 1000 of 5091 matches
Mail list logo