feature. Hiding XML language specific
behaviour directly in the Element classes really helps in getting your code
clean, especially in larger code bases.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
If you want a secure system, build it without having to run arbitrary code
from untrusted sources.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
beta) is
rather small, this version contains a large number of bug fixes found by
various users and testers. Thank you all for your help!
Stefan
Features added since 0.9.2:
* Element.getiterator() and the findall() methods support finding
arbitrary elements from a namespace (pattern {na
Kent Johnson wrote:
> Stefan Behnel wrote:
>> Hallo everyone,
>>
>> I have the honour to announce the availability of lxml 1.0.
>>
>> http://codespeak.net/lxml/
>>
>> It's downloadable from cheeseshop:
>> http://cheeseshop.python.org/pypi/lx
our server.
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Fozzie
> Sent: Monday, June 05, 2006 3:57 PM
> To: python-list@python.org
> Subject: embedding Python in COM server loaded with win32com
>
> Hi,
>
&g
r to lxml (if you want to do more than just parsing):
http://cheeseshop.python.org/pypi/lxml/1.1alpha
Why?
http://effbot.org/zone/celementtree.htm#benchmarks
http://codespeak.net/lxml/performance.html#parsing-and-serialising
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
> #-
>
> #module_pyrex.pyx
>
> def pyrex_update(self,val):
> print "pyrex module",val
What is the 'self' for? After all, you are sticking a /function/ into the
object, not a /method/. Your function will not receive a 'self' argument
automatically as it is stuck into the instance and not part of the class.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
hod. You can't call unbound methods without
specifying the object you want to call them on (i.e. the 'self' argument).
http://docs.python.org/tut/node11.html#SECTION001134
When you're using 'plain classes', you can do with them whatever you do in
standard Python, so replacing a method is just done with an attribute
assignment.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
akes the software easiest to maintain in the long
run. (If you don't know what the long run is, consider the
"medium run" and refactor later. :) )
> Now I do agree that it can become tricky to manage correctly wrt/ mro
> rules !-)
See? ;-) Software shouldn't be tricky (or only as tricky as
necessary). I value clarity over cleverness.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
lxml? It's pretty well documented.
http://codespeak.net/lxml
For the rest of the questions: please read the Python tutorial on python.org.
It's very helpful for beginners.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
y the EXSLT module.
Same for lxml, although it's currently only enabled in XSLT:
http://codespeak.net/lxml/api.html#xslt
Guess I should change that for 1.1...
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
getparent().remove(last)
last = myid
Internally, iterparse builds up a tree, so the last three lines are there to
remove the myid elements from the tree that were already handled. This saves a
lot of memory for large documents.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
living in the closer area and I don't think anyone of them uses Python.
Anyway, I wanted to announce it to the world so that people who expect to come
close to Bornhövede any time soon can contact me on this. The cost will be
somewhere near a bottle of wine per attendee to get my tongue movin
xpath, that gets me all of the tr.. i only want to get the
> sibling tr up until i hit a 'tr' that has a 'th' anybody have an idea as to
> how this query might be created?..
I'm not quite sure how this is supposed to be related to Python, but if you're
trying to
he output
> for the browser.
>
> I really am at a loss for what is going wrong, when everything works fine
> on crusty old 2.2.1. What are others doing for caputre, store, and output
> for web utf-8?
You didn't tell us what database you are using, which encoding your database
uses, which Python-DB interface library you deploy, and lots of other things
that might be helpful to solve your problem.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
import sys
>
> w = XMLWriter(sys.stdout)
>
> html = w.start("html")
[snip]
Note that the SimpleXMLWriter is in no way related to the ElementTree
implementation. Feel free to copy the module from the elementtree package and
use it with lxml.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
>
> Comments welcome.
No real comment, just to point out an alternative that works well for me:
http://docs.python.org/dev/lib/xmlrpc-client-example.html
Stefan Krah
--
http://mail.python.org/mailman/listinfo/python-list
It seems that the ocx only works in a GUI environment. Perhaps you could
try to embed
the ocx in a pythonwin dialog which you create invisible since the
dialog is then
a control container
see "Python24\Lib\site-packages\pythonwin\pywin\Demos\ocx\ocxtest.py"
Stefan
>
fter reading this, I still do not understand why you want to do this with
images. Virtually any GUI toolkit can display text, most can natively display
HTML, just look at Qt for a good example.
So why not just use the native features?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
c00i90wn wrote:
> Stefan Behnel wrote:
>> c00i90wn wrote:
>>> Hey, I'm having a problem with the xml.dom.minidom package, I want to
>>> generate a simple xml for storing configuration variables, for that
>>> purpose I've written the following code, b
n [1]: import win32com.client
In [2]: wmi = win32com.client.GetObject('winmgmts:')
In [3]: procs = wmi.ExecQuery('Select * from win32_process')
In [4]: for proc in procs:
...: print proc.Name
...:
System Idle Process
... [censored]
There are also python-pack
e considered immutable also
I guess you confuse this with tuples.
> but since it is a container
> type it behaves somewhat differently.
Again, this has nothing per se to do with being a container
though many containers are mutable objects and often are
modified in-place.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
What I expected was :
Attributes in XML are not ordered and no XML library will keep the order. All
you could do is serialise by hand, which is not that difficult either. Is
there any reason why you might want to keep the order?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ul egg contributors are pretty
reliable.
BTW, there's also a mailing list for lxml, it's always a good idea to discuss
lxml related stuff there.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
the same
time.
http://codespeak.net/lxml/objectify.html
It's part of the lxml distribution:
http://codespeak.net/lxml/
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ractiveLoop?
Thanks a lot for your hints in advance!
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Bellon wrote:
> int main(void)
> {
> Py_Initialize();
> PyRun_InteractiveLoop(stdin, "");
> Py_Finalize();
> }
> How can I make use of command history when embedded Python via
> PyRun_InteractiveLoop?
Sorry to follow up my own posting ...
I fou
[EMAIL PROTECTED] wrote:
> ok i close this discussion
No, you don't.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
In comp.lang.lisp Jon Ribbens <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
>>> http://xahlee.org/lang_traf/index.html
>>
>> Careful there with the sweeping generalizations and quick judgments
>> about languages :)
>
> I just read "PHP as a language is rath
[EMAIL PROTECTED] wrote:
> I need to do a quadratic optimization problem in python where the
> constraints are quadratic and objective function is linear.
>
> What are the possible choices to do this.
Too bad these homework assignments get trickier every time, isn't it?
s
> functions.
You can use "dpkg" to install the .deb. Read "man dpkg".
BTW: any reason you need to use XSV? There are some other libraries out there
that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
much more powerful than XSV.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Ant wrote:
> So I thought I'd look into the pyparsing module, but can't find a
> simple example of processing random text.
Have you looked at the examples on the pyparsing web page?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
> [EMAIL PROTECTED] wrote:
> Stefan Behnel wrote:
>> BTW: any reason you need to use XSV? There are some other libraries out there
>> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
>> much more powerful than XSV.
>
> No particular r
[EMAIL PROTECTED] wrote:
> Stefan Behnel wrote:
>>> [EMAIL PROTECTED] wrote:
>>> Stefan Behnel wrote:
>>>> BTW: any reason you need to use XSV? There are some other libraries out
>>>> there
>>>> that can validate XML based on XML Schema
Tor Erik Soenvisen wrote:
> (len(['']) is 1) == (len(['']) == 1) => True
>>> len([''])
1
>>> len(['']) is 1
True
>>> len(['']) == 1
True
>>> True == True
True
>>> (
JustStand <[EMAIL PROTECTED]> wrote:
> In many ways, it was the launch of Windows 95 and Office 95 eleven
> years ago that signaled the start of this transformation. ..."
Right. 11 years ago I switched from Amiga to Linux.
--
Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/
e,
that's really hard to understand. So Python is a bad language? No,
quite not.
So why do you think, Common Lisp or Macros are a bad thing? What's the
difference (from the perspective of understanding) between a function
foo and a macro bar? Both just transform their inputs. It
ed some languages -- maybe some are a little bit
worse for the uneducated, but all languages are really unreadable.
Intuitive interfaces (GUI, languages,...) are an urban legend, pure
illusion. You have to do hard work and practice to understand them.
--
Stefan.
--
http://mail.python.org/mailma
Here's how we do it in lxml:
https://codespeak.net/svn/lxml/trunk/versioninfo.py
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
,
but I've already stumbled into schemas that just don't work (especially
generated ones).
RelaxNG support in libxml2 is pretty much perfect, BTW.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
i have to convert several timestamps. The given format, eg "-mm-dd hh:mm:ss"
has to be converted to an epoch string. Is there any proper way to do this?
If not, i have to split the given string and resolve this by a calculation?
Thanks for help.
Stefan.
--
http://mail.
it = str(timestamp).split(' ')
tdate = map(int,split[0].split('-'))
ttime = map(int,split[1].split(':'))
tcode = (tdate[0], tdate[1], tdate[2], ttime[0], ttime[1], ttime[2])
epoch = timegm(tcode)
return (int(epoch))
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
Source software, released under the revised BSD
license (see http://www.opensource.org/licenses/bsd-license.php ).
Stefan
--
Dr.-Ing. Stefan Schwarzer
SSchwarzer.com - Softwareentwicklung f??r Technik und Wissenschaft
http://sschwarzer.com
--
http://mail.python.org/mailman/listinfo/python-list
rding threads which also use
sys.stdout, perhaps implicitly via print statements.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
se M2Crypto, try to make sure that you have a class
which is compatible with ftplib.FTP. You can pass such a class as
session_factory to ftputil.FTPHost's constructor. If you don't
have such a class, you might be able to write it yourself.
Stefan
--
Dr.-Ing. Stefan Schwarzer
SSchwarzer.c
ython2006.pdf
Stefan
--
Dr.-Ing. Stefan Schwarzer
SSchwarzer.com - Softwareentwicklung für Technik und Wissenschaft
http://sschwarzer.com
--
http://mail.python.org/mailman/listinfo/python-list
>>> file_names
['wanted_filename']
>>> file_name = file_names[0]
>>> host.download(file_name, file_name, "b")
>>> host.close()
Ok, I admit this isn't a pure-ftplib solution. :-)
Stefan
--
Dr.-Ing. Stefan Schwarzer
SSchwarzer.com - Softwareentwicklung für Technik und Wissenschaft
http://sschwarzer.com
--
http://mail.python.org/mailman/listinfo/python-list
top' command).
Try the lxml binding for libxml2. It relieves you from having to do your own
memory management and makes using that library plain easy.
http://codespeak.net/lxml/
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
he distinction between public and non-public
attributes IMHO makes sense, but I don't think that the
distinction should be enforced by the language as in C++
or Java.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
data???
You won't corrupt the data in the file, but you will kind of
corrupt the data that arrives in your program.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ermail/xml-sig/2004-June/010325.html
In case you still end up wanting to write something yourself, you might
consider lxml's namespace implementation feature a good starting point.
http://codespeak.net/lxml/element_classes.html
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ement the namespace replacement
in XSLT. You might also want to try to copy the elements to a newly created
document that does not have the original namespace declaration. Note, however,
that this is not guaranteed to work and might break depending on the lxml
version.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
win32com does only support late bound interfaces in python scripts.
To support early bound interfaces a pyd has to be created. If you want
to script early bound interfaces try ctypes.com aka. comtypes from
Thomas Heller.
Stefan
> -Original Message-
> From: [EMAIL PRO
hing like that:
>>> print "text"*5
texttexttexttexttext
cheers
Stefan
pgp470Yem6sNX.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
out double-fork, can someone explain, why to use
this way for starting a daemon?
Thanks in advanced.
Stefan
pgpWIkZJooXfQ.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
FTP server
without requiring the user of the ftputil library to explicitly
send data with _FTPFile.write?
Stefan
[1] http://ftputil.sschwarzer.net/
[2] http://ftputil.sschwarzer.net/trac/browser/trunk/ftputil.py
[3] http://ftputil.sschwarzer.net/trac/browser/trunk/ftp_file.py
[4] http://docs.python.
at the begining and at the end of the string,
you could also use:
>>> "('sometext1', 1421248118, 1, 'P ')"[1:-1]
"'sometext1', 1421248118, 1, 'P '"
cheers
Stefan
pgpEdJ9SLHXXB.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
line 37, in ?
> import pyuno
> ImportError: Module use of python23.dll conflicts with this version of
> Python.
Sounds like you might want to switch back to Python 2.3 ...
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
iscussion needs to move to python-dev ?)
As for the metaclass versions: For myself, the above version feels more
natural and straightforward (in the same way as the PEP author describes
it), though I understand the subclassing ideas.
But are there use cases for subclassing, that aren't better served with
a new enum or something homegrown?
Can C++/Pascal/Java enums be subclassed?
cheers,
stefan
--
http://mail.python.org/mailman/listinfo/python-list
on 28.02.2006 12:14 Carl Banks said the following:
[snip]
>
>>> It's a pretty weak case to have a dedicated builtin to prevent
>>> duplicates in something that changes maybe once a month, as enums tend
>>> to change rather slowly. (At least, that's the way enums in other
>>> languages are used, a
he pack function but I can't get it to work. I'm using Python 2.3.3 in
> Windows XP.
Why don't you post some pieces of your code ?
Maybe someone can help you fix it.
Stefan
--
--
http://mail.python.org/mailman/listinfo/python-list
A patch is available at sourceforge:
https://sourceforge.net/tracker/index.php?func=detail&aid=1195096&group_id=78018&atid=551956.
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> jelle
> Sent: Friday,
about this as the
above point.
BTW: I would also appreciate a nicer syntax for classes (no
explicit self, no masses of _). But that's another story... :)
--
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
ttle
less of a problem.
So I would appreciate optional statements to end a block
(indentation rules may be mandatory). This comes also very handy
in something like Python Server Pages of mod_python (where a
comment line to explicitly end a block is sometimes needed).
--
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
sometimes it causes
at least a little bit trouble.
--
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Dalke <[EMAIL PROTECTED]> writes:
> See the program "pindent.py"
Thanks for the hint, i didn't know about it.
--
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
mportant. What Python got really wrong is
mixing binding and assignment (because this way you have little
chance to catch typos in identifiers).
--
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
Use the Record Method from win32com.client
object = win32com.client.Dispatch("Server.Object")
IPAddress = win32com.client.Record("IPADDRESS_STRUCT", object)
IPAddress.b1 = 192
IPAddress.b2 = 168
IPAddress.b3 = 0
IPAddress.b4 = 1
object.connect(IPAddress)
Stefan
>
;)
is 'None' !
What does that mean ? Have those modules already
been unloaded ? If so, why, given that my
current module still references them ?
Any help is highly appreciated,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
I'm pleased to announce the release of Synopsis 0.8.
Synopsis is a multi-language source code introspection tool that
provides a variety of representations for the parsed code, to
enable further processing such as documentation extraction,
reverse engineering, and source-to-source translation.
W
re is JPython).
I don't like Perl syntax much, so it's not on the list, and PHP is
a rather chaotic language with (personal view!) at least a couple
of new security issues eacht month, so it's the worst choice one
can make (i think).
Hope that helps a little bit.
--
Stefan.
--
http://mail.python.org/mailman/listinfo/python-list
pass global and local dictionaries as context.
That may provide more fine-grained control, depending
on what you want.
Regards,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ak.net/lxml/dev/
http://codespeak.net/lxml/dev/objectify.html
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
It reads in gzip compressed XML files transparently and
provides loads of other nice XML goodies.
http://codespeak.net/lxml/dev/
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
IP archive. Use the zipfile library:
file:///usr/share/doc/python2.5-doc/html/lib/module-zipfile.html
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
zipfile module instead.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
.py?format=txt
[3] http://ftputil.sschwarzer.net/trac/wiki/Download
[4] mailto:[EMAIL PROTECTED]
[5] mailto:[EMAIL PROTECTED]
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
an only be received between atomic
> actions of the python interpreter", presumably - and control will not
> return to Python unless something appears on the socket). Does anyone
> have a tip of a good way to do this?
Twisted *should* be able to do this, as it uses non-blocking IO
uot;outdated".
>
> Given the simplicity of the ElementSoup code above, I'd still contend
> that using HTMLParser here shows too complex an answer to too simple a
> problem.
Here's an lxml version:
from lxml import etree as et # http://codespeak.net/lxml
html = et.HTML(page2)
for href in html.xpath("//a/@href[string()]"):
print href
Doesn't count as a 15-liner, though, even if you add the above HTML code to it.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
t; writer = csv.writer(open("professor.csv", "wb"))
> writer.writerows(output) #output CSV file
writer = csv.writer(open("professor.csv", "wb"))
writer.writerows(name_list) #output CSV file
> -- End of Program
> --
>
> 3.Should I close the opened csv file("professor.csv")? How to close
> it?
I guess it has a "close()" function?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
use.
lxml is what you're looking for, especially if you're familiar with XPath.
http://codespeak.net/lxml/dev
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Jay Loden wrote:
> Someone else mentioned lxml but as I understand it lxml will only work if
> it's valid XHTML that they're working with.
No, it was meant as the OP requested. It even has a very good parser from
broken HTML.
http://codespeak.net/lxml/dev/parsing.html#pars
codespeak.net/lxml/dev/tutorial.html
http://codespeak.net/lxml/dev/parsing.html#parsing-html
http://codespeak.net/lxml/dev/xpathxslt.html#xpath
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
The docs:
http://codespeak.net/lxml/dev/
The SVN branch:
http://codespeak.net/svn/lxml/branch/html/
You seem to be on Linux, so compiling lxml should be simple enough:
http://codespeak.net/lxml/dev/build.html#subversion
Have fun,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Jackie schrieb:
> On 6 15 , 2 01 , Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> Jackie wrote:
>
>> import lxml.etree as et
>> url = "http://www.economics.utoronto.ca/index.php/index/person/faculty/";
>> tree = et.parse(url)
>>
>
>> S
mber, or a tag and have that version
> installed.
>
> Is it simply a case of appending a fragment to the url?
> Would anyone be so kind as to provide a working example?
This is how we do it for lxml:
http://cheeseshop.python.org/pypi/lxml/1.2.1
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
bug of HTMLParser
Sure, and next time your key doesn't open your neighbours house, please report
to the building company to have them fix the door.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
it's some kind of
flags or attributes, maybe a class to hold them would look better), but that's
a good solution to the problem IMHO.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
you might think "Ok, I'll just use SAX". And
now you have two problems.
SAX is a great way to hide your real problems behind a wall of unreadable
code. If you want my opinion, lxml is currently the straightest way to get XML
work done in Python.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
stef wrote:
> I think you might be right,
> but for a one-time/one-programmer program,
> I think the documentation will be good enough.
Famous last words.
Stefan :)
--
http://mail.python.org/mailman/listinfo/python-list
Steven W. Orr wrote:
> Does something like that exist?
Many of them, as usual :)
http://wiki.python.org/moin/WebProgramming
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
... print a
... return inner
...
>>> f=outer()
>>> f()
Traceback (most recent call last):
File "", line 1, in ?
File "", line 4, in inner
UnboundLocalError: local variable 'a' referenced before assignment
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
ElementTree:
>
> http://codespeak.net/lxml/dev/objectify.html
lxml is not part of ElementTree (only mostly compatible), but it's a must if
you want to have a simple API *and* XPath *and* good performance.
http://codespeak.net/lxml/
The API is not W3C-DOM compatible, but that's
thon wrapper is for:
keep the people who use it from worrying about segfaults and memory management
and let them concentrate on their own problems.
It's more important to make the users happy than the libs. :)
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
claration. No need to
have it, though, as ET will create well-formed XML anyway.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Brandon wrote:
> Check it out: www.BrandonsMansion.com
Why?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
from python.org and unpack it if
you want to play with it.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
] = []
c3_list.append(c3)
root = ET.Element("root") # in case "col1" has more than one value
for c1, c2d in c1d.iteritems():
el_c1 = ET.SubElement(root, "tag1", col1=c1)
for c2, c3_list in c2d.iteritems():
el_c2 = ET.SubElement(
Scott wrote:
> So how on earth would be the best way to: Write a function that takes a
> string as an argument and outputs the letters backward, one per line.
Homework?
Anyway, what about:
for c in string[::-1]:
print c
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
can I find out from which module the import
was initiated?
3) My final point is related to 2) ... if I get to the module object,
then how do I get at the source file name of that? I noticed that
when a .pyc is available, then this is preferred. I'd like to get at
the .py file itself.
701 - 800 of 2239 matches
Mail list logo