A new release of markup.py is available at http://markup.sourceforge.net/
This new release is compatible with both python 2 and 3.
What is markup.py?
Markup.py is an intuitive, light weight, easy-to-use, customizable and
pythonic HTML/XML generator. The only goal is quickly writing HTML/XML
segm
According to the documentation the xml.parsers.expat module provides the exception ExpatError and
this exception has 3 attributes, lineno, offset and code. I would like to use lineno, but can't.
ExpatError itself works, for example if I do
import sys
from xml.dom import minidom
from xml.parsers.e
I have class 'x' with member 'content' and another member 'a' which is an instance of class '_a'. The class '_a' is callable and has a method 'func' which I would like to use to modify 'content' but I don't know how to address 'content' from the class '_a'. Is it possible?
Here is the code that
Hello Daniel
You've certainly got a lot going on here.The heart of your question seems to be how a nested (inner) class _a can access
its parent, x. The short answer is that, in Python, it can't without some help. _a and its instances are unaware of the context in which they are defined, sothey h
Hi Michael, one more thing.
As you could see my only goal was to be able to say
1 inst = x()
2
3 inst.a("some string")
4 inst.a.func()
5
6 inst.b("some other string")
7 inst.b.func()
and (3) should modify 'inst.content' in some way depending on "some
string" and the attribute 'a' while (4)
Hi There!I created a few python scripts and everything is working fine. But to
make it easier to run the procedure i want to couple these scripts inone big script. Is there a possibility to do this, can I for examplemake a script dat 'calls' the other script in the right order?Many thanks!
Sander
> Hey I'm pretty new to python and I have a question. I'm trying to write:
> "[BOOT]
> run=C:\windows\aawin.bat"
>
> in my win.ini
> So I went about it like this:
>
> win = open('C:\windows\win.ini', 'a')
> win.write('[BOOT]')
> win.write('\n')
> win.write('run=C:\windows\aawin.bat')
>
> I expecte
What is the simplest way to instantiate all classes that are
subclasses of a given class in a module?
More precisely I have a module m with some content:
# m.py
class A:
pass
class x( A ):
pass
class y( A ):
pass
# all kinds of other objects follow
# end of m.py
and then in another m
> > More precisely I have a module m with some content:
> >
> > # m.py
> > class A:
> > pass
> > class x( A ):
> > pass
> > class y( A ):
> > pass
> > # all kinds of other objects follow
> > # end of m.py
> >
> > and then in another module I have currently:
> >
> > # n.py
> > import m
>
> > >>> from inspect import isclass
> > >>>
> > >>> class x:
> > ... def __getattr__( self, attr ):
> > ... pass
> > ...
> > >>> y = x( )
> > >>> isclass( y )
> > True
>
> Which reinforces Michael Spencer's instinct that the inspect.isclass()
> implementation is a bit too clever
Wou
> > What is the simplest way to instantiate all classes that are
> > subclasses of a given class in a module?
> >
> > More precisely I have a module m with some content:
> >
> > # m.py
> > class A:
> > pass
> > class x( A ):
> > pass
> > class y( A ):
> > pass
> > # all kinds of other o
> I have a problem with python. When I try to connect to
> postgresql. It appears a message.
>
> ]$ python
>
> >>> from pg import DB
> Traceback (most recent call last):
>
>File "", line 1, sn?
>
> ImportError:
> I'm just building a Python CGI Tutorial and would appreciate any
> feedback from the many experts in this list.
>
> Regards, Clodoaldo Pinto Neto
>
Perhaps you want to post this to the mod_python list as well:
http://mailman.modpython.org/mailman/listinfo/mod_python
--
http://mail.python.org/ma
> Can these operators be overloaded?
> If so. How?
>
http://www.python.org/doc/ref/numeric-types.html
HTH,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
> > Why not propose something. That is the easiest way to get things moving.
>
> How does one do that ? Propose something here on this NG or is there
> some other official way ?
I'm by no means an expert here but the usual procedure as far as I can
see is this:
1. propose something here and get
> > How to execute a linux command by python?
> > for example: execute "ls" or "useradd oracle"
> > Who can help me?
>
> start here:
>
> http://www.python.org/doc/lib/
>
And continue here:
http://www.python.org/doc/lib/os-process.html
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
Last time I checked PIL was not able to apply lossless transformations
to jpeg images so I've created Python bindings (or is it a wrapper? I
never knew the difference :)) for the jpegtran utility of the
Independent Jpeg Group.
The jpegtran utility is written in C and is very efficient, fa
> Hi all,
>
> Last time I checked PIL was not able to apply lossless transformations
> to jpeg images so I've created Python bindings (or is it a wrapper? I
> never knew the difference :)) for the jpegtran utility of the
> Independent Jpeg Group.
>
> The jpegtran utility is written in C and is very
> folks
> I have two lists
>
> i am trying to loop thorough them simultenously.
>
> Here is the code i am using
[...]
> Is there any efficient doing this
>
Try the zip function:
>>> list1 = [ 'a', 'b', 'c' ]
>>> list2 = [ 'A', 'B', 'C' ]
>>> for i, j in zip( list1, list2 ):
... print i, j
> > > Last time I checked PIL was not able to apply
> > > lossless transformations to jpeg images so
> > > I've created Python bindings (or is it a
> > > wrapper? I never knew the difference :)) for
> > > the jpegtran utility of the Independent Jpeg
> > > Group.
>
>
> Why not use Tkinter for jpeg ?
> I have a program that keeps some of its data in a list of tuples.
> Sometimes, I want to be able to find that data out of the list. Here is
> the list in question:
>
> [('password01', 'unk'), ('host', 'dragonstone.org'), ('port', '1234'),
> ('character01', 'Thessalus')]
>
> For a regular list, I
I recently came across the program 'sloccount' that attempts to
calculate the time and money that went into writing software.
http://www.dwheeler.com/sloccount/
If ran on the source code of python 2.5 the results are the following:
Total Physical Source Lines of Code (SLOC) = 689,99
> I've been learning python for the past couple of months and writing
> misc scripts here and there, along with some web apps.
> I'm wondering if anyone has ideas of programs I might try my hand at
> making?
You could put together a handy CSS generator library that could be
used from a python weba
> > I made this Python calculator that will take an equation as an input
> > and will display the computed curves on a shiny Tkinter interface
>
> well, it doesn't sound like you're quite as newbie-ish as many other
> newbies ;-)
>
> > Now, I'd like to make this application available on a public we
> > Scrape means simply scraping pixel colors from locations on the screen.
> > I'll worry about assembling it into meaningful information.
>
> import ImageGrab
> im = ImageGrab.grab()
> v = im.getpixel((x, y))
>
> requires:
>
> http://www.pythonware.com/products/pil/
>
>
##
#
> I apologise if this is a stupid newbie error, but I've been googling
> "hash bang" and "shebang" all morning. I've added the shebang to my
> scripts:
>
> #!/usr/bin/python
>
> I've added execute permissions:
>
> chmod +rx shebang.py
>
> But I still can't execute my scripts by themselves
>
> sheb
> hi everybody,
>
> i have a problem with a script.
> after a research with my directory, i want to do a popup of a person's
> photo but i don't know the syntax (i'm a newbie) :
>
> with a javascript : "">Popup don't work
>
> with the function window.open : tal:attributes="python:onClick string:j
> hai all,
> i am student of computer science dept. i have planned to
> design a search engine in python. i am seeking info about how to
> proceed further.
> i need to know what r the modules that can be used.
There are these two guys Sacha or Sergey and Larry (if I remember
cor
> Hi,
>
> is there a Python aquivalent to the C __LINE__?
>
> Thank you in advance
Google says:
http://www.nedbatchelder.com/blog/200410.html#e20041003T074926
--
http://mail.python.org/mailman/listinfo/python-list
> Code:
>
> value = self.dictionary.get(keyword)[0]
>
> if value == "something":
> somethingClass.func()
> elsif value == "somethingElse":
> somethingElseClass.func()
> elsif value == "anotherthing":
> anotherthingClass.func()
> elsif value == "yetanotherthing":
> yetanotherthingCla
> Hy people, I'm new in python and comming from JAVA.
>
> Something I really like in java is the easy way to add a library to the
> project. Just put the jar file in the folder ( WEB-INF/lib ) and
> doesn't need to restart the server ( tomcat ).
>
> Can I do some like using python - I'm using apach
> >> Check out Django, it has a great database API and on the fly
> >> auto-generated admin.
> >
> > Just gone over the tutorial, really amazing, exactly what I need.
>
> That's exactly the response I had when I met with Django :)
>
Anyone with Django experience: how well does it do with respect t
A new release of markup.py is available at
http://markup.sourceforge.net/
The markup module is an intuitive, lightweight, easy-to-use,
customizable and pythonic HTML/XML generator. New features in the 1.5
release include:
* use attribute=None to have no value for an attribute
such as the emp
> 2)
> Still without the above patch on windows, the software "angry ip scan"
> for example managed to output a lot of more socket connection. How is
> it possible ?
This "angry ip scan" thing is written in Java, perhaps you can find it
out from the source:
http://svn.sourceforge.net/viewvc/ipsca
> > A new release of markup.py is available at
> >
> > http://markup.sourceforge.net/
> >
> > The markup module is an intuitive, lightweight, easy-to-use,
> > customizable and pythonic HTML/XML generator. [...]
>
> It's more than only a bit confusing that there's also
>
> Markup: A toolkit for stre
In a recent thread,
http://mail.python.org/pipermail/python-list/2006-September/361512.html,
a couple of very useful and enlightening itertools examples were given
and was wondering if my problem also can be solved in an elegant way
by itertools.
I have a bunch of tuples with varying lengths and w
> > In a recent thread,
> > http://mail.python.org/pipermail/python-list/2006-September/361512.html,
> > a couple of very useful and enlightening itertools examples were given
> > and was wondering if my problem also can be solved in an elegant way
> > by itertools.
> >
> > I have a bunch of tuples
> > In a recent thread,
> > http://mail.python.org/pipermail/python-list/2006-September/361512.html,
> > a couple of very useful and enlightening itertools examples were given
> > and was wondering if my problem also can be solved in an elegant way
> > by itertools.
> >
> > I have a bunch of tuples
> Everytime I am lookink at how to do this or that in Python I write it
> down somewhere on my computer. (For ex. Threading. After reading the
> official documentation I was a bit perplex. Hopefully I found an
> article an managed to implement threads with only like 20 lines of code
> in my script.
> > > That said...the Python docs are open source. Just start going through
> > > them and adding examples.
> >
> > ASPN (activestate) is a good place for examples...
>
> Yes, but that requires a separate search and depends on an external
> organization. Wouldn't it be great if relevant examples we
Is looping over a list of objects and modifying (adding an attribute
to) each item only possible like this?
mylist = [ obj1, obj2, obj3 ]
for i in xrange( len( mylist ) ):
mylist[i].newattribute = 'new value'
I'm guessing there is a way to do this without introducing the (in
principle unnec
> Is looping over a list of objects and modifying (adding an attribute
> to) each item only possible like this?
>
> mylist = [ obj1, obj2, obj3 ]
>
> for i in xrange( len( mylist ) ):
> mylist[i].newattribute = 'new value'
>
>
> I'm guessing there is a way to do this without introducing the (in
> Call me crazy, but isn't the simple construct
> for obj in mylist:
> obj.newattribute = 'new value'
> what the OP was looking for?
Yes, of course. That's why my follow-up post was this:
> Please consider the previous question as an arbitrary random brain
> cell fluctuation whose pro
> > > Below is a simple program that will cause python to intermittently
> > > stop executing for a few seconds. it's 100% reproducible on my
> > > machine.
> >
> > Confirmed with Python 2.4.2 on Windows.
> >
> > gc.disable() fixes it, so it looks like you found an inefficiency in the
> > Python's
What would the simplest way to make an application that has both a web
interface and runs from behind a web server but also can be used as a
standalone app with a gui? More precisely is it possible to avoid
creating an html/xml/whatever based web interface for the web version
and separately creatin
> > What would the simplest way to make an application that has both a web
> > interface and runs from behind a web server but also can be used as a
> > standalone app with a gui? More precisely is it possible to avoid
> > creating an html/xml/whatever based web interface for the web version
> > an
Hi list,
I have an awk program that parses a text file which I would like to
rewrite in python. The text file has multi-line records separated by
empty lines and each single-line field has two subfields:
node 10
x -1
y 1
node 11
x -2
y 1
node 12
x -3
y 1
and this I would like to parse into a l
> > I have an awk program that parses a text file which I would like to
> > rewrite in python. The text file has multi-line records separated by
> > empty lines and each single-line field has two subfields:
> >
> > node 10
> > x -1
> > y 1
> >
> > node 11
> > x -2
> > y 1
> >
> > node 12
> > x -3
>
I used to have the following code to collect all (old style) class
names defined in the current module to a list called reg:
def meta( reg ):
def _meta( name, bases, dictionary ):
reg.append( name )
return _meta
reg = [ ]
__metaclass__ = meta( reg )
class c1:
pass
class c2:
> > I used to have the following code to collect all (old style) class
> > names defined in the current module to a list called reg:
> >
> >
> > def meta( reg ):
> > def _meta( name, bases, dictionary ):
> > reg.append( name )
> > return _meta
> >
> > reg = [ ]
> > __metaclass__ = m
Is it possible to have method names of a class generated somehow dynamically?
More precisely, at the time of writing a program that contains a class
definition I don't know what the names of its callable methods should
be. I have entries stored in a database that are changing from time to
time and
> > Is it possible to have method names of a class generated somehow
> dynamically?
> >
> > More precisely, at the time of writing a program that contains a class
> > definition I don't know what the names of its callable methods should
> > be. I have entries stored in a database that are changing
> > My database has 1 table with 2 fields, one called 'name' and the other
> > one called 'age', let's suppose it has the following content, but this
> > content keeps changing:
> >
> > Alice 25
> > Bob 24
> >
> > --- program1.py
> >
> > class klass:
> >
> > # do the
> Here you go:
>
> >>> database = {
> ... "Alice": 24,
> ... "Bob":25}
> ...
> >>> class Lookup(object):
> ... def __catcher(self, name):
> ... try:
> ... print "Hello my name is %s and I'm %s" % (name,
> database[name])
> ... except KeyErro
> Ouch! This certainly seems like a possible security hole!
>
> As someone else said, use rewrite rules to get this passed
> in as a parameter.
I don't get it, why is it more safe to accept GET variables than
method names? Concretely, why is the URL
http://something.com/script?q=parameter safer th
> *>* I don't get it, why is it more safe to accept GET variables than
> *>* method names? Concretely, why is the URL
> *>* http://something.com/script?q=parameter safer than
> *>* http://something.com/script/parameter if in both cases exactly the
> *>* same things are happening with 'parameter'?
>
I'm relatively new to object oriented programming, so get confused
about its usage once in a while. Suppose there is a class Image that
has a number of methods, rotate, open, verify, read, close, etc. Then
to use this class my natural guess would be to have something like
image = Image( )
image.re
>
> In this case, Image seems to be a python module, with the open function
> defined, PIL's Image is not a class.
>
Thanks for the enlightening remarks, especially this last one, indeed,
it's not a class.
--
http://mail.python.org/mailman/listinfo/python-list
> > > In this case, Image seems to be a python module, with the open function
> > > defined, PIL's Image is not a class.
> > >
> >
> > Thanks for the enlightening remarks, especially this last one, indeed,
> > it's not a class.
>
> Actually, this way of creating a class instance is good OO practice
> > Actually, this way of creating a class instance is good OO practice in
> > many places: The Image.open() method acts as a factory-function for
> > creating Image objects.
> > You don't know, until you inspect the return value, if the created
> > object is actually an instance of class Image or
> > So after all, what is a 'factory' or 'factory function'?
>
> A brief explanation in Python terms is at
> http://www.aleax.it/ep03_pydp.pdf -- "pages" (slides) 37-44 (the rest of
> the presentation is about an even more fundamental design pattern,
> "template method"). A far more extensive essa
Is it possible to pass a python object to a python program as argument?
In my program I would like to start executing an other python program
and don't wait until that finishes, only launch it and keep running
the original program. The obvious way I can think of it is using the
exec* or spawn* fun
> >I would like to pass the whole object at once to the second python
> >program which should start doing its thing with it while the original
> >program should keep running.
>
> os.fork() does that (on Mac and Unix).
>
Okay, but how? It seems to me that if the process which issued
os.fork() ends,
> >> os.fork() does that (on Mac and Unix).
> >
> >Okay, but how?
>
> Sorry, fork() is implemented strictly on a 'need to know' basis :-)
>
> >It seems to me that if the process which issued os.fork() ends, then
> >the forked process also ends.
>
> No, no, they're not a quantum mechanic photon pair
> > >> os.fork() does that (on Mac and Unix).
> > >
> > >Okay, but how?
> >
> > Sorry, fork() is implemented strictly on a 'need to know' basis :-)
> >
> > >It seems to me that if the process which issued os.fork() ends, then
> > >the forked process also ends.
> >
> > No, no, they're not a quantum
> Is it possible to embed a Python application within Internet explorer?
> If so how do people recommend going about it.
>
> As for the application it has to be able display simple animated
> graphics such as circles, lines and squares. However if someone clicks
> on a shape it should open up anoth
> class UserDict:
> def __init__(self, dict=None):
> self.data = {}
> if dict is not None: self.update(dict)
>
> I just don't understant this code, as it is not also mention in the
> book. the update is a method of a dict right? in my understanding the
> last statement should be
> How does one effect a goto in python? I only want to use it for debug.
> I dasn't slap an "if" clause around the portion to dummy out, the
> indentation police will nab me.
http://entrian.com/goto/
--
http://mail.python.org/mailman/listinfo/python-list
> > I was wondering if there was a python-live-environment available on a
> > public web-site similar to the ruby-live-tutorial on
> >
> > http://tryruby.hobix.com/
> >
> > I would prefer something which allows to paste small scripts into a
> > text-field, to run them on the server, and to be able
Hi list,
Well, the short question is: what are they? I've read Guido's python
3000 status report on
http://www.artima.com/weblogs/viewpost.jsp?thread=208549 where he
mentions ABC's but don't quite understand what the whole story is
about.
Anyone has good use cases?
Daniel
--
http://mail.python.
> > Well, the short question is: what are they? I've read Guido's python
> > 3000 status report on
> > http://www.artima.com/weblogs/viewpost.jsp?thread=208549 where he
> > mentions ABC's but don't quite understand what the whole story is
> > about.
>
> The story is at PEP 3119:
> http://www.python
> Python 2.5.1
> Boost.Python
> Qt 4.2.2
> SIP 4.6
> PyQt 4.2
> WinXp
>
> I've a memory leak in a PyQt application and no idea how to find it. What
> happens in the application ?
>
> From QWindow a QDialog is called on a button "pressed()" signal, that
> instantiate a QThread and waits for it. If
> > > "Write a program that takes as its first argument one of the words
> > > 'sum,' 'product,' 'mean,' or 'sqrt' and for further arguments a
> > > series of numbers. The program applies the appropriate function to
> > > the series."
> >
> > > My solution so far is this:
> >
> > >http://dpaste.co
> Hi
> I'm considering learning Python...but with the python 3000 comming
> very soon, is it worth waiting for?? I know that the old style of
> coding python will run parallel with the new, but I mean, its going to
> come to an end eventually.
>
> What do you think??
> Chris
99% of what you would
> I need a reference to get all the programs which used to package Python
> programs into standalone executables files.
> Would you help me?
windows: http://www.py2exe.org/
mac: http://cheeseshop.python.org/pypi/py2app/
linux: http://wiki.python.org/moin/Freeze
linux/windows: http://python.n
> I have an issue I think Python could handle. But I do not have the knowledge
> to do it.
>
> Suppose I have a class 'myClass' and instance 'var'. There is function
> 'myFunc(..)'. I have to add (or bind) somehow the function to the class, or
> the instance. Any help, info or point of reference is
> >> I have an issue I think Python could handle. But I do not have the
> >> knowledge
> >> to do it.
> >>
> >> Suppose I have a class 'myClass' and instance 'var'. There is function
> >> 'myFunc(..)'. I have to add (or bind) somehow the function to the
> >> class, or
> >> the instance. Any help, i
> how to import bluebit matrik calculator that result of singular value
> decomposition (SVD) in python programming..
I'm not really sure I understand you but you might want to check out scipy:
http://scipy.org/
HTH,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
> Im working in red hat linux 9.0. I've downloaded the pygame package
> but i dont know how to install it. If anybody has the time to detail
> the steps sequentially... thanx!
>
> P.S. I've downloaded both the tar and the rpm packages...
First you can try the rpm package:
su
(give the root passwo
> There seems to be some problem. For the tar version, initial steps
> execute OK, but after typing:
> [EMAIL PROTECTED] pygame-1.7.1release]# ./configure
> bash: ./configure: No such file or directory
>
> So i don't hav a configure file? What should i do now?
Sorry, instead of ./configure do this
> I want to create a standalone program ( an exe file ) from my python files
> which works on Windows and Linux.
>
> Could you please tell me how to do that?
The same executable should work on both linux and windows? Not
possible. But see:
http://mail.python.org/pipermail/python-list/2007-July/4
> Can you please suggest a technique in Python where we can spawn few number
> of worker threads and later map them to a function/s to execute individual
> Jobs.
Have a look at the threading module:
http://docs.python.org/lib/module-threading.html
HTH,
Daniel
--
http://mail.python.org/mailman/li
> Hi All,
> I was thinking about the feasbility of adjusting Python as a
> compiled language. Being said that I feel these are the following advantages
> of doing so --
> 1) Using the powerful easy-to -use feature of Python programming language
> constructs.
> 2) Making the program to ru
> I'm running a program of mine from Linux bash script and it currently
> outputs status messages to the command prompt, but they all look a little
> boring to say the least, it'll be like this.
[snip]
> And perhaps have the word 'success' in green, or red for 'failed' and things
> like that, jus
> > I'm running a program of mine from Linux bash script and it currently
> > outputs status messages to the command prompt, but they all look a little
> > boring to say the least, it'll be like this.
>
> [snip]
>
> > And perhaps have the word 'success' in green, or red for 'failed' and
> things
>
> > This may be pretty obvious for most of you:
> >
> > When I have an object (an instance of a class "Foo") I can access
> > attributes via dot notation:
> >
> > aFoo.bar
> >
> > however when I have a dictionary
> >
> > aDict = {"bar":"something"}
> >
> > I have to write
> >
> >
> > This may be pretty obvious for most of you:
> >
> > When I have an object (an instance of a class "Foo") I can access
> > attributes via dot notation:
> >
> > aFoo.bar
> >
> > however when I have a dictionary
> >
> > aDict = {"bar":"something"}
> >
> > I have to write
> >
> >
> Is it possible to convert an object into a string that identifies the
> object in a way, so it can later be looked up by this string.
> Technically this should be possible, because things like
>
> <__main__.Foo instance at 0xb7cfb6ac>
>
> say everything about an object. But how can I look up the
> 2. File "D:\Python24\lib\socket.py", line 295, in read
> data = self._sock.recv(recv_size)
> error: (10054, 'Connection reset by peer')
>
> >>> That looks like M$ Windows version of UNIX/Linux error number 54
> >>> (pretty much all Windows socket errors are UNIX number+100
[Alex]
> When cash is involved, it's important to avoid even the
> slightest hint of a suggestion of a suspicion of a conflict of interest
I propose the non-PSF sponsored Grand Prize For Successfully Squeezing
4 Of's In A Single Sentence should be received by Alex Martelli this
month :)
--
http:/
> Looking to build a quick if/else statement that checks a dictionary for a
> key like follows.
>
> If myDict contains ThisKey:
>
> Do this...
>
> Else
>
> Do that...
>
>
>
> Thats the best way of doing this?
if key in myDict:
Do this.
else:
Do that
> I'm using the following function 'str (now)' to place a date time stamp into
> a log file, which works fine, however it writes the stamp like this.
>
> 2007-04-25 11:06:53.873029
>
> But I need to expel those extra decimal places as they're causing problems
> with the application that parses the
> A bit more of a complex one this time, and I thought I'd get your opinions
> on the best way to achieve this. Basically I'm looking for a way to describe
> a re-occurring event, like a calendar event or appointment I guess. I'm
> likely to use an XML file for the definition of the events, but ima
> The lines
>
> if __name__ == 'main':
>someClass().fn()
>
> appear at the end of many examples I see. Is this to cause a .class
> file to be generated?
Python doesn't generate .class files, and the example you mean is
probably more like
if __name__ == '__main__':
.whatever...
> I made a C/S network program, the client receive the zip file from the
> server, and read the data into a variable. how could I process the
> zipfile directly without saving it into file.
> In the document of the zipfile module, I note that it mentions the
> file-like object? what does it mean?
>
> > > I made a C/S network program, the client receive the zip file from the
> > > server, and read the data into a variable. how could I process the
> > > zipfile directly without saving it into file.
> > > In the document of the zipfile module, I note that it mentions the
> > > file-like object?
> I am parsing an XML file and sending the output to two files.The
> code asks the user to enter the input file,something like:
>
> file_input = raw_input("Enter The ODX File Path:")
> input_xml = open(file_input,'r')
>
> Now suppose the user enters the path as :
> C:\Projects\ODX Import\Sample F
> > > I am parsing an XML file and sending the output to two files.The
> > > code asks the user to enter the input file,something like:
> >
> > > file_input = raw_input("Enter The ODX File Path:")
> > > input_xml = open(file_input,'r')
> >
> > > Now suppose the user enters the path as :
> > > C:\
> Does sqlite come in a mac version?
>
The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) from www.sqlite.org
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
> The built in zipfile.write doesn't seem to like taking a directory instead
> of a filename.
>
> for example:
> for each in listofdir:
> archive.write(each)
>
> blows up when one of the items listed in listofdir is a subdirectory.
>
> File "/usr/local/lib/python2.4/zipfile.py",
1 - 100 of 229 matches
Mail list logo