I'll be doing a short presentation on my recent work on the StarPy
Asterisk Protocols for Twisted. These protocols allow Python programmers
to write Asterisk FastAGI and AMI customisation and management scripts
in the same process as code running any other Twisted clients/servers.
After that
Code available here:
http://littlelanguages.com/web/software/python/modules/cmdloop.py
Base class for writing simple interactive command loop environments.
CommandLoop provides a base class for writing simple interactive user
environments. It is designed around sub-classing, has a simple
Cameron Laird wrote:
In article [EMAIL PROTECTED],
Kay Schluehr [EMAIL PROTECTED] wrote:
.
.
.
Lucid in the mid 80s that gone down a few years later. As it turned out
that time Lisp was not capable to survive in what we call
nice! two little lines that do a boatload of work! hee hee
pth = '/Users/kpp9c/snd/01'
samples = [os.path.join(pth, f) for f in os.listdir(pth) if
f.endswith('.aif')]
thank you Kent! (and Jeremy and Magnus and Singletoned and I V ... and
john boy and mary ellen .. )
--
Hello All,
I am writing an application in C/C++ (VC++ 6.0 compiler) within which I want
to make calls using the python FTP client (ftplib).
I want to call (for example) after the necessary iniialization has been
done:
PyObject *t = PyObject_CallMethod (_FTP, retrlines, , LIST,
c_function);
Steven D'Aprano [EMAIL PROTECTED] writes:
Steven D'Aprano [EMAIL PROTECTED] writes:
What is an empty enum?
An empty enum is an enum with no identifiers, just like an empty list
is a list with no elements.
How and when would you use it?
The best I can come up with is that an empty enum would
myString = bar\foo\12foobar
print repr(myString)
My problem was that I wanted to know if there is a way of printing
unraw strings like myString so that the escape characters are written
like a backslash and a letter or number. My understanding was that
repr() did this and it does in most cases
Gerhard,
thanks, that
import os
os.environ[NLS_LANG] = German_Germany.UTF8
import cx_Oracle
con = cx_Oracle.connect(me/[EMAIL PROTECTED])
really helped. At least now the query returns something encoded
differently. I dared not to believe that there is no direct encoding
change api without
Well.. I hate to reply to my own post.. but here is an update..
When I flatten a 'mbox' mail message and suck it into a 'email' mail
message.. things look fine except that every MIME encoded section has a
'UNIX From' header added to the top of it and the From user is set
to 'nobody'..
Does
On 24 Feb 2006 14:12:05 + (GMT), Sion Arrowsmith
[EMAIL PROTECTED] wrote:
Franz Steinhaeusler [EMAIL PROTECTED] wrote:
On Thu, 23 Feb 2006 13:54:50 +, Martin Franklin
why not use string methods strip, rstrip and lstrip
because this removes only the last spaces,
[given r = 'erewr
On Sun, 26 Feb 2006 10:35:13 -0600, Tim Chase
[EMAIL PROTECTED] wrote:
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):
Start python, import wx and then do a help(wx) to see
what it can tell me.
I tried it on
Em Seg, 2006-02-27 às 00:43 -0800, Paul Rubin escreveu:
def print_members(header, e): # print header, then members of enum e
print header
for m in e:
print '\t', str(m)
months_longer_than_february = enum('jan', 'mar', 'apr', ) # etc
Ron Adam wrote:
Alex Martelli wrote:
Ron Adam [EMAIL PROTECTED] wrote:
...
Considering the number time I sort keys after getting them, It's the
behavior I would prefer. Maybe a more dependable dict.sortedkeys()
method would be nice. ;-)
sorted(d) is guaranteed to do exactly the same
I'm trying to write a numerology program where I have each letter
identified by a numerical value like
a=1
b=2
c=3
as so forth. I then input a name. How do I treat each letter as a
single value? That is, instead of print myname I have to do a print
m+y+n+a+m+e which returns a number. I next want
Etienne Desautels wrote:
Everything works well but one thing. My problem is that running
nextFrame() took, most of the time, more then 0,0414 sec. so my video
is lagging. I monitor every call and I found that the culprit is when I
read from the socket file handle. It's the only bottleneck in
Felipe Almeida Lessa [EMAIL PROTECTED] writes:
print_members('shorter:', months_shorter_than_february)
print_members('longer:', months_longer_than_february)
IMHO, you should be using sets, not enums. Something like:
If enums aren't supposed to work in that construction then the PEP
Kent Johnson wrote:
[a for b,a in sorted(zip(B,A))]
also, [a for _,a in sorted(zip(B,A))]
didn't read refs, tested above python-2.2.3.
--
Sun Yi Ming
you can logout any time you like,
but you can never leave...
--
http://mail.python.org/mailman/listinfo/python-list
Em Seg, 2006-02-27 às 02:42 -0800, Paul Rubin escreveu:
Felipe Almeida Lessa [EMAIL PROTECTED] writes:
IMHO, you should be using sets, not enums. Something like:
If enums aren't supposed to work in that construction then the PEP
shouldn't specify that they work that way.
Sorry, but where
AllanI hope this isn't too stupid of a question.
It's a simple problem, but it's not a stupid question, this is a
possible solution:
data = myname
radix = str(sum(ord(c)-96 for c in data))
while len(radix) 1:
radix = str(sum(int(c) for c in radix))
print The radix of:\n, data, \n\nIs:\n,
On Mon, 27 Feb 2006 00:43:45 -0800, Paul Rubin wrote:
Steven D'Aprano [EMAIL PROTECTED] writes:
What is an empty enum?
An empty enum is an enum with no identifiers, just like an empty list
is a list with no elements.
No, I don't think that is the case. A list is a container. You can take
On Mon, 27 Feb 2006 02:31:42 -0800, Allan wrote:
I'm trying to write a numerology program where I have each letter
identified by a numerical value like
a=1
b=2
c=3
as so forth. I then input a name. How do I treat each letter as a
single value? That is, instead of print myname I have to do
Hi,
I would know how to minimize a program (wxpython app) into an icon on
the taskbar on windows (the one at the side near the clock, i can't
remember what is it called.)
Is it easy to be done? Is there a way to do the same thing on Linux?
Thank You.
--
Gerard Flanagan wrote:
Hello all
Could anyone shed any light on the following Exception? The code which
caused it is below. Uncommenting the 'super' call in 'XmlNode' gives
the same error. If I make XmlNode a subclass of 'object' rather than
'list' then the code will run.
Thanks in
Simon Percivall wrote:
The error you're seeing is because you've rebound 'list' to something
else. Try putting list = type([]) somewhere above your code.
That's it! I had rebound 'list' earlier (in error), and though I
deleted the code it must have been remembered somehow. Restarting
Felipe Almeida Lessa [EMAIL PROTECTED] writes:
If enums aren't supposed to work in that construction then the PEP
shouldn't specify that they work that way.
Sorry, but where do they say that?
The PEP gives an example of iterating through the members of an enum.
I'm not sure if that's what
Hi
I just couldn't google up any docs or tutorial on how to set up
everything necessary to use pycurl on windows.
When I try running the pycurl setup I get a 'CURL_DIR' not found error,
but no where can I find a detailed explanation of what is this dir,
what dlls I need to install and where etc.
Steven D'Aprano [EMAIL PROTECTED] writes:
All of the machinery of the enum class created by Ben Finney is just to
make sure that red, green and blue behave correctly, without extraneous
string-like or number-like methods. Of course Ben could modify his code so
that enum() returned an object.
Mr BigSmoke wrote:
Hi All
how do i include directories into my project when using py2exe? I have
a module that has it's images directory and when it's searches it (into
../dist/library.zip/.../mymodule/) it generates an error because the
directory wasn't imported...
tnx
Fabio
You may
Op 2006-02-27, Steven D'Aprano schreef [EMAIL PROTECTED]:
Paul Rubin wrote:
Ben Finney [EMAIL PROTECTED] writes:
Enumerations with no values are meaningless. The exception
``EnumEmptyError`` is raised if the constructor is called with no
value arguments.
Why are empty enumerations not
Hi there,
Is there a way of making 'utf-8' default codec for the whole program, so
I don't have to do .encode('utf-8') every time I print out a string?
--
Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across
Hi !
I have an application that I compile to exe.
1.)
I want to compile main.ico into exe, or int zip. Can I do it ?
2.)
Can I compile the result to my specified directory, not into the dist ?
I want to structure my projects like this:
\src\
python codes, etc.
\res\
icons, etc
\bin\
the
Paul Ertz wrote:
Hello,
We would like to hide the left column for the main/home page of our
plone sites dynamically using a tal: expression.
Then please post on a Zope/Plone related mailing-list.
--
bruno desthuilliers
python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
Sounds like homework to me.
Sorry Steven, you may be right, next time I'll be more careful.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Nikola Skoric napisał(a):
Is there a way of making 'utf-8' default codec for the whole program, so
I don't have to do .encode('utf-8') every time I print out a string?
Bad idea. You may accidentally break some libraries that depend on ASCII
being default standard.
--
Jarek Zgoda
Franz Steinhaeusler wrote:
On Sun, 26 Feb 2006 10:35:13 -0600, Tim Chase
[EMAIL PROTECTED] wrote:
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):
Start python, import wx and then do a help(wx) to see
Hi !
I want to set the temp. build directory that it is does not placed in
python source directory.
I want to set this:
\bin\
compiled version
\src\
python source
\tmp\
temp build dir
How to I do it ?
Thanx for help:
dd
--
http://mail.python.org/mailman/listinfo/python-list
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
dict1 = {1:23,2:76,4:56}
dict2 = {23:'A',76:'B',56:'C'}
dict((k, dict2[v]) for k, v in dict1.items())
{1: 'A', 2: 'B',
[EMAIL PROTECTED] wrote:
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
dict1 = {1:23, 2:76, 4:56}
dict2 = {23:'A', 76:'B', 56:'C'}
dict((key, dict2[value]) for key, value in
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
d1={1:23,2:76,4:56}
d2={23:a, 76:b, 56:c}
result = dict([(d1k,d2[d1v]) for (d1k, d1v) in d1.items()])
result
{1: 'a', 2: 'b', 4: 'c'}
If
On 27 Feb 2006 04:55:15 -0800, André [EMAIL PROTECTED] wrote:
Franz Steinhaeusler wrote:
On Sun, 26 Feb 2006 10:35:13 -0600, Tim Chase
[EMAIL PROTECTED] wrote:
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was
Op 2006-02-27, [EMAIL PROTECTED] schreef [EMAIL PROTECTED]:
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
Well how about the straight forward:
dict3 = {}
for key, value in dict1.iteritems():
As far as i know, gedit is the weak link, this is because of the way it
handles its whitespaces, had that trouble myself though not this
*severe*
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
Just copy/paste the following source code to a file and run it:
code
sourceCodeToExecute =
dict1 = { 1:23,2:76, 4:56
Steve Juranich wrote:
I might be a little confused about a couple of things (I'm sure many will
correct me if I'm not), but as I understand it the __slots__ attribute is a
class-attribute, which means it cannot be modified by an instance of the
class (think of a static class member, if you
It is indeed the problem. Thanks.
May be, this fact could have been mentioned in the documentation. I
have suggested the change using bug tracker.
Raghu.
--
http://mail.python.org/mailman/listinfo/python-list
Uniqueness imposes an odd constraint that you can't have
synonyms in the set:
shades = enum({white:100, grey:50, gray:50, black:0})
Blast, I hate responding to my own posts, but as soon as I
hit Send, I noticed the syntax here was biffed. Should have
been something like
shades =
Dolmans Sun wrote:
Kent Johnson wrote:
[a for b,a in sorted(zip(B,A))]
also, [a for _,a in sorted(zip(B,A))]
didn't read refs, tested above python-2.2.3.
Is there something here I can't see, or did you just
change a variable name and present that as another
solution?
--
How about DBdesigner4 or Dia as free ER diagrammers?
[EMAIL PROTECTED] wrote:
Thanks Olivier and Jonathan.
Do either of you, or anyone else, know of a good open source data
modeling / ER-diagram / CASE tools? I'd like to be able to build
relatively simple schemas in one open source tool
In article [EMAIL PROTECTED],
Steven D'Aprano [EMAIL PROTECTED] wrote:
But if you have a good usage case for an empty enum,
please feel free to tell us.
I could see empty enums being useful in machine-generated code, perhaps
when generating wrappers around C library APIs. There might be
Your tools are:
1. map lets you apply a function to every element of a list.
Strings are lists. (List comprehensions let you do the same thing, but
map is better to use if you are turning in homework).
2. sum lets you calculate the sum of all numbers in a list.
3. val and str let you turn
Don Taylor [EMAIL PROTECTED] wrote:
...
Does Python have the notion of static class attributes?
No.
Just what was going on when I redefined my __slots__ attribute?
Nothing.
It looks as if __slots__ is something really special, or I am managing
Yep: it acts at *class-creation time*, only
If I have an enum, how can I verify that it's a legal value? Can I do:
Weekdays = enum('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat')
def foo (day):
if day not in Weekdays:
raise ValueError
Also, do enums have __dict__ slots? Can I do something like:
day = 'sun'
print
On 27 feb 2006, at 10:13, Tim Chase wrote:
Uniqueness imposes an odd constraint that you can't have
synonyms in the set:
shades = enum({white:100, grey:50, gray:50, black:0})
Blast, I hate responding to my own posts, but as soon as I
hit Send, I noticed the syntax here was biffed. Should
I am trying to do the following using Python and Tkinter:
1) Display a window with 1 button
2) When user clicks the button, Python attempts to call a function
that opens a socket and listens for a connection - what I want to do
is, if the socket has been successfully opened and the system is
[EMAIL PROTECTED] wrote:
Please post your Python code. I don't see the problem you're
describing.
OK, here's a copy. This works on Mac/Unix/Linux yet has no effect on
Windows:
-
import os
import os.path
for root, dirs, files
[EMAIL PROTECTED] wrote:
Please post your Python code. I don't see the problem you're
describing.
OK, here's a copy. This works on Mac/Unix/Linux yet has no effect on
Windows:
-
import os
import os.path
for root, dirs, files
On Mon, 27 Feb 2006 03:13:08 -0600,
Tim Chase [EMAIL PROTECTED] wrote:
Same could go for days of the week:
dow=enum((sunday, 0), (monday, 1),
(start_of_work_week, 1), ... (friday, 5),
(end_of_work_week, 5)...)
Not really: In some parts of the world, calendar weeks begin on Monday
and end
Richard Townsend wrote:
On Fri, 24 Feb 2006 18:21:59 +0100, Magnus Lycka wrote:
Concerning element names, it's your coice of course, but I agree
more and more with Guido and PEP008 that camelCase is ugly. (Not
that ALLCAPS is better...)
I can see in PEP008 where it says
Nikola Skoric wrote:
Is there a way of making 'utf-8' default codec for the whole program, so
I don't have to do .encode('utf-8') every time I print out a string?
Explicit is better than implicit (so setting up a default codec is
considered bad practice). However, you could wrap an output
Alex Martelli wrote:
meant for extremely RARE use, and only by very advanced programmers who
fully know what they're doing
Yea, from the table of my memory I ’ll wipe away all trivial fond
records of __slots__
(Bet you wish Mark Lutz had not mentioned it in Learning Python ...)
Don.
--
D wrote:
I am trying to do the following using Python and Tkinter:
1) Display a window with 1 button
2) When user clicks the button, Python attempts to call a function
that opens a socket and listens for a connection - what I want to do
is, if the socket has been successfully opened and
kpp9c wrote:
Thank you... i was looking in the wrong place cause all i found was
this relatively useless doc:
http://docs.python.org/lib/module-os.html
which says almost nothing.
In one of its subsections, cleverly named Files and Directories,
I see a nice description of listdir.
Jarek Zgoda wrote:
They just hired Jim Starkey. Perhaps MySQL AB hopes he will write a
transactional engine for MySQL, as he previously wrote one for Interbase
(which is known to be one of the best a man could imagine).
Anyway, we got far off topic, so we better go somewhere else.
Ok, to
Peter Hansen wrote:
Magnus Lycka wrote:
With an operating system such as Windows, this is
probably something you can expect to happen, although
I'm surprised if such long lag times as 200 s are typical.
No way. I mean, I'm the biggest critic of Windows operating systems
when used in
Neil Hodgson wrote:
The only issue I'm having relates to Unicode. MoinMoin and python are
pretty unforgiving about files that contain Unicode characters that
aren't included in the coding properly. I've spent hours reading about
Unicode, and playing with different encoding/decoding
I'd love to know why calling ''.join() on a list of encoded strings
automatically results in converting to the default encoding. First of
all, it's undocumented, so If I didn't have non-ascii characters in my
utf-8 data, I'd never have known until one day I did, and then the code
would break.
Edward Loper wrote:
[...]
Surely there's a better way than converting back and forth 3 times? Is
there a reason that the 'backslashreplace' error mode can't be used with
codecs.decode?
'abc \xff\xe8 def'.decode('ascii', 'backslashreplace')
Traceback (most recent call last):
File
Jarek Zgoda [EMAIL PROTECTED] writes:
Bad idea. You may accidentally break some libraries that depend on ASCII
being default standard.
And what would those produce as output when fed with unicode data? How would
they handle this input? IMVHO nothing should rely on having a standard
charset
Sandra-24 wrote:
I'd love to know why calling ''.join() on a list of encoded strings
automatically results in converting to the default encoding. First of
all, it's undocumented, so If I didn't have non-ascii characters in my
utf-8 data, I'd never have known until one day I did, and then the
Claudio Grondi wrote:
I mean, that using time.clock() solves the problem, because the output
of the following code:
On Windows that it. At least on Linux and Solaris, time.clock() returns
CPU time. If time.clock() returns significantly different values before
and after time.sleep(1), there's
s = ' qazwsx '
# How are these different?
print s.strip()
print str.strip(s)
Do string objects all have the attribute strip()? If so, why is
str.strip() needed? Really, I'm just curious... there's a lot don't
fully understand :)
--
http://mail.python.org/mailman/listinfo/python-list
It is something of a navel (left over feature). xyz.strip() is (I
think) newer than string.strip()
--
http://mail.python.org/mailman/listinfo/python-list
It is something of a navel (left over feature). xyz.strip() is (I
think) newer than string.strip()
--
http://mail.python.org/mailman/listinfo/python-list
per9000 wrote:
...and there was much rejoicing... Even better, thanks - you guys are
the best.
import string, time, sys
sys.path.append(../../py_scripts)
Works just nice, and yes, I removed the env.variable before I tried it
:-D
The *right* thing to do might be to install the python
Ron Adam wrote:
Ron Adam wrote:
Alex Martelli wrote:
Ron Adam [EMAIL PROTECTED] wrote:
...
Considering the number time I sort keys after getting them, It's the
behavior I would prefer. Maybe a more dependable dict.sortedkeys()
method would be nice. ;-)
sorted(d) is guaranteed to do
I have a game file described here: http://iesdp.gibberlings3.net/ieformats/itm_v1.htm and I'm trying to read all the data:
plik = open('bow08.itm', 'rb')
try:
tekst = plik.read()
finally:
plik.close()
# char array - works
print tekst[0x0004:0x0004+4]
#
Thanks Kent! update_idletasks() does exactly what I needed, which as
you mentioned was just to give it enough time to reconfigure the
button.
Doug
--
http://mail.python.org/mailman/listinfo/python-list
rtilley wrote:
s = ' qazwsx '
# How are these different?
print s.strip()
print str.strip(s)
They are equivalent ways of calling the same method of a str object.
Do string objects all have the attribute strip()? If so, why is
str.strip() needed? Really, I'm just curious... there's a lot
Crutcher wrote:
It is something of a navel (left over feature). xyz.strip() is (I
think) newer than string.strip()
Yes, but the question as written was about str.strip() which is an
unbound method of the str class, not string.strip() which is a
deprecated function in the string module.
Kent
Jorge Godoy napisał(a):
Bad idea. You may accidentally break some libraries that depend on ASCII
being default standard.
And what would those produce as output when fed with unicode data? How would
they handle this input? IMVHO nothing should rely on having a standard
charset as input.
Steven D'Aprano [EMAIL PROTECTED] wrote
A list of X is like a box containing X,
and in another post
A list is a container.
I think it is misleading, if not wrong, to refer to Python collections as
'containers', 'boxes', or similar. A object in a box cannot be in another
disjoint box. A
Steve Holden [EMAIL PROTECTED] wrote:
Damn. More reading ...
Even more reading as of tomorrow, when I get my Web Application
Framework article up on my blog.
Even listing the vast number of frameworks toolkits out there is
daunting, so I figured I may as well share my own outlook.
And FWIW, I
I'm trying to implement a bookmark-url program, which accepts user
input and puts the strings in a dictionary. Somehow I'm not able to
iterate myDictionary of type Dict{}
When I write print type(myDictionary) I get that the type is
instance, which makes no sense to me. What does that mean?
Thanks
i've used python in the pastbut only for data
processing, writing to files, midifying files,
reading from files. now, my boss wants me to do some econometrics using python.
would anyone who has done this ( var, vecm,
cointegration, ols, kalman filter whatever) mind
sending me some sample
Kent Johnson wrote:
So...
s.strip() gets a bound method object from the class and calls it with no
additional argument.
str.strip(s) gets an unbound method object from the class and calls it,
passing a class instance as the first argument.
Kent
Thank you Kent. That's a very informative
Jeffrey Schwab [EMAIL PROTECTED] wrote:
I was wondering about treating it
wilth liberal amounts of Teak Oil or similar...
Some people, when confronted with a problem, think I know, I?ll use
Teak Oil. Now they have two problems.
+1 QOTW
BTW, I integrated a similar line into one of my
Hi,
I'm trying to debug QMTest from Code Sourcery with PDB from inside
Emacs.
My problem is that without PDB, I have no problem, but when I'm using
PDB,
I get exceptions thrown.
Has anyone else tried using PDB on QMTest?
My python is 2.2, and QMTest is 2.0.3.
Thanks / Claes
--
An example of the RARE use case may be this particular one
http://mail.python.org/pipermail/python-list/2004-May/220513.html
/Jean Brouwers
--
http://mail.python.org/mailman/listinfo/python-list
Cruella DeVille wrote:
I'm trying to implement a bookmark-url program, which accepts user
input and puts the strings in a dictionary. Somehow I'm not able to
iterate myDictionary of type Dict{}
When I write print type(myDictionary) I get that the type is
instance, which makes no sense to
I have some questions, 1) I am trying to have multiple def's but it is not working. for instance, i am using the tutoreals and am trying to combine the phone book as well as the grades..ect so that it would look somthing like this:def print_options(): print "options:" print " 'p' print
So what you are saying is that my class Dict is a subclass of Dict, and
user defined dicts does not support iteration?
What I'm doing is that I want to write the content of a dictionary to a
file, and send the dictionary (favDict) as a parameter like this:
favDict = Dict() -- my own class (or
This will at least allow me to ID folders that start with whitespace...
from within Windows too :) yet I still cannot rename the folders after
stripping the whitespace... attempting to gives an [Errno 2] No such
file or directory. The strip seems to work right too according to the
prints
Hi,
may I have a hint what the problem is in my situation?
Is it a syntax error in sweetone.odt or in xml.parsers.expat?
Same problem with different file instead of sweetone.odt means that it's not
the file that has a syntax error.
xml.parsers.expat is a standard module that probably has no
Can anyone give any suggestions on how to make a logarithmic (base 10)
x and y axis (loglog) plot in matplotlib? The scatter function doesn't
seem to have any log functionality built into it.
Thanks,
Derek Basch
P.S. I suck at math so feel free to make me feel stupid if it is really
easy to do
Katja Suess wrote:
may I have a hint what the problem is in my situation?
Is it a syntax error in sweetone.odt or in xml.parsers.expat?
xml.parsers.expat.ExpatError: syntax error: line 1, column 0
it's a problem with the file you're parsing (either because it's not a
valid XML file, or
Katja Suess napisał(a):
may I have a hint what the problem is in my situation?
Is it a syntax error in sweetone.odt or in xml.parsers.expat?
Same problem with different file instead of sweetone.odt means that it's
not the file that has a syntax error.
xml.parsers.expat is a standard module
Try this, don't know if this works for al versions:
from pylab import *
x=10**linspace(0,5,100)
y=1/(1+x/1000)
loglog(x,y)
show()
If you only need a logarithm along one axis you can use semilogx() or
semilogy(). For more detailed questions go to the matplotlib mailing
list.
Cheers,
Bas
--
I didn't mean that you'd have to write it for me, I meant that if what
you said works (atexit, signal) I will paypal you $10 for your generous
contribution to my project.
--
http://mail.python.org/mailman/listinfo/python-list
Cruella DeVille wrote:
So what you are saying is that my class Dict is a subclass of Dict, and
user defined dicts does not support iteration?
I don't know what your class Dict is, I was guessing. The built-in is
dict, not Dict.
What I'm doing is that I want to write the content of a
1 - 100 of 157 matches
Mail list logo