In article <4c09b1f7$0$28659$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
>
>I'm sorry for all you people who don't live in a place with a genuinely
>free market, and instead have to suffer with the lack of competition and
>poor service of a monopoly or duopoly masquerading as a free mark
In article ,
Monte Milanuk wrote:
>
>Decent NNTP access is harder to find. Not impossible, but no longer
>a 'free' part of most standard ISP access any more.
This seems like a good time to promote my ISP: panix.com
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.
Hello All,
The Selenium setup.py can be found at
http://code.google.com/p/selenium/source/browse/trunk/setup.py.
When running "python setup.py sdist" the "firefox/test/py" directory
is ignored for some reason though it's
mentioned in the "package_dir" and in "packages".
Any ideas why it's ignor
On the site
http://code.activestate.com/recipes/langs/python/
there are several scripts for fractals. See page five.
These begin
from PIL import Image
This fails in my python 3.1.2
Google reveals PIL is Python Imaging Library from
pythonware.com
According to their web
GZ wrote:
> I should distinguish between modifications and additions. In my above
> example, one line is modified/replaced, one line is added and one line
> is deleted. There are a total of 3 edits. I am looking for an
> alternative python library other than difflib that minimizes this
> number (ed
On 06/05/2010 08:22 PM, ant wrote:
> WxPython and PyGtk are both powerful, but quirky in different ways.
> PyQt is tied to one platform. And there are dozens more.
In what way is PyQt (or the new PySide bindings) tied to one platform?
PyQt is "native" on Win32, Mac, and Linux. Would your univers
On Sat, 2010-06-05 at 19:22 -0700, ant wrote:
> I get the strong feeling that nobody is really happy with the state of
> Python GUIs.
> WxPython and PyGtk are both powerful, but quirky in different ways.
All widget libraries are quirky - because sophisticated user interfaces
are complicated. If
Em 06-06-2010 04:05, John Machin escreveu:
> On Jun 6, 12:14 pm, MRAB wrote:
>> Paulo da Silva wrote:
...
>>> OK! This fixes my current problem. I used encoding="iso-8859-15". This
>>> is how my text files are encoded.
>>> But what about a more general case where the encoding of the text file
>>>
On Jun 6, 12:14 pm, MRAB wrote:
> Paulo da Silva wrote:
> > Em 06-06-2010 00:41, Chris Rebert escreveu:
> >> On Sat, Jun 5, 2010 at 4:03 PM, Paulo da Silva
> >> wrote:
> > ...
>
> >> Specify the encoding of the text when opening the file using the
> >> `encoding` parameter. For Windows-1252 for e
ant uklinux.net> writes:
> PyQt is tied to one platform.
What do you mean one platform?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 5, 8:42 pm, Ben Finney wrote:
> GZ writes:
> > Let me think of a better way to express what I mean by a "smaller
> >diff." After Idiffthe two strings, I will have something like this:
>
> > AAA
> > - BBB
> > + CCC
> > + DDD
> > - EEE
>
> > It means the first line does not change, the sec
On Sat, Jun 5, 2010 at 7:22 PM, ant wrote:
> I get the strong feeling that nobody is really happy with the state of
> Python GUIs.
> Tkinter is not widely liked, but is widely distributed. WxPython and
> PyGtk are both
> powerful, but quirky in different ways. PyQt is tied to one platform.
> And t
On 5 June, 08:53, Steve wrote:
> I am new to Python and am wanting to replace characters in a very
> large text file.6 GB
> In plain language what I wish to do is:
>
> Remove all comma's
> Replace all @ with comma's
> Save as a new file.
>
> Any of you clever people know the best way to do th
I get the strong feeling that nobody is really happy with the state of
Python GUIs.
Tkinter is not widely liked, but is widely distributed. WxPython and
PyGtk are both
powerful, but quirky in different ways. PyQt is tied to one platform.
And there are
dozens more.
Whether or not we like graphics p
WHIFF 1.0 RELEASED
WHIFF 1.0 is the first stable release
of WHIFF intended to be production ready.
PROJECT PAGE: http://whiff.sourceforge.net/
DOCUMENTATION: http://whiffdoc.appspot.com
DOWNLOAD: https://sourceforge.net/projects/whiff/
REPOSITORY: http://code.google.com/p/whiff/source/checkout
W
Paulo da Silva wrote:
Em 06-06-2010 00:41, Chris Rebert escreveu:
On Sat, Jun 5, 2010 at 4:03 PM, Paulo da Silva
wrote:
...
Specify the encoding of the text when opening the file using the
`encoding` parameter. For Windows-1252 for example:
your_file = open("path/to/file.ext", 'r', encoding
Right.
>>> m = lambda:expando
>>> m.myattr = 1
>>> print m.myattr
1
-- Cheers, Dmitry
--
http://mail.python.org/mailman/listinfo/python-list
GZ wrote:
I want a library that does unix 'diff' like function, i.e. compare two
strings line by line and output the difference. Python's difflib does
not work perfectly for me, because the resulting differences are
pretty big. I would like an algorithm that generates the smallest
differences.
On behalf of the Python development team, I'm effusive to announce the first
release candidate of Python 2.7.
Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version
in the 2.x series. However, 2.7 will have an extended period of bugfix
maintenance.
2.7 includes many featur
GZ wrote:
Hi,
I am looking for a fast internal vector representation so that
(a1,b2,c1)+(a2,b2,c2)=(a1+a2,b1+b2,c1+c2).
So I have a list
l = ['a'a,'bb','ca','de'...]
I want to count all items that start with an 'a', 'b', and 'c'.
What I can do is:
count_a = sum(int(x[1]=='a') for x in l)
co
On Sat, Jun 5, 2010 at 6:20 PM, GZ wrote:
> Hi,
>
> I am looking for a fast internal vector representation so that
> (a1,b2,c1)+(a2,b2,c2)=(a1+a2,b1+b2,c1+c2).
>
> So I have a list
>
> l = ['a'a,'bb','ca','de'...]
>
> I want to count all items that start with an 'a', 'b', and 'c'.
>
> What I can d
GZ writes:
> Let me think of a better way to express what I mean by a "smaller
> diff." After I diff the two strings, I will have something like this:
>
> AAA
> - BBB
> + CCC
> + DDD
> - EEE
>
> It means the first line does not change, the second line is replaced
> by the third line, the forth
Hi Lie,
On Jun 5, 2:53 am, Lie Ryan wrote:
> On 06/05/10 15:43, GZ wrote:
>
>
>
>
>
> > On Jun 4, 8:37 pm, Lie Ryan wrote:
> >> On06/05/10 07:51, GZ wrote:
> >>> No, rsync does not solve my problem.
>
> >>> I want a library that does unix 'diff' like function, i.e. compare two
> >>> strings line
Em 06-06-2010 00:41, Chris Rebert escreveu:
> On Sat, Jun 5, 2010 at 4:03 PM, Paulo da Silva
> wrote:
...
>
> Specify the encoding of the text when opening the file using the
> `encoding` parameter. For Windows-1252 for example:
>
> your_file = open("path/to/file.ext", 'r', encoding='cp1252')
>
On 06/05/2010 06:47 PM, noydb wrote:
Is there a way to save a .xls file (the first worksheet) as a .dbf
or .csv without opening an instance of Excel with win32com.client
(been awhile, is this the best module these days for v2.5)? In case a
computer does not have Excel (2007) installed.
Use the
Hi,
I am looking for a fast internal vector representation so that
(a1,b2,c1)+(a2,b2,c2)=(a1+a2,b1+b2,c1+c2).
So I have a list
l = ['a'a,'bb','ca','de'...]
I want to count all items that start with an 'a', 'b', and 'c'.
What I can do is:
count_a = sum(int(x[1]=='a') for x in l)
count_b = sum(
Is there a way to save a .xls file (the first worksheet) as a .dbf
or .csv without opening an instance of Excel with win32com.client
(been awhile, is this the best module these days for v2.5)? In case a
computer does not have Excel (2007) installed.
--
http://mail.python.org/mailman/listinfo/pyth
Chris,
> Specify the encoding of the text when opening the file using the `encoding`
> parameter. For Windows-1252 for example:
>
> your_file = open("path/to/file.ext", 'r', encoding='cp1252')
This looks similar to the codecs module's functionality. Do you know if
the codecs module is still req
On Sat, Jun 5, 2010 at 4:03 PM, Paulo da Silva
wrote:
> I need to read text files and process each line using string
> comparisions and regexp.
>
> I have a python2 program that uses .readline to read each
> line as a string. Then, processing it was a trivial job.
>
> With python3 I got error mess
Carlos Grohmann wrote:
>
>Hi all, I'm using csv to read text files, and its working fine, except
>in two cases:
>
>- when there is only one line of text (data) in the file
>- when there is a blank line after the last data line
>dialect = csv.Sniffer().sniff(sample) # Check for file format wit
I need to read text files and process each line using string
comparisions and regexp.
I have a python2 program that uses .readline to read each
line as a string. Then, processing it was a trivial job.
With python3 I got error messagew like:
File "./pp1.py", line 93, in RL
line=inf.readline()
I want to modify XMP data for a bunch of JPEG files,
using Python if possible, on Windows. I expected
PIL would support this. But no?
I found the Python XMP Toolkit
http://www.spacetelescope.org/static/projects/python-xmp-toolkit/docs/installation.html#requirements
but no reports of successful
On 06/05/10 21:24, Lie Ryan wrote:
> On 05/31/10 20:19, Payal wrote:
>> Hi,
>> I am trying to learn Python (again) and have some basic doubts which I
>> hope someone in the list can address. (English is not my first language and I
>> have no CS background except I can write decent shell scripts)
>>
travis+ml-pyt...@subspacefield.org writes:
> systems to write the reviews of the systems :-) writing raw HTML
> is teh suck.
You might want to check out:
http://code.google.com/p/zen-coding/
And thanks for your work, marked, and will read it later.
--
John Bokma
I started to review static blog-like HTML generators, and found myself
overwhelmed with how many there were. I narrowed it down to pythonic
ones, and then realized I had to pick a markup language and templating
language, of which there are several pythonic implementations...
The results of my inq
On Sat, Jun 5, 2010 at 1:17 PM, Victor Subervi wrote:
> option_values = []
>
Here you create a list. You also can get option_values by slicing your
'order' variable, and I assume that is actually producing a tuple.
Otherwise, you wouldn't get the error you're getting. Either way, you go
On Sat, Jun 5, 2010 at 10:14 AM, Dan Stromberg wrote:
>> A more realistic answer is probably to use something based on HTTP. This
>> solves a number of real-world problems, like the exact protocol to use
>> over the network, and detecting network issues which cause the transfer
>> to fail. It als
On 6/5/2010 1:17 PM Victor Subervi said...
cursor.execute(sql, tuple([pkg, prodid, tmpTable, quantity] +
option_values))
It throws this error:
*TypeError*: can only concatenate list (not "tuple") to list
args = ('can only concatenate list (not "tuple") to list',)
Where's the li
Victor Subervi wrote:
> Where's the list? They're both tuples in that last line of code.
> for order in order_details:
> store = order[0]
> prodid = order[1]
> pkg = order[2]
> quantity = order[3]
> if 'PatientID' in order_fields:
> patientID = order[4]
>
Hi;
I have this:
for order in order_details:
store = order[0]
prodid = order[1]
pkg = order[2]
quantity = order[3]
if 'PatientID' in order_fields:
patientID = order[4]
try:
option_values = order[5:]
except TypeError:
opt
On 6/5/2010 9:42 AM, lkcl wrote:
if someone could perhaps explain this (in a different way from me), in
the context of "python the programming language" and "python the
http://python.org interpreter", i.e. having absolutely nothing to do
with pyjamas, i would be most grateful, and it would benef
Sreenivas Reddy Thatiparthy writes:
> How about this one liner, if you prefer them;
> set([(k,yourList.count(k)) for k in yourList])
That has a rather bad efficiency problem if the list is large.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 4, 11:14 am, kj wrote:
> Task: given a list, produce a tally of all the distinct items in
> the list (for some suitable notion of "distinct").
>
> Example: if the list is ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b',
> 'c', 'a'], then the desired tally would look something like this:
>
> [('a',
On Thu, Jun 3, 2010 at 4:09 PM, John Nagle wrote:
> The real problem with this is not the Python. It's the approach
> to SQL. What's going on here is that you have some collection of
> named options that come in from some external source, and you're
> trying to handle that by dynamically cons
Lie Ryan writes:
> On 06/05/10 12:34, John Bokma wrote:
[..]
>> http://stackoverflow.com/questions/tagged/python
>>
>> But to be honest I mostly end up on Stack Overflow when I google for a
>> specific problem, and most of the time I find a nice concise answer
>> without much noise.
>
> Same her
On Thu, 03 Jun 2010 20:05:15 +, exarkun wrote:
> On 06:58 pm, strom...@gmail.com wrote:
>>On Jun 3, 10:47 am, Nathan Huesken wrote:
>>>Hi,
>>>
>>>I am writing a network application which needs from time to time do
>>>file transfer (I am writing the server as well as the client). For
>>>simple
* Dodo, on 05.06.2010 15:46:
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B = Button(self.root, command=self.op)
B.pack()
self.root.mainloop()
def op(self):
Second(self)
print("print")
class Second:
def
On 2010-06-05, Hans Georg Schaathun wrote:
> Raster graphics is not good enough, I will need a backend which
> does vector graphics and pdf output. AFAICS from the FAQ at
> sourceforge, agg only supports raster and png. Cairo supports
> vector graphics and PDF, but I cannot find any information
Steven D'Aprano wrote:
On Sat, 05 Jun 2010 00:53:23 -0700, Steve wrote:
I am new to Python and am wanting to replace characters in a very large
text file.6 GB
In plain language what I wish to do is:
Remove all comma's
Replace all @ with comma's
Save as a new file.
input_file = open("so
A module designed to do this is fileinput:
http://docs.python.org/library/fileinput.html
The approach is the same as the other except that it's in the standard
library.
2010/6/5 Paul Rubin
> Steve writes:
> > Remove all comma's
> > Replace all @ with comma's
> > Save as a new file.
>
> The si
Steve writes:
> Remove all comma's
> Replace all @ with comma's
> Save as a new file.
The simplest way is just copy the file one character at a time, making
replacements to commas and @'s as stated. That will be a bit slow
(especially in Python) but if you only have to do it once, just wait it
o
On Sat, 05 Jun 2010 06:42:44 -0700, lkcl wrote:
> to make it clear: the user is confused as to why the pyjamas compiler
> (which strictly speaking isn't actually a compiler it's a "language
> translator", translating from one dynamic language into another dynamic
> language, feature-for-feature, c
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B = Button(self.root, command=self.op)
B.pack()
self.root.mainloop()
folks, hi,
although i know the answer to this question, i'm having difficulty
explaining it, to a user on the pyjamas list. i was therefore
wondering if somebody could also provide an answer, on this list, to
which i can refer the user.
to make it clear: the user is confused as to why the pyjama
On 12:26 pm, michelpar...@live.com wrote:
Hi,
I am using ubuntu 9.10 . I just installed python 2.6.1 in
/opt/python2.6 for using it with wingide for debugging symbols. I also
installed numpy in python 2.6.1 using -- prefix method. but when i
import numpy i get following error :
ImportError:
Hi,
I am using ubuntu 9.10 . I just installed python 2.6.1 in /opt/python2.6 for
using it with wingide for debugging symbols. I also installed numpy in python
2.6.1 using -- prefix method. but when i import numpy i get following error :
ImportError: undefined symbol: _PyUnicodeUCS4_IsWhitespace
On 05/31/10 20:19, Payal wrote:
> Hi,
> I am trying to learn Python (again) and have some basic doubts which I
> hope someone in the list can address. (English is not my first language and I
> have no CS background except I can write decent shell scripts)
>
> When I type help(something) e.g. help(
On 31 mayo, 08:11, moerchendiser2k3 wrote:
> you are right, Python still holds the last
> reference. I just set a dummy and thats it :)
>
> Can you tell me where did you get the information from?
Do you mean the _ variable?
It's in the tutorial:
http://docs.python.org/tutorial/introduction.html#
On 31 mayo, 07:19, Payal wrote:
> When I type help(something) e.g. help(list), I see many methods like,
> __methodname__(). Are these something special? How do I use them and why
> put "__" around them?
You may want to install and use "see", a human-friendly replacement of
dir()
So instead of t
On Sat, 05 Jun 2010 01:30:40 -0700, magnus.ly...@gmail.com wrote:
> It seems that Python treats non-breaking space (\xa0) as a normal
> whitespace character, e.g. when splitting a string. See below:
>
s='hello\xa0there'
s.split()
> ['hello', 'there']
>
> Surely this is not intended beh
Know About Computer Tricks, Working Tricks, Untold Shortcuts and all
Computer Facts .. .
Visit my Website
http://computertipsnfacts.blogspot.com
http://amazingworld4all.blogspot.com
Thank You,
Santhosh...
http://forexindianew.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On 4 jun, 19:47, Spyder42 wrote:
> On Fri, 04 Jun 2010 14:03:48 -0400, Terry Reedy
> wrote:
> >On 6/4/2010 9:08 AM, Spyder42 wrote:
> >> On Fri, 04 Jun 2010 14:50:28 +0200, Christian Heimes
>
> >>> Python 2.6 is not supported on Windows 98 and earlier. You need at least
> >>> Windows 2000 with a
It seems that Python treats non-breaking space (\xa0) as a normal
whitespace character, e.g. when splitting a string. See below:
>>> s='hello\xa0there'
>>> s.split()
['hello', 'there']
Surely this is not intended behaviour?
--
http://mail.python.org/mailman/listinfo/python-list
On 4 jun, 14:54, Terry Reedy wrote:
> On 6/4/2010 1:35 PM, Philip Semanchuk wrote:
> > On Jun 4, 2010, at 1:22 PM, Uriah Eisenstein wrote:
>
> >> I'm relatively new to Python and have a few questions. Frankly, it
> >> took me a
> >> while to find on python.org what seems like a suitable place to p
Hi,
I just need to know is there any existing module or library that could be
used for storing pickle data fields into a Postgresql server database , I
have found some answers to this about using with the SQlite3 for Python 2.5,
but is it possible for Postgresql Server. ?
Thanks
Regards
Jaideep
On Sat, 05 Jun 2010 00:53:23 -0700, Steve wrote:
> I am new to Python and am wanting to replace characters in a very large
> text file.6 GB
> In plain language what I wish to do is:
>
> Remove all comma's
> Replace all @ with comma's
> Save as a new file.
input_file = open("some_huge_file.
On Fri, 04 Jun 2010 22:43:48 -0700, GZ wrote:
> This still does not do what I want it to do. It only displays the diff
> results in a different format. I want a different algorithm to generate
> a smaller diff -- in other words less differences
Can you give a *short* example, showing the output f
On 06/05/10 12:34, John Bokma wrote:
> Lie Ryan writes:
>
>> If you look at Stack Overflow, the highest voted questions are:
>>
>> - Hidden Features of C#?
>> - What is the single most influential book every programmer should read?
>> - What's your favorite "programmer" cartoon?
>> - What is your
On 4 jun, 06:14, "Günther Dietrich" wrote:
> GabrielGenellina wrote:
> >Try the strptime method with a suitable format, like this (untested):
> >delta = now2-now1
> >delta.strftime('%H:%M:%S.%f')
>
> Throws an exception:
>
> |Traceback (most recent call last):
> | File "", line 1, in
> |Attribu
On 06/05/10 15:43, GZ wrote:
> On Jun 4, 8:37 pm, Lie Ryan wrote:
>> On06/05/10 07:51, GZ wrote:
>>> No, rsync does not solve my problem.
>>
>>> I want a library that does unix 'diff' like function, i.e. compare two
>>> strings line by line and output the difference. Python's difflib does
>>> not
On Fri, 04 Jun 2010 22:27:33 -, exar...@twistedmatrix.com
wrote:
: It's possible to plot with matplotlib without a display. I'm not
: surprised you didn't figure out how, though, it's not all that obvious.
Thank you very much. That's a good start. Do you know of any good
documentatio
exar...@twistedmatrix.com writes:
> It's possible to plot with matplotlib without a display. I'm not
> surprised you didn't figure out how, though, it's not all that
> obvious.
http://matplotlib.sourceforge.net/faq/howto_faq.html#plotting-howto
,
| Generate images without having a window po
72 matches
Mail list logo