On Sun, Oct 23, 2011 at 10:18 PM, Jason Swails wrote:
> Hello,
>
> I have a question about a csv.writer instance. I have a utility that I want
> to write a full CSV file from lots of data, but due to performance (and
> memory) considerations, there's no way I can write the data sequentially.
> Th
The latest version is lxml 2.3.1, released 2011-09-25,
1.download it
2.extract it ,put it in the /home/user/Python-3.2.2/libxml2-2.7.8
3.cd /home/user/Python-3.2.2/libxml2-2.7.8
4. ./configure
5.make
6.sudo make install
when i finished
~$ python3.2
Python 3.2.2 (default, Oct 24 2011, 1
On Oct 23, 3:18 am, Jonathan Loescher wrote:
> Can anyone recommend a good book to learn the web programming aspects
> of Python 3?
Hi
Try out "Dive into Python 3" for an introduction to HTTP services.
regards
Moses
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have a question about a csv.writer instance. I have a utility that I want
to write a full CSV file from lots of data, but due to performance (and
memory) considerations, there's no way I can write the data sequentially.
Therefore, I write the data in chunks to temporary files, then combi
On 10/24/2011 12:02 AM, 水静流深 wrote:
there are two python versions in my computer,
python2.7 is the default,python3.2 is the second install.
for python2.7
~$python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more info
in my computer,there two os ,
1.xp+python32
import lxml.html
sfile='http://finance.yahoo.com/q/op?s=A+Options'
root=lxml.html.parse(sfile).getroot()
it is ok
import lxml.html
sfile='http://frux.wikispaces.com/'
root=lxml.html.parse(sfile).getroot()
there is problem
Traceback (most recent call
The problem is that it is not reporting any error.
The do something and quits silently.
No rename action is done and no error.
Running Python 2.7 on Windows Seven.
I know that it is a bit tricky to help someone so,
but I dont have any info to pass that be good
to understand the situation.
Th
there are two python versions in my computer,
python2.7 is the default,python3.2 is the second install.
for python2.7
~$python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>
On Sun, Oct 23, 2011 at 8:21 PM, apometron
wrote:
> Sorry to continue discussing my thread on this list, I already subbed on the
> Tutor list
> but I need to reply and if possible, some ideas of why it dont works. Now it
> is another
> thing, entirely. Rename1.py and Rename2.py works, but why Rena
David Riley wrote:
> On Oct 23, 2011, at 10:44 PM, aaabb...@hotmail.com wrote:
>
> > exp:
> > os.system('ls -al')
> > #I like to catch return value after this command. 0 or 1,2,3
> > does python support to get "$?"?
> > then I can use something like:
> > If $?==0:
> >
> > ..
Sorry to continue discussing my thread on this list, I already subbed on
the Tutor list
but I need to reply and if possible, some ideas of why it dont works.
Now it is another
thing, entirely. Rename1.py and Rename2.py works, but why Rename3.py
dont works?
http://pastebin.com/dExFtTkp
Thanks
On Oct 23, 2011, at 10:44 PM, aaabb...@hotmail.com wrote:
> exp:
> os.system('ls -al')
> #I like to catch return value after this command. 0 or 1,2,3
> does python support to get "$?"?
> then I can use something like:
> If $?==0:
>
>
From the manual (http://docs.
On Sun, Oct 23, 2011 at 7:51 PM, wrote:
> On Oct 23, 7:44 pm, aaabb...@hotmail.com wrote:
>> exp:
>> os.system('ls -al')
>> #I like to catch return value after this command. 0 or 1,2,3
>> does python support to get "$?"?
>> then I can use something like:
>> If $?==0:
> So for what I do is:
On Oct 23, 7:44 pm, aaabb...@hotmail.com wrote:
> exp:
> os.system('ls -al')
> #I like to catch return value after this command. 0 or 1,2,3
> does python support to get "$?"?
> then I can use something like:
> If $?==0:
>
>
> TIA
> david
So for what I do is:
r_n
exp:
os.system('ls -al')
#I like to catch return value after this command. 0 or 1,2,3
does python support to get "$?"?
then I can use something like:
If $?==0:
TIA
david
--
http://mail.python.org/mailman/listinfo/python-list
To compare two instances of objects defined by others in the same class or in
derived classes from the same base class is an old problem in OOP.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/23/2011 09:06 PM, wrote:
C:\Documents and Settings\peng>cd c:\python32
C:\Python32>python
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
import lxml.html
sfile='ht
C:\Documents and Settings\peng>cd c:\python32
C:\Python32>python
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.html
>>> sfile='http://finance.yahoo.com/q/op?s
On 22/10/2011 11:09 PM, Vinay Sajip wrote:
In response to an issue (#13235) raised on the Python bug tracker, I'm going to
deprecate the warn() methods in the Logger and LoggerAdapter classes in the
stdlib logging package, as well the module-level warn() function.
The warn() variants were synony
On 10/23/2011 06:03 AM, apometron wrote:
import os
nome = sys.argv[1]
final = nome
for i in nome:
print i
if nome[i] = "_":
final[i] = " "
os.rename(nome, final)
What do you want to be wrong with it? There are so many things, it'd be
fun to try to see who could come up with the
For a moment, back to the basics...
I am using the example provided by docs at 2.1.2
"Providing finer control...". Using say:
mynoddy = noddy2.Noddy()
mynoddy.first = "a"
mynoddy.last = 0
the last line causes an ugly crash (on python 2.6.5 on winxp).
No way to catch the exception.
As I understa
On 10/23/2011 9:59 AM, 水静流深 wrote:
i change my code into :
Calling your file xml.py (as indicated below) is a potentially bad idea
since the Python stdlib has a package named 'xml'. If you write 'import
xml.xxx' in another file in the same directory, Python will try to find
'xxx' in your xml
On Sun, 23 Oct 2011 17:50:54 +0200, webcrowd.net wrote:
> hope it is okay to post job offers here. If not sorry for the spam and
> please let me know!
Not really. It's a newsgroup on Python *language*, not
on Python-everything.
You might want to post here instead, though:
http://www.python.org/c
On 10/23/2011 9:41 AM, MRAB wrote:
To show the extensions, in an Explorer window go to Tools->Folder
Options... and look in the View tab. You can also look at the file
associations in the File Types tab.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/23/2011 03:08 AM, Chris Rebert wrote:
On Sun, Oct 23, 2011 at 3:03 AM, apometron
wrote:
import os
nome = sys.argv[1]
You did not `import sys`, so you'll get a NameError there.
final = nome
for i in nome:
print i
if nome[i] = "_":
final[i] = " "
Strings aren't mutable
On 23/10/2011 15:57, W. eWatson wrote:
Last night I thought I'd install Python on a friend's XP PC. I noticed
he had declined to show extensions on any file. I thought the Control
Panel might be the way to do it. I couldn't find anything that would do
all files, doc, txt, py, etc.
I was able to
"Libel" and "slander" also generally indicate malice. Perhaps just "That's
incorrect" might have come off a little less harsh. :-)
- Dave
On Oct 23, 2011, at 12:05 PM, Matej Cepl wrote:
> Dne 22.10.2011 17:02, Steven D'Aprano napsal(a):
>> Rather than assume malice, we should give X1 the ben
Dne 22.10.2011 17:02, Steven D'Aprano napsal(a):
Rather than assume malice, we should give X1 the benefit of the doubt and
assume he genuinely believed what he wrote but was merely mistaken.
Sure, I didn't want to assume malice (sorry, English is my second
language and sometimes it shows; woul
Hi Folks,
hope it is okay to post job offers here. If not sorry for the spam and
please let me know!
One of our clients is looking for new and talented people to join their
international, seven people strong, developers team in the heart of
Berlin. You will join an awesome, nice and humble s
Last night I thought I'd install Python on a friend's XP PC. I noticed
he had declined to show extensions on any file. I thought the Control
Panel might be the way to do it. I couldn't find anything that would do
all files, doc, txt, py, etc.
I was able to do it, I think, from a right-click on
i change my code into :
import urllib.request, urllib.parse, urllib.error
import lxml.html
down='http://frux.wikispaces.com/'
root=urllib.request.urlopen(down).read()
root=lxml.html.fromstring(root)
file=root.xpath('//a')
for i in file:
str1=i.text_content()
if str1.find('pdf') >-1 :
2011/10/23 水静流深 <1248283...@qq.com>:
> book=open('c:\'+str1,'w') # i change it
> when i run it in python32,the output is :
> book=open('c:\'+str1,'w')
> invalid syntax,what is wrong?
Your problem is not at all Python 3-specific.
Backslashes are used for escape sequences in string l
code 1 can run in python2.6
#coding:utf-8
import urllib
import lxml.html
down='http://frux.wikispaces.com/'
root=urllib.urlopen(down).read()
root=lxml.html.fromstring(root)
file=root.xpath('//a')
for i in file:
str1=i.text_content()
if str1.find('pdf') >-1 :
str2='http://frux.wi
Hi,
note that I reformatted your posting to get the replies back into order.
Lee, 23.10.2011 13:32:
On Oct 23, 10:06 pm, Stefan Behnel wrote:
Lee, 23.10.2011 06:09:
Where does PyExc_TypeError (and alike) points to? I can see its
declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerr
Am 23.10.2011 06:09, schrieb Lee:
> Hi all,
>
> Where does PyExc_TypeError (and alike) points to? I can see its
> declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerrors.h
> but I cannot figure out what it is its value, where it is
> initialized.
It's initialized in Objects/exceptions
Thanks Stefan,
I am just interested to understand the mechanism inside python.
If it points to an object that means I can defered it (through
ob_type).
>From there, how a function like PyErr_SetString knows what exception
is?
Where its value is kept?
Lee
On Oct 23, 10:06 pm, Stefan Behnel wro
Hey,
I'm happy to announce a new release of Deditor version 0.3.1.
What is Deditor?
Deditor is a pythonic text-editor, written 100% in python and with the
primary goal to ease python development. There is a python shell,
codecompletion, code analyzing, instant code running and error
checking and
Gnarlodious writes:
> Thanks for all those explanations, I've already fixed it with a tuple.
> Which is more reliable anyway.
neither of lists or tuples are "more reliable" than the other. They both
have perfectly well defined behaviour (which can be gleaned from reading
the documentation) and r
On Sun, Oct 23, 2011 at 3:03 AM, apometron
wrote:
> import os
> nome = sys.argv[1]
You did not `import sys`, so you'll get a NameError there.
> final = nome
> for i in nome:
> print i
> if nome[i] = "_":
> final[i] = " "
Strings aren't mutable in Python; you can't assign to slices
import os
nome = sys.argv[1]
final = nome
for i in nome:
print i
if nome[i] = "_":
final[i] = " "
os.rename(nome, final)
--
http://mail.python.org/mailman/listinfo/python-list
Lee, 23.10.2011 06:09:
Where does PyExc_TypeError (and alike) points to? I can see its
declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerrors.h
but I cannot figure out what it is its value, where it is
initialized.
It gets initialised inside of the interpreter core and then points
41 matches
Mail list logo