Hello,
On Fri, Feb 18, 2011 at 09:40:19AM +0500, Andrea
Gavana wrote:
> Fails with a variety of errors depending on which port I use:
>
> - Port 80: urllib2.HTTPError: HTTP Error 407: Proxy Authentication
> Required ( The ISA Server requires authorization to fulfill the
> request. Access to the W
Hello,
On Thu, Feb 17, 2011 at 02:40:22AM -0800, pstatham
wrote:
> I've installed the cx_Oracle module for Python
> and I'm trying to connect to my remote Oracle
> db.
Can you tnsping your remote Oracle DB
successfully?
> >>> uid = "scott"
> >>> pwd = "tiger"
> >>> service = "10.5.1.12:1521:PR10
On 21.02.2011 23:30, KevinSimonson wrote:
I've been teaching myself Python from the tutorial routed at "http://
www.tutorialspoint.com/python/index.htm". It's worked out pretty
well, but when I copied its multithreading example from the bottom of
the page at "http://www.tutorialspoint.com/python
On 22.02.2011 00:34, Westley Martínez wrote:
On Mon, 2011-02-21 at 11:28 -0800, rantingrick wrote:
The ascii char "i" would suffice. However some languages fell it
necessary to create an ongoing tutorial of the language. Sure French
and Latin can sound "pretty", however if all you seek is "pre
Hello out there,
- what is the reason, that __slots__ are introduced in python?
- I want to use slots to define a class where no attributes are added at
runtime. Is that a good idea to use slots for that?
Regards
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
Ixokai wrote:
In what possible way is:
setattr(foo, 'new_attr', 'blah')
getattr(foo, 'new_attr')
delattr(foo, 'new_attr')
Better then:
foo.new_attr = 'blah'
foo.new_attr
del foo.new_attr
I don't understand what your argument is or problem is with the regular
syntax,
Stephen Hansen wrote:
On 6/26/10 9:01 AM, Alexander Kapps wrote:
While I personally don't agree with this proposal (but I understand why
some people might want it), I can see a reason.
When disallowing direct attribute creation, those typos that seem to
catch newcommers won't happ
Bruno Desthuilliers wrote:
Alexander Kapps a écrit :
(snip)
While I personally don't agree with this proposal (but I understand
why some people might want it), I can see a reason.
When disallowing direct attribute creation, those typos that seem to
catch newcommers won't happen any
Alexander Kapps wrote:
Bruno Desthuilliers wrote:
Alexander Kapps a écrit :
(snip)
While I personally don't agree with this proposal (but I understand
why some people might want it), I can see a reason.
When disallowing direct attribute creation, those typos that seem to
catch newco
Mark Lawrence wrote:
On 28/06/2010 20:23, Alexander Kapps wrote:
UHHM! Forget it. This of course doesn't work with setattr too. My
stupidness. :-(
Don't worry too much, looks like your nation's football is much better
than your settattr knowledge.
I very much appreciate
Martineau wrote:
Perhaps it's hidden somewhere, but I couldn't find the .chm help file
in the python-2.7.msi file using 7-zip, nor saw anything that looked
like a Doc folder embedded within it -- so I doubt installing it on a
Windows machine would work any better.
I don't know much about the .
Hello,
- I've to write a XML document including comments
- the document should be formatted that it could be viewed with a text editor
What is the fastest (time for realization) approach doing it in python 2.5?
Any help or hints are very welcome
Thanks
Alexander
--
http://mail.pytho
King wrote:
Hi,
I am writing a python package deployment tool for linux based
platforms. I have tried various existing
tool sets but none of them is up to the mark and they have their own
issues. Initially I'll start with simple approach.
I'm sorry, but your approach is not going to work. The
Stefan Behnel schrieb:
Alexander Eisenhuth, 08.07.2010 11:08:
- I've to write a XML document including comments
"write" in the sense of typing in a text editor? Or constructing one
programmatically in memory? Or ... ?
write means write to a file
And what kind of data fr
Sorry for my little riddle, but you solved it quite good with:
- http://effbot.org/zone/element-lib.htm#prettyprint
and comments are also in ElementTree (xml.etree.ElementTree.Comment)
Thanks
Stefan Behnel schrieb:
Alexander Eisenhuth, 08.07.2010 12:07:
Stefan Behnel schrieb:
Alexander
King wrote:
On Jul 8, 2:21 pm, Alexander Kapps wrote:
King wrote:
Hi,
I am writing a python package deployment tool for linux based
platforms. I have tried various existing
tool sets but none of them is up to the mark and they have their own
issues. Initially I'll start with simple app
literal for float(): -1.#IND
- I'm not sure what -1.#IND means. Can somebody assist?
- As pickle write the data I'm a bit confused, that is can't be unpickled it. Is
that a bug or a feature?
BTW: I'm tied to version 2.5 of python
Thank and regards
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
Mark Dickinson schrieb:
BTW: I'm tied to version 2.5 of python
Have you tried using pickle protocol 1 or 2, instead of pickle
protocol 0? That may well solve your problem. (Those
protocols write out the binary form of a float directly, instead
of reading and writing a string representatio
Hello,
On Wed, Aug 11, 2010 at 02:29:24PM -0700, tormod wrote:
> I've tried countless times to build & install cx_Oracle on Python
> 3.1.2, and failed every time, so I'd like to ask someone for help.
...
> I've opened the cx_Oracle.pyd with Dependency Walker (http://
> www.dependencywalker.com/) a
Jed wrote:
Hi, I'm seeking help with a fairly simple string processing task.
I've simplified what I'm actually doing into a hypothetical
equivalent.
Suppose I want to take a word in Spanish, and divide it into
individual letters. The problem is that there are a few 2-character
combinations that
Ross Williamson wrote:
Hi All
Is there anyway in a class to overload the print function?
In Python <= 2.x "print" is a statement and thus can't be
"overloaded". That's exactly the reason, why Python 3 has turned
"print" into a function.
class foo_class():
def __print__(self):
Hello,
On Mon, Aug 16, 2010 at 08:01:36PM +1000, James Mills wrote:
> In an effort to avoid re-inventing the wheel so to speak
> I was wondering if anyone's come across libraries/tools, etc
> that achieve the same kind of functionality as the tools
> library in this java app.
unfortunately, no (e
Hello,
On Thu, Aug 26, 2010 at 08:08:42PM -0700, Cliff
Martin wrote:
> I have just gotten done building Python 3.1.2 on
> HPUX 11.31 Itanium (IA64) using gcc 4.4.3, and
> have tried building cx_Oracle to go with it. The
> build succeeds, but test and importing does not.
> I have tried building Pyt
Hello,
On Sat, Aug 28, 2010 at 09:27:05AM -0400, Cliff
Martin wrote:
> Yes, our entire toolchain is 64 bit - a mix of
> stuff I have downloaded and built and some
> packages from HP (in the form of depot files)
> GCC was downloaded from HP, for example.
I see. I bootstrapped from bundled cc, henc
Nik the Greek wrote:
cursor.execute(''' SELECT hits FROM counters WHERE page = %s and
date = %s and host = %s ''' , a_tuple )
and
cursor.execute(''' SELECT hits FROM counters WHERE page = %s and
date = %s and host = %s ''' , (a_tuple) )
are both syntactically correct right?
buw what about
c
sandric ionut wrote:
Three things: When quoting code, do it exactly, and without wordwrap
in your mail program. There are so many typos in that code sample that
it's useless, presumably because you didn't use copy/paste
The code was COPY and PASTE -> presume wrong
When quoting an
Chris Withers wrote:
Alexander Kapps wrote:
Instead you want something like:
except smtplib.SMTPException, msg
print "eroare: " + msg
Err, that's still concatenating a string and an exception object.
OUCH! What a stupid error. Thanks for correction. :-)
What *would* w
Thomas Jollans wrote:
I would use another os like Linux or Windows 2000, but this particular
computer can't even seem to handle even the most minimal graphical
Linux distributions.
Really? I'm sure you can get Linux on there somehow. It might not be trivial,
but it should definitely be possib
hexusne...@gmail.com wrote:
On Aug 31, 2:04 pm, Thomas Jollans wrote:
On Tuesday 31 August 2010, it occurred to hexusne...@gmail.com to exclaim:
I'm not guessing that this is a problem on Windows 98, but on Windows
ME modules in /Lib don't seem to load. Examples include site.py and
os.py whi
Baba wrote:
level: beginner
how can i access the contents of a text file in Python?
i would like to compare a string (word) with the content of a text
file (word_list). i want to see if word is in word_list. let's assume
the TXT file is stored in the same directory as the PY file.
def is_valid
Hello,
On Wed, Sep 01, 2010 at 09:56:18AM -0700, cerr
wrote:
> I want to download a file from a client using
> paramiko. I found plenty of ressources using
> google on how to send a file but none that
> would describe how to download files from a
> client.
Download files from remote to local?
Ge
In PicoLisp:
(mapcar
'((X) (apply conc (cdr X)))
(group List) )
Cheers,
- Alex
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
On Fri, Sep 24, 2010 at 04:51:01PM +0100, Nobody
wrote:
> On Thu, 23 Sep 2010 21:41:19 +0200, Matthias
> Guentert wrote:
> > I would like to create an IP tunnel using the
> > IP protocol type 4 (socket.IPPROTO_IPIP) on a
> > Linux host. (I also would be happy if I could
> > create a GRE tun
On 18.10.2010 23:24, Devin M wrote:
Hello, I am using os.path to get the absolute paths of a few
directories that some python files are in.
FIlePath = os.path.dirname(os.path.realpath(__file__))
which returns a path similar to /home/devinm/project/files
Now I want to get the directory above this
On 19.10.2010 21:57, Seebs wrote:
So, I'm messing around with pylint. Quite a lot of what it says
is quite reasonable, makes sense to me, and all that.
There's a few exceptions.
One: I am a big, big, fan of idiomatic short names where appropriate.
For instance:
catch, e:
I don't want
On 20.10.2010 00:36, Seebs wrote:
On 2010-10-19, Martin P. Hellwig wrote:
Well, as with all styles IMHO, if there is a _good_ reason to break it,
then by all means do, but you might want to consider putting in a
comment why you did that and add the #pylint: disable-msg=
on that line. If that is
Hello,
On Thu, Oct 21, 2010 at 12:26:50PM +, Steven
D'Aprano wrote:
> I know what you're thinking: "it's easy to cache
> the next result, and return it on the next
> call". But iterators can also be dependent on
> the time that they are called, like in this
> example:
>
> def evening_time():
Hello,
On Thu, Nov 04, 2010 at 09:20:04PM +, Arnaud
Delobelle wrote:
> Tough requirement, but I think I've got it. Two
> lambdas, one reduce, one map ;)
>
> >>> a = {'a' : {'b' :{'/' :[1,2,3,4], 'ba' :{'/' :[41,42,44]}, 'bc'
> >>> :{'/':[51,52,54], 'bcd' :{'/':[68,69,66]}}},'c' :{'/' :[5,6,
Hello,
On Thu, Nov 04, 2010 at 02:10:12PM -0700, macm
wrote:
> > > How convert list to nested dictionary?
> >
> > l
> > > ['k1', 'k2', 'k3', 'k4', 'k5']
> > result
> > > {'k1': {'k2': {'k3': {'k4': {'k5': {}}
>
> http://www.amk.ca/python/writing/functional
so, why didn't you try pyt
Hello,
On Tue, Nov 09, 2010 at 09:32:17AM -0800, macm wrote:
> dict1 = {'ab':[[1,2,3,'d3','d4',5],12],'ac':[[1,3,'78a','79b'],
> 54],'ad': [[56,57,58,59],34], 'ax': [[56,57,58,59],34]}
> dict2 = {'ab':[[22,2,'a0','42s','c4','d3'],12],'ab':[[2,4,50,42,'c4'],
> 12],'ac':[[1,3,'79b',45,65,'er4'],54],
On Thu, Nov 11, 2010 at 11:51:33AM +0200,
Alexander Gattin wrote:
> functional-style code emerges:
>
> > >>> dict(filter(lambda t: t[1],
> > ... map(lambda k: (k, filter(lambda v: v in dict2[k][0], dict1[k][0])),
> > ...fil
Hello,
On Fri, Nov 12, 2010 at 12:00:55PM -0800, Brett
Bowman wrote:
> MRAB -
> I've tried worker threads, and it kills the
> thread only and not the program as a whole. I
> could use that as a work-around, but I would
> prefer something more direct, in case other
> problems arise.
Looks like th
You can now buy regular tickets
for Europe’s largest Python conference.
After the early bird tickets sold out in just eight hours,
standard rate tickets are now available:
Student: EUR 130.- incl. VAT
(only available for students and postdocs; please bring your student card)
Personal: EUR 375.
We are pleased to announce our next keynote speaker for
EuroPython 2017:
* Armin Ronacher *
About Armin Ronacher
Armin Ronacher has founded a number of Python open source projects.
Most notably, he is the creator of Flask,
a popular
We are pleased to announce our next keynote speaker for
EuroPython 2017:
* Katharine Jarmul *
About Katharine Jarmul
Katharine Jarmul is a pythonista and founder of Kjamistan,
a data consulting company in Berlin, Germany.
She’s been using P
We are pleased to announce our next keynote speakers for EuroPython 2017:
** Aisha Bello & Daniele Procida **
About Aisha
Aisha currently serves as vice chair for the Python Nigeria community.
She has helped co-organized and support a number of Django
e
of `tempnam' is dangerous, better use `mkstemp'
collect2: ld returned 1 exit status
How this can be fixed?
Thanks,
Alexander
--
https://mail.python.org/mailman/listinfo/python-list
Finney wrote:
"Alexander N. Moibenko" writes:
/opt/python/Python-2.7.12/./Modules/posixmodule.c:7578: warning: the
use of `tempnam' is dangerous, better use `mkstemp'
collect2: ld returned 1 exit status
How this can be fixed?
The clearest answer is already there in the warn
In fact I tried issuing commands manually, but they did not give me any
hint more than I already had.
In python 2.6 this all works with the same libc, of course (because I
tried to compile on the same machine).
Thanks anyway.
On 09/08/2016 01:22 AM, dieter wrote:
"Alexander N. Moi
wrote:
On Fri, Sep 9, 2016 at 12:48 AM, Alexander N. Moibenko
wrote:
In fact I tried issuing commands manually, but they did not give me any hint
more than I already had.
In python 2.6 this all works with the same libc, of course (because I tried
to compile on the same machine).
Can you
On 09/08/2016 11:06 AM, Rustom Mody wrote:
On Thursday, September 8, 2016 at 8:57:23 PM UTC+5:30, Alexander N. Moibenko
wrote:
Yes this Linux Red Hat 6.
[enstore@dmsen02 enstore-log]$ cat /etc/redhat-release
Scientific Linux Fermi release 6.5 (Ramsey)
Please note that the same set of
On 09/08/2016 12:19 PM, Chris Angelico wrote:
On Fri, Sep 9, 2016 at 2:50 AM, Alexander N. Moibenko wrote:
The output is long so, I am replying to you only:
Not too long, fortunately. Replying back to the list with a trimmed version.
make[1]: Entering directory `/opt/enstore/src
Hi,
I need a Python NNTP module that is capable of doing "MODE STREAM" as
client and as server. Does anyone here know of such a module except
the twisted.protocols.nntp module?
Cheers,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://streetkids.dk/
--
http://mail.python.o
sides on whether
then-Attorney General John Ashcroft had the power under federal law in 2001 to
bar distribution of controlled drugs to assist suicides, regardless of state
law.
>>>
#v-
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> perl -e 'print "Hello, world\n"'
python -c 'print "Hello, world"'
Cheers,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
the rightmost) will be created if it does not exist. This
is recursive
#v-
Cheers,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
>>
>> What can I do?
>>
>> Thank you in advance.
>> Stefan
>
> Leave out the "0x" prefix and tell long() that you're using
> base 16:
>
>>>> long("", 16)
> 4294967295L
It's sufficient to tell long() th
BroLewis wrote:
> I have been trying for several weeks now to write a program that
> allows me to read the stdout of a process that I spawn and once
> I receive feedback, act appropriately.
Have you looked into the 'commands' module?
Cheers,
--
Klaus Alexander Seistrup
! python
print 'Hello, world!'
# eof
$ /tmp/hello.py
bash: /tmp/hello.py: python: bad interpreter: No such file or directory
$
#v-
Cheers,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://streetkids.dk/
--
http://mail.python.org/mailman/listinfo/python-list
bin/env')
> (3) 'python' can be found in the environment variable path (no need
> for 'env' utility)
Sure, I wasn't fair. But look here:
#v+
$ python /tmp/hello.py
Hello, world!
$ which python
/usr/bin/python
$
#v-
I do not know the syntax of the shebang-line,
Linux distribution. Free-, Net- and OpenBSD in turn only come
with /usr/bin/env. So the env-mechanism is increasing conven-
ience, but not strictly assuring portability.«
Cheers,
--
Klaus Alexander Seistrup
PNX · http://pnx.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Justin Ezequiel wrote:
> Try
>
> lambda_hrs = lambda x: (x/60,x%60)
Or
#v+
lambda_hrs = lambda x: divmod(x, 60)
#v-
Cheers,
--
Klaus Alexander Seistrup
PNX · http://pnx.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Falc wrote:
> So if you have any books you could reccomend me that would rock, I
> can't really afford a book so if online that would be excellent.
Have you looked into:
<http://wiki.python.org/moin/BeginnersGuide>
<http://python.org/doc/Intros.html>
Cheers,
--
K
Hi
Am 16.01.2005 12:44:27 schrieb Miki Tebeka:
> 1. There is PyMedia (http://pymedia.org/)
Is this library able to extract single images from a video? AFAICS it
can only convert videos from one format to another. But I didn't try it,
I've looked only in the docu.
Maybe pyVideo (http://www.geoci
e for Python: <http://pysqlite.org/>.
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
lmOS 5.2.1).
The .prc installs without any problems, and I can start the Python
interpreter, but nothing happens if I ring in a Python expression and
press return -- the prompt just "hangs" and never returns.
Any ideas?
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
h
#x27;s name:
>>> EM_SPACE = u'\N{EM SPACE}'
>>> fracture = myline.split(EM_SPACE)
?
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
y:
(opts, args) = getopt.getopt(argv[1:], shortOpts, longOpts)
except getopt.error, msg:
die(msg)
# end try
# [...]
for (opt, arg) in opts:
# Handle all options
:
# end for
#v-
Additional, non-option, arguments will be in the "args" variable.
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Say, are floats implemented? Comparisons seem to work, but print'ing
doesn't:
#v+
>>> 1.0 > 0.5
True
>>> print 1.23
%.*g
>>>
#v-
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I tried to use the aggdraw module, but ...
With Python 2.4.2 und aggdraw 1.1 the following code produces a memory
leak.
With Python 2.3.5 and aggdraw 1.2a1 it works, but unfortunately on the
effbot-site there is only a version of aggdraw compiled for Python 2.3.
---snip---
import aggdraw
p =
Tom skrev:
> newDirectory = str(sys.argv[1:])
Try
newDir = '/'.join(sys.argv[1:])
or
newDir = sys.argv[1]
or
for newDir in sys.argv[1:]:
:
or something along those lines, depending on how you wish to
interpret the commandline.
Cheers,
--
Kl
ot;t"],
> ["c", "a", "t" ] ]
#v+
>>> t = [ "a", "b", "c", "n", "a", "a", "t", "t", "t" ]
>>> [t[i::3] for i in range(3)]
[['a', 'n', 't'], ['b', 'a', 't'], ['c', 'a', 't']]
>>>
#v-
Cheers,
--
Klaus Alexander Seistrup
SubZeroNet, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
odepoint.keys()) + ');')
def dehtml(s):
return re.sub(
myrx,
lambda m: unichr(htmlentitydefs.name2codepoint[m.group(1)]),
s
)
# end def dehtml
if __name__ == '__main__':
import sys
print dehtml(sys.stdin.read()).encode('utf-8')
# end
Rares Vernica wrote:
> How does your code deal with ' like entities?
It doesn't, it deals with named entities only. But take a look
at Fredrik's example.
Cheers,
--
Klaus Alexander Seistrup
København, Danmark, EU
http://klaus.seistrup.dk/
--
http://mail.python.org/mailm
r lists or dictionaries?
Lists have an index method:
#v+
>>> L = list(T)
>>> L.index('Three')
2
>>>
#v-
Dictionaries are unordered and hence indices don't make much sense.
Mvh,
--
Klaus Alexander Seistrup
SubZeroNet, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
ters seems to be missing from the unicodedata
module (2477 missing characters when checking against the latest
database from unicode.org¹). Is this a deliberate omission?
Cheers,
Klaus.
¹) http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
--
Klaus Alexander Seistrup
SubZeroNet, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
thon interpreter.
> in other words, you get whatever version that was used to create
> the Unicode data set in your Python distribution.
I see.
> iirc, 2.4 uses Unicode 3.2, and 2.5 uses Unicode 4.1. to update,
> use the tools under Tools/unicode.
Thanks for the hint.
Mvh,
gt; import re
>>> re.findall(r'\d+', 'Total size: 173233 (371587)')
['173233', '371587']
>>>
#v-
Mvh,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://surdej.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Lazy Lad wrote:
> Is there a blog application source available in Python?
Several. Did you try Google before you posted your question? The search
term "python blog" has <http://wiki.python.org/moin/PythonBlogSoftware>
within the first 10 hits.
Cheers,
--
Klaus
Grant Edwards wrote:
> Find an NNTP server and read it as a newsgroup.
Or Google Groups: http://groups.google.com/group/comp.lang.python
Cheers,
--
Klaus Alexander Seistrup
Dyssegård, Denmark
http://surdej.dk/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> if histogram.has_key(s):
> histogram[s] += 1
> else:
> histogram[s] = 1
I wonder if
histogram[s] = histogram.get(s, 0) + 1
would be more efficient...
Cheers,
--
Kla
Fredrik Lundh wrote:
> note that DSU is built into Python these days:
>
> L.sort(key=transform)
Sweet, thanks for the hint.
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Pekka Karjalainen wrote:
> You can omit the call to math.sqrt if you test this instead.
>
> y*y > x
>
> in place of if y > maxfact: .
Or use
sqrt = lambda x: x ** .5
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/ma
ing. You
might also want to trap errors in a try-except statement.
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
o escaping was done.
Using "cd '%s' ; unzip '%s'" as your formatting string should work.
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
ody method
The 'linebreaks' are probably '\r\n' pairs, so you could do a
buf.replace('\r\n', '\n')
to convert all such pairs to single LFs (buf being the buffer or
string that holds the text with 'linebreaks').
Cheers,
--
Klaus Alexander Seist
Rweth wrote:
>for aline in buf:
> bufHeal.append(aline.replace('\r\n', '\n'))
What does one single aline look like?
> s.body(id,afile)
Does the 'afile' contain a filename or a filepointer?
Cheers,
--
Klaus Alexander Seistrup
http://klaus.s
Rweth wrote:
> so afile contains a filename.
> One single aline looks like so:
>''
Beats me where those empty lines come from, it doesn't seem to
happen in nntplib.
Does the same thing happen if you pass .body() a filepointer?
Cheers,
--
Klaus Alexander Seistrup
it does not exist. This is
recursive.
#v-
Cheers,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I tried to fix this by changing the locale back to "English"
> before creating cookies and that works on Windows but not for
> Linux. If I use "en_EN.ISO8859-1" it works on Linux but not
> on Windows.
How about setting locale to &quo
Mage wrote:
> I tried to write a proxy script for "psql" command. I need some
> query log. I failed to read from the file object.
The psql command is probably linked against readline; did you look
in the ~/.psql_history file?
Cheers,
--
Klaus Alexander Seistrup
Magnetic
Michele Ferretti wrote:
> ok, sorry, but subject is very explicit!
Still, it's insufficient for those of us who doesn't know what WordPress
is, and it's a waste of time for those of us who don't speak Italian.
C'mon, pal, you can do much better than that!
Michele Ferretti wrote:
> ok, sorry, but subject is very explicit!
Still, it's insufficient for those of us who don't know what WordPress
is, and it's a waste of time for those of us who don't speak Italian.
C'mon, pal, you can do much better than that!
--
Klaus
dcrespo wrote:
> Does PySQLite run on Linux?
There are specific python modules for SQLite on Linux.
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
2, 3, 23, 4, 24, 5, 25, .
If the order is unimportant you could use:
#v+
>>> tuple(set(range(10)) | set(range(20,30)))
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
>>>
#v-
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Den
'Read %d files' % (len(files_and_lines),)
#v-
Add proper error checking.
At least, I think the [].append() method is what you're looking for.
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Rotary wrote:
> I want to say something like that: if msg is empty ...then do
> something. So how can i figure that msg is empty string (no
> character, msg = '').
#v+
if not msg:
print 'msg is empty'
#v-
--
Klaus Alexander Seistrup
Magnetic Ink, Copenh
ÒÊÃÉɽÈË wrote:
> thanks
Did you try Google:
<http://www.google.com/search?q=python+regular+expressions>
First hit is:
<http://www.amk.ca/python/howto/regex/>
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmark
http://magnetic-ink.dk/
--
http://
HMS Surprise wrote:
> Have I misused .extend?
The .extend() method expects an iterable, try .append() instead.
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-list
Hi everybody
i'm wondering if there's a way to enable
Anti-Aliasing for the Graphics Object in wxPython.
in Java i do this:
((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
i haven't found anything like this in wxPython yet.
401 - 500 of 546 matches
Mail list logo