New submission from Rob Williscroft:
The method header_exists of Tix HList raises:
File "...\python3\lib\tkinter\tix.py", line 926, in header_exists
return self.tk.call(self._w, 'header', 'exists', col)
_tkinter.TclError: unknown option "exists". Must be cget, config
Peter Steele wrote in
news:0c2b3482-df46-4324-8bf9-2c45d3f6b...@googlegroups.com in
comp.lang.python:
On Monday, January 21, 2013 1:10:06 AM UTC-8, Rob Williscroft wrote:
Peter Steele wrote in
news:f37ccb35-8439-42cd-a063-962249b44...@googlegroups.com in
comp.lang.python:
I want
Peter Steele wrote in
news:96947c45-f16b-4e97-b055-edc1241ee...@googlegroups.com in
comp.lang.python:
I just tried running you code, and the sendto call fails with
Network is unreachable. That's what I expected, based on other tests
I've done. That's why I was asking about how to do raw
Peter Steele wrote in
news:f37ccb35-8439-42cd-a063-962249b44...@googlegroups.com in
comp.lang.python:
I want to write a program in Python that sends a broadcast message
using raw sockets. The system where this program will run has no IP or
default route defined, hence the reason I need to use
Roy Smith wrote in news:jro9cj$b44$1...@panix2.panix.com in
gmane.comp.python.general:
Is there any way to conditionally apply a decorator to a function?
For example, in django, I want to be able to control, via a run-time
config flag, if a view gets decorated with @login_required().
andrew cooke wrote in
news:33019705.1873.1333801405463.JavaMail.geo-discussion-forums@ynmm9 in
gmane.comp.python.general:
hi,
please, what am i doing wrong here? the docs say
http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons
in general, __lt__() and __eq__() are
Steven D'Aprano wrote in news:4f7d2475$0$3$c3e8...@news.astraweb.com in
gmane.comp.python.general:
I can connect to an IMAP server using Python 2.6:
steve@runes:~$ python2.6
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
server = imaplib.IMAP4_SSL('x')
But when I try with
Jack Trades wrote in
news:CAG5udOh1+oE4g9Frjp3pucbHUtWcN34KK35a-Xs2YqkZH9X5=w...@mail.gmail.com
in gmane.comp.python.general:
def test():
src = (
def double(x):
return x * 2
)
globals = {}
exec( src, globals )
return globals[ double ]
print( test() )
I looked
Jack Trades wrote in news:CAG5udOiOAge3uHrGSDTZ412GAg+CC-
6u8igoyj0lnf3hnwu...@mail.gmail.com in gmane.comp.python.general:
class CapturingDict(dict):
... def __setitem__(self, key, val):
... self.key, self.val = key, val
... dict.__setitem__(self, key, val)
...
c =
Ethan Furman wrote in news:4e5d29c8.8010...@stoneleaf.us in
gmane.comp.python.general:
Jack Trades wrote:
On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft wrote:
If an impementation (as you say up thread) can populate globals
or locals with whatever they want, then how do you know that last
Arnaud Delobelle wrote in
news:CAJ6cK1YVi3NQgdZOUdhAESf133pUkdazM1PkSP=p6xfayvo...@mail.gmail.com in
gmane.comp.python.general:
On 30 August 2011 13:31, Jack Trades jacktradespub...@gmail.com wrote:
On Tue, Aug 30, 2011 at 2:37 AM, Rob Williscroft r...@rtw.me.uk wrote:
That's brilliant
Jack Trades wrote in
news:CAG5udOg=GtFGPmTB=1ojnvnrpdyucxdokn1wjqmomv9gx0+...@mail.gmail.com
in gmane.comp.python.general:
... I wanted to allow the user to manually return the
function from the string, like this:
a = exec(
def double(x):
return x * 2
double
)
However it seems that
Ven wrote in news:aa1212bb-35e5-4bf9-b8ad-7a3c083749c2
@x2g2000yql.googlegroups.com in gmane.comp.python.general:
So, here is what I did/want:
self.run_button=wx.Button(self.panel,ID_RUN_BUTTON,label='Install')
self.Bind(wx.EVT_BUTTON, self.OnRun,id=ID_RUN_BUTTON)
def OnRun(self,evt):
Nulpum wrote in news:0bf400a3-735c-487a-8d74-
feb3b56be...@g5g2000prn.googlegroups.com in gmane.comp.python.general:
I want to make sure that folder exists.
'2011-07-03' is really exists. but 'os.path.isdir' say false
Does anyone know why?
os.path.isdir(C:\Users\Á¶Ã¢ÁØ\Desktop\logs)
True
Steven D'Aprano wrote in news:4e1fd009$0$29986$c3e8da3
$54964...@news.astraweb.com in gmane.comp.python.general:
I'm designing an API for some lightweight calculator-like statistics
functions, such as mean, standard deviation, etc., and I want to support
missing values. Missing values should
vm wrote in news:in4m1u$hsc$1...@news2.carnet.hr in
gmane.comp.python.general:
def fun1(params_used_below_except_lk_and_lk2):
lk = 0.0
lk2 = 0.0
for raw_data, hist, freq in raw_data_hist_list:
lk2 = lk2 + fun2(some_constants_and_params_from_this_scope)
q =
Rita wrote in
news:AANLkTi=88dcpm_kqrs2g620obsnxz0majubfwpeme...@mail.gmail.com in
gmane.comp.python.general:
[Top post relocated]
On Tue, Feb 22, 2011 at 7:57 PM, Rob Williscroft r...@rtw.me.uk
wrote:
Rita wrote in
news:AANLkTi=w95gxosc1tkt2bntgjqys1cbmdnojhokq4...@mail.gmail.com
Rita wrote in
news:AANLkTi=w95gxosc1tkt2bntgjqys1cbmdnojhokq4...@mail.gmail.com in
gmane.comp.python.general:
When using wait() it works a bit better but not consistent
def run(cmd):
p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
rc=p.wait()
print rc
return p.stdout
When the
Octavian Rasnita wrote in news:0db6c288b2274dbba5463e7771349...@teddy in
gmane.comp.python.general:
Hi,
If I want to create a dictionary from a list, is there a better way
than the long line below?
l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b']
d = dict(zip([l[x] for x in range(len(l)) if x
Jon Dufresne wrote in
news:aanlktikr5euhqpupa3yrid98oas92zfhk8u9lha5y...@mail.gmail.com in
gmane.comp.python.general:
try:
import extension_magic_module
except ImportError:
pass
else:
handle_extension_magic_module()
However, if the the extension module exists but throws
targetsmart wrote in news:cd83533b-f51e-4955-96c5-f8a10185bef1
@i18g2000pro.googlegroups.com in gmane.comp.python.general:
Right now if I want to dump the contents of a generator object I use ,
a snip from a bigger block of code..
try:
while gen: print gen.next()
except StopIteration:
southof40 wrote in news:da3cc892-b6dd-4b37-a6e6-
b606ef967...@t26g2000prt.googlegroups.com in gmane.comp.python.general:
I have list of of N Vehicle objects - the only possible vehicles are
cars, bikes, trucks.
I want to select an object from the list with a probability of : cars
0.7, bikes
Kushal Kumaran wrote in news:1274889564.2339.16.ca...@nitrogen in
gmane.comp.python.general:
On Tue, 2010-05-25 at 20:12 +, Rob Williscroft wrote:
Barry wrote in news:83dc485a-5a20-403b-99ee-c8c627bdbab3
@m21g2000vbr.googlegroups.com in gmane.comp.python.general:
Hi,
The code
Barry wrote in news:83dc485a-5a20-403b-99ee-c8c627bdbab3
@m21g2000vbr.googlegroups.com in gmane.comp.python.general:
Hi,
The code below is giving me the error:
Traceback (most recent call last):
File C:\Users\Administratör\Desktop\test.py, line 4, in module
UnicodeDecodeError: 'utf8'
jim-on-linux wrote in news:mailman.74.1273614703.32709.python-l...@python.org
in comp.lang.python:
python help,
I'm open for suggestions.
I'm using py2exe to compile a working program.
The program runs and prints fine until I compile it with py2exe.
After compiling the program, it
Frank Millman wrote in news:mailman.1360.1270018159.23598.python-
l...@python.org in comp.lang.python:
I came up with a simple solution that seems to work -
class MyTuple(tuple):
... def __new__(cls, names, values):
... for name, value in zip(names, values):
... setattr(cls,
samb wrote in news:5c361012-1f7b-487f-915b-0f564b238be3
@e1g2000yqh.googlegroups.com in comp.lang.python:
Thanks for all those suggestions.
They are good!
1) Let's suppose now that instead of just affecting thing =
m.group(1), I need to do a piece of logic depending on which match I
Michael Rudolf wrote in news:hmdo3m$28...@news.urz.uni-heidelberg.de in
comp.lang.python:
Note that all I did was moving the list and foo into the instance. Still
no self and no cls, but also no static behaviour any more.
Yes in the first case foo was an attribute of the class, and in the
hjebbers wrote in news:2864756a-292b-4138-abfd-
3348b72b7...@u9g2000yqb.googlegroups.com in comp.lang.python:
the information about the error is a windows dump.
This may help:
# http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx
SEM_FAILCRITICALERRORS = 1
SEM_NOALIGNMENTFAULTEXCEPT
mukesh tiwari wrote in news:80fed7d5-76eb-40c8-ace1-0c35736de399
@t17g2000prg.googlegroups.com in comp.lang.python:
Could some one please tell what is wrong with this code. I am trying
to use Queue in this program but i am getting error
The type you appear to be trying to use is Queue.Queue
mk wrote in news:mailman.915.1259064240.2873.python-l...@python.org in
comp.lang.python:
def pythonic():
def unpythonic():
Decidedly counterintuitive: are there special optimizations for if
nonevar: type of statements in cpython implementation?
from dis import dis
dis(
mk wrote in news:mailman.923.1259070092.2873.python-l...@python.org in
comp.lang.python:
MRAB wrote:
In what way is it counterintuitive? In 'pythonic' the conditions are
simpler, less work is being done, therefore it's faster.
But the pythonic condition is more general: nonevar or zerovar
Juliano wrote in
news:0e64893a-af82-4004-bf3c-f397f2022...@g22g2000prf.googlegroups.com
in comp.lang.python:
[snip]
So, for ONE *concept*, we have, usually, MANY *slots*, each *slot* has
ONE *facet*, and each *facet* can have MORE THAN ONE *filler*.
Besides, some *slots* and *fillers* are
Benjamin Kaplan wrote in news:mailman.838.1254682604.2807.python-
l...@python.org in comp.lang.python:
And how do you just check a script's syntax without running it
anyways?
)
Because these aren't compile-time errors. Python has no compilation
phase-
Sure it does, compilation happens
Zac Burns wrote in news:mailman.211.1253559803.2807.python-l...@python.org
in comp.lang.python:
The mysocket.mysend method given at
http://docs.python.org/howto/sockets.html has an (unwitting?) O(N**2)
complexity for long msg due to the string slicing.
I've been looking for a way to
wrote in news:mailman.216.1253565002.2807.python-l...@python.org in
comp.lang.python:
Niether of the CPython versions (2.5 and 3.0 (with modified code))
exibited any memory increase between allocated 1 meg + and end
You bumped into a special case that CPython optimizes. s[:] is s. If
'2+ wrote in news:mailman.1017.1243932401.8015.python-l...@python.org in
comp.lang.python:
would like to take advantage of the wave module
found a good example here:
http://www.python-forum.org/pythonforum/viewtopic.php?f=2t=10644
hmm .. i don't get how to write a stereo .. i mean i can
wrote in news:fe9f707f-aaf3-4ca6-859a-5b0c63904fc0
@s28g2000vbp.googlegroups.com in comp.lang.python:
text = re.sub('(\(/?[^\]+)\)', , text)#remove the HTML
Python has a /r/ (raw) string literal type for regex's:
text = re.sub( r'(\(/?[^\]+)\)', , text )
In raw strings python
John Machin wrote in news:b722bd36-c8f1-4cdf-8625-2550cee21511
@i28g2000prd.googlegroups.com in comp.lang.python:
On May 13, 11:46 am, a...@pythoncraft.com (Aahz) wrote:
In article xns9c09513903e8frtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
Aahz wrote
Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python:
In article xns9c08e179b66d8rtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
db.execute( '''
update sessions set uid = ?
where uid = ?
and exists
gert wrote in news:d7591495-4661-4243-ad7e-f142d8244e88
@e24g2000vbe.googlegroups.com in comp.lang.python:
I am trying to do this in a single transaction, the 3 separate
statements work fine, but i am screwed if they are not executed
together.
Well you're in luck, Python DBAPI 2 connections
Kottiyath wrote in news:d86a0c1d-e158-4aa1-a47f-e2149948bdc3
@p2g2000prf.googlegroups.com in comp.lang.python:
On Jan 29, 1:51 am, Rob Williscroft r...@freenet.co.uk wrote:
Kottiyath wrote in news:6a594643-f6a2-4d8d-aab3-27eb16cb2fb8
@b38g2000prf.googlegroups.com in comp.lang.python:
I
Kottiyath wrote in news:6a594643-f6a2-4d8d-aab3-27eb16cb2fb8
@b38g2000prf.googlegroups.com in comp.lang.python:
I have mingw32-gcc in my path. If I try that too -it fails.
C:\Documents and Settings\Guest\pyAApython setup.py install -c
mingw32-gcc
invalid command name 'mingw32-gcc'
All
Thomas Guettler wrote in news:6tr453fca5h...@mid.individual.net in
comp.lang.python:
Diez B. Roggisch schrieb:
2) create a localhost web server, for the client side manipulation.
Then have your remote webserver render a form that posts via
javavscript to the localhost webserver. The
Diez B. Roggisch wrote in news:6ts0dnfc9s0...@mid.uni-berlin.de in
comp.lang.python:
Rob Williscroft schrieb:
Diez B. Roggisch wrote in news:6tpo16fbacf...@mid.uni-berlin.de in
comp.lang.python:
2) create a localhost web server, for the client side manipulation.
Then have your remote
culpritNr1 wrote in
news:mailman.7713.1232574803.3487.python-l...@python.org in
comp.lang.python:
Hello All,
Say I have a list like this:
a = [0 , 1, 3.14, 20, 8, 8, 3.14]
Is there a simple python way to count the number of 3.14's in the list
in one statement?
In R I do like this
Thomas Guettler wrote in news:6toehtfbrb8...@mid.individual.net in
comp.lang.python:
Sorry, I described my problem not well. Here is more information:
The main application is the intranet web application used with IE (ms
windows client). But some action needs to be done on the client since
Diez B. Roggisch wrote in news:6tpo16fbacf...@mid.uni-berlin.de in
comp.lang.python:
2) create a localhost web server, for the client side manipulation.
Then have your remote webserver render a form that posts via
javavscript to the localhost webserver. The localhost server would
post
Alan G Isaac wrote in news:myhdl.805$aw2@nwrddc02.gnilink.net in
comp.lang.python:
On 1/18/2009 9:36 AM Alan G Isaac apparently wrote:
I do not much care about the disappearance of ``execfile``.
I was asking, why is it a **good thing** that
``exec`` does not accept a TextIOWrapper?
Or
Aaron Brady wrote in
news:6a10378f-addb-4d56-bc1b-0c382b3cb...@t26g2000prh.googlegroups.com
in comp.lang.python:
On Jan 18, 9:36 am, Paul Rubin http://phr...@nospam.invalid wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
def foo(self, x, y=None):
if y is None:
Steven D'Aprano wrote in news:018342f9$0$8693$c3e8...@news.astraweb.com
in comp.lang.python:
I'm not sure if this is a stupid question or not, but what's a
TextIOWrapper? In the example you give:
exec(open(fname))
the argument to exec -- open(fname) -- is a file object:
Aaron Brady wrote in
news:582ef883-0176-4984-9521-6c1894636...@a26g2000prf.googlegroups.com
in comp.lang.python:
On Jan 18, 10:44 am, Rob Williscroft r...@freenet.co.uk wrote:
Aaron Brady wrote
innews:6a10378f-addb-4d56-bc1b-0c382b3cb...@t26g2000prh
.googlegroups.com
in comp.lang.python
wrote in news:a9ed10ff-d907-46f0-8c6a-
c3d95579a...@k1g2000prb.googlegroups.com in comp.lang.python:
To answer to Rob: yeah, sure that would work, but I always thought
Just to note: you're answering a question about testing, but I
answered how to alter the alerter module *for* testing. given
Silfheed wrote in news:c73b304b-f601-4bb5-89c1-3ee667eeb7d9
@l37g2000vba.googlegroups.com in comp.lang.python:
So I'm in the current testing situation:
sender.py:
-
def sendEmails():
return I send emails
alerter.py:
-
from sender import *
def
wrote in news:053df793-9e8e-4855-aba1-f92482cd8922
@v31g2000vbb.googlegroups.com in comp.lang.python:
class TaggedWrapper():
def __init__(self, generator, logMixin, stream):
self.__generator = generator
self.__tag = '%...@%s' % (logMixin.describe(), stream)
wrote in news:d301c93a-8a73-4cbb-9601-fe0c18a94f97
@v5g2000prm.googlegroups.com in comp.lang.python:
I realise I could create my own wrapper that implements __next__ (I am
using Python 3 and haven't checked the exact interface required, but I
guess it's something like that), and add the
Matimus wrote in news:2a3d6700-85f0-4861-84c9-9f269791f044
@f40g2000pri.googlegroups.com in comp.lang.python:
On Jan 6, 5:31 am, Casey casey...@gmail.com wrote:
In PEP 3104 the nonlocal statement was proposed and accepted for
implementation in Python 3.0 for access to names in outer scopes.
trueli...@gmail.com wrote in news:f8099226-a953-4598-bfe2-61ee5772ce26
@l33g2000pri.googlegroups.com in comp.lang.python:
Traceback (most recent call last):
File test.py, line 36, in module
main()
File test.py, line 26, in main
glutInit(sys.argv)
File
Stef Mientki wrote in news:mailman.6399.1230668197.3487.python-
l...@python.org in comp.lang.python:
And, by the way, exec is a *statement*, not a function!
exec ( Init_Code, PG.P_Globals )
I've really doubt that this is a statement,
unless I don't understand what a statement
Steven D'Aprano wrote in news:016abfa1$0$6988$c3e8...@news.astraweb.com in
comp.lang.python:
On Tue, 30 Dec 2008 15:35:28 -0600, Rob Williscroft wrote:
Stef Mientki wrote in news:mailman.6399.1230668197.3487.python-
l...@python.org in comp.lang.python:
And, by the way, exec
silverburgh.me...@gmail.com wrote in news:74b53da4-bf07-431b-898b-
49977f7a6...@r36g2000prf.googlegroups.com in comp.lang.python:
Hi
How can I return a non-zero status result from the script? Just do a
return 1? at the end?
import sys
help( sys.exit )
Help on built-in function exit in
David Pratt wrote in news:mailman.4664.1227980181.3487.python-
[EMAIL PROTECTED] in comp.lang.python:
import new
class FirstBase(object):
foo = 'bar'
biz = 'baz'
class SecondBase(object):
bla = 'blu'
buz = 'brr'
attr = {
'fiz': 'An attribute', 'fuz':
davidj411 wrote in news:a08906ab-ba98-4ce0-a5f9-330f4b287423
@z27g2000prd.googlegroups.com in comp.lang.python:
for some reason this code works:
*
%@ LANGUAGE = Python%
The above is a Directive, in this case it tells ASP what language to use,
but
Steve Holden wrote in news:mailman.3804.1226412496.3487.python-
[EMAIL PROTECTED] in comp.lang.python:
Shouldn't it be GROUP BY master.id? I would have thought that SQL
would be sad about a non-aggregate (master.id) that's in the SELECT
list but not also in the GROUP BY list.
Well, I did
Lawrence D'Oliveiro wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
In message [EMAIL PROTECTED], Rob
Williscroft wrote:
Read (and bookmark) this:
http://www.python.org/doc/2.5.2/lib/re-syntax.html
Funny how you never get a thank-you when you tell people to RTFM.
Saying Thank
Mr.SpOOn wrote in news:mailman.3069.1225039892.3487.python-
[EMAIL PROTECTED] in comp.lang.python:
Hi,
I'd like to use regular expressions to parse a string and accept only
valid strings. What I mean is the possibility to check if the whole
string matches the regex.
So if I have:
p =
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
A colleague wrote a C++ library here at work which uses the
Boost.regex library. I quickly discovered an apparent problem with
how it searches. Unlike re.match the regex_match function in that
library effectively anchors the match at
Paul McGuire wrote in
news:[EMAIL PROTECTED]
in comp.lang.python:
On Oct 18, 1:05 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Paul McGuire wrote:
I've just uploaded to SourceForge and PyPI the latest update to
(Python 3.0 uses syntax for catching exceptions that is
incompatible with Python
=?KOI8-R?B?7cnU0Q==?= wrote in news:f1a77a69-2997-4f53-9a46-
[EMAIL PROTECTED] in comp.lang.python:
class Film(object):
def __init__(self, title):
self.__title = title
@getproperty
def title(self):
return self.__title
@setproperty
def title(self,
[EMAIL PROTECTED] wrote in news:mailman.2448.1223974725.3487.python-
[EMAIL PROTECTED] in comp.lang.python:
Hi!
I wanna write a file processor in python (Windows XP).
I wanna use pipe, and not parameters.
When I write this:
...
l = []
while 1:
t = sys.stdin.read(1)
if t
Bobby Roberts wrote in news:cdc29298-d005-4804-b407-81ecaf6bb1b4@
2g2000hsn.googlegroups.com in comp.lang.python:
I need to be able to offer a client click to download functionality
on their website. Generating the data to provide to them is not an
issue but I want them to be able to click a
Beliavsky wrote in news:d579f554-be4b-4066-acec-49a7bafb1046
@t41g2000hsc.googlegroups.com in comp.lang.python:
I work for a financial company where we run Windows XP and read email
using Microsoft Outlook 2003. I get daily files that come as email
attachments from various counterparties. I
catsclaw wrote in news:d797403a-e492-403f-933a-bd18ef53d5c0
@k13g2000hse.googlegroups.com in comp.lang.python:
I can't for the life of me figure out how to set a callback in
Python. I have a class, which wraps another class. The second class
needs a callback assigned. I don't want to use
Steven D'Aprano wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
So the question is: whats going on with timeit.Timer ?
As far as I can see, nothing. I think you have misunderstood the results
you got.
No, the answer is that is it repeats a million times. It might better be
called
Stefaan Himpe wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Nothing weird about this ...
The difference will become larger as your input value becomes larger.
You can easily understand why if you try to calculate fib(10) by hand,
i.e. work through the algorithm with pencil and
wrote in news:7ae96aff-c1a7-4763-8db7-
[EMAIL PROTECTED] in comp.lang.python:
Hi folks,
I am trying to tee off both stdout and stderr from a process run
through Popen.
As a test, I am first trying to print the output below:
from subprocess import Popen,PIPE
...
p1 = Popen(['cvs',
Martin v. Löwis wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
The end result of that is on a 32-bit machine IronPython runs in a
32-bit process and on a 64-bit machine it runs in a 64-bit process.
That's probably not exactly true (although I haven't checked).
When you start a
Martin v. Löwis wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
I just tested, I built a default C# forms app using the AnyCPU
option and it ran as a 64 bit app (no *32 in Task Manager), this is
on XP64.
I have though installed the AMD64 version of the 2.0 framework and
AFAICT
Jive Dadson wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Hey folks!
There are various web pages that I would like to read using urllib, but
they require login with passwords. Can anyone tell me how to find out
how to do that, both in general and specifically for YouTube.com.
A
Alex wrote in news:09764c57-03ce-4ccb-a26d-
[EMAIL PROTECTED] in comp.lang.python:
Hi all.
Is there a bug in the urlunparse/urlunsplit functions?
Look at this fragment (I know is quite silly):
urlunparse(urlparse('www.example.org','http'))
--- 'http:///www.example.org'
^
Lorenzo Stella wrote in news:7956f925-1037-49ea-a360-b58d627ffb20
@z24g2000prf.googlegroups.com in comp.lang.python:
Hi all,
I'm trying to write a simple script for sending sms via vyke... I have
to make a https
connection and pass some data with the POST method, like this perl
script does:
Tzury Bar Yochay wrote in news:3a6c32fe-e7c1-4230-882d-efb3415196c1
@b1g2000hsg.googlegroups.com in comp.lang.python:
for example:
the value
'EE604EE3-4AB0-4EE7-AF4D-018124393CD7'
is represent as
'\xe3N`\xee\xb0J\xe7N\xafM\x01\x81$9\xd7'
from uuid import *
u = UUID( bytes =
John Nagle wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Does
text = unicode(text)
make a copy of a Unicode string, or is that essentially a
free operation if the input is already Unicode?
John Nagle
Nicola Musatti wrote in news:92dfc2fc-0677-43c0-b34f-4f240fa40205
@e4g2000hsg.googlegroups.com in comp.lang.python:
Note there is a wxpython mailinglist/newsgroup:
news:gmane.comp.python.wxpython
[snip]
problem lies in the fact that apparently ShowModal() does not return
when either
Ant wrote in news:34a84caa-5387-40a2-a808-
[EMAIL PROTECTED] in comp.lang.python:
[snip]
So I have two questions really:
1) Is there a module out there for extracting files from an ISO?
There are command line programs that can do this:
SMALLp wrote in news:[EMAIL PROTECTED] in comp.lang.python:
Hy! I nave another problem I can't solve!
code
import MySQLdb as mysql
cursor = conn.cursor()
sql = SELECT COUNT(*) FROM + dataTable
res = cursor.execute(sql)
I think you need to do:
res = cursor.fetchone()[0]
print
bill ramsay wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Hi
I have successfully connected to SQL2000 and MSDEE databases in the
Conn = Dispatch('ADODB.Connection')
Conn.ConnectionString = Provider=SQLNCLI;Server=10.1.1.2;
Database=csrctest;Uid=bill;Pwd=bill
By default
On Wed, 12 Sep 2007 22:09:30 +0200, Laszlo Nagy wrote:
Hi,
I want py2exe not to create library.zip. My reason is that the installed
program will be a self updating program, and it must be able to download
changes (newer python source files) from the server. So the files should
not be in
On Fri, 15 Jun 2007 14:30:36 -0700, nano wrote:
Using python 2.2 what is the simplest way to get the current date value?
I have looked in so many places. The question is often asked and the
usual response indicates how to get the current date and time like
now = time.localtime()
I want
On Fri, 15 Jun 2007 14:46:20 -0700, nano wrote:
In article [EMAIL PROTECTED], [EMAIL PROTECTED]
says...
On Fri, 15 Jun 2007 14:30:36 -0700, nano wrote:
Using python 2.2 what is the simplest way to get the current date
value? I have looked in so many places. The question is often asked
no`name` wrote in news:[EMAIL PROTECTED]
in comp.lang.python:
maybe someone have some ideas how to block first stdin in main
function and get stdin from the thread when here is a new connection?
No, but you could instead use a Queue:
http://docs.python.org/lib/module-Queue.html
so
Ron Garret wrote in news:rNOSPAMon-B77D6B.12263417052007
@news.gha.chartermi.net in comp.lang.python:
PACKAGE CONTENTS
handlers
headers
simple_server
util
validate
Reading the documentation can be useful sometimes. Recommending
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
[] == []
True
['-o'] == []
False
['-o'] == False
False
To test wether something is true use if.
To test wether something is false use if not.
The python values True and False are for when you need to
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
If I have a button widget
w = Button(root, text = Button, state = 'disabled')
How can I get the value of option 'state' from the widget 'w'.
I want something like --
print w.state to print out 'disabled'
print w.cget( state )
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Hi,
I am hitting this error consistently and don't know why it's
happening. I would like to define all exceptions for my project in one
file and use them across the project. Here's a sample -
exceptions.py -
from exceptions
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Hi,
I need a specific example. I have seen the docs, but I don't all the
stuffs there.
from ConfigParser import ConfigParser
Now I want to know how to read a section, a section attribute's value,
and to write thoses back after
[EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED] in
comp.lang.python:
Below are my source code:
import wx
import wx.html
class MyHtmlFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, -1, title, size=(600,400))
html =
siggi wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
Hi all,
a newbie question:
I have a program gui03A.py using wxPython, importing it such:
from wxPython.wx import *
The program works, but I get the warning message:
gui03A.py:4: DeprecationWarning: The wxPython
John Machin wrote in news:1167008799.074885.250770@
73g2000cwn.googlegroups.com in comp.lang.python:
Given a = Adder(),
a.tally = 0
gets AttributeError: 'Adder' object attribute 'tally' is read-only
a.notinslots = 1
gets AttributeError: 'Adder' object attribute 'notinslots' is
John Machin wrote in
news:[EMAIL PROTECTED] in
comp.lang.python:
Rob Williscroft wrote:
John Machin wrote in news:1167008799.074885.250770@
73g2000cwn.googlegroups.com in comp.lang.python:
Given a = Adder(),
a.tally = 0
gets AttributeError: 'Adder' object attribute 'tally' is read
1 - 100 of 173 matches
Mail list logo