(I ask because I often recommend
> SQLite, but would like to temper that advice if in some cases these
> setup problems would cause someone trouble.)
>
> -Peter
My experience on Cygwin was that I had to install sqlite before pySqlite
worked. Maybe that's what was meant.
re
ies? what's could be wrong?
> thanks for any help rendered.
>
You should try adding "/path/to/sybase" to sys.path as well as/rather
than putting it in an environment variable. sys.path is what the
interpreter uses to find importable modules.
regards
Steve
--
ecommend that you direct the members to the tutor list rather
than trying to shore up an ineffective initiative.
Good luck either way.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www
>
You'll definitely need something to call the database API functions, I
suspect.
You could do a *private* install of the module though, surely, on your
web host?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
much about how the spammers
operate and how the web really works. Generally speaking any attempt to
"fight back" by generating more traffic and more search engine entries
will only make things worse. They certainly *won't* go away if you don't
ignore them, and they *probably* wo
re you can you can get lot's of
> suggestions for a suitable replacement.
>
I have a _mysql.c as a part of my distrbution of MySQLdb. Don't you?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
I was under the impression that IronPython is like CPython and Jython,
namely an implementation of the Python language. So in that sense it is
exactly like normal Python, although I don't know how convenient it is
to deploy.
I was also under the impression that Python for .NET is like an API
wrapp
I don't know exactly what a COM object is, but those aren't them. The
win32com package takes care of converting everything to Python types.
The excel call returns a tuple of tuples. That is, the outer tuple is
the sequence of rows, and each such row is itself a tuple with one
member per column requ
Thomas Bartkus wrote:
> "Steve Holden" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Thomas Bartkus wrote:
>>
>>>Well, I'm looking at the source for the ever popular MySQLdb library. It
>>>appears to be nothing but st
you might email Barry to see whether he has
taken any action on the pre-PEP, or that a post to python-dev simply
inquiring whether anyone has read the pre-PEP might be appropriate.
In the absence of evidence to the contrary, treat this situation as
accidental rather than deliberate. Two mon
a solution?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
junior member. Such a
>
>
> I like the general idea but not your formula. If the most junior team
> member was 1 month out of school, would it really be OK for the
> supervisor to be somebody who graduated 3 months ago?-)
>
It worked for Microsoft ...
regards
Steve
--
S
es you.
>
>
> No matter wat the OO model is, I don't think the following code
> exhibits sane behaviour:
>
> class A:
> a = 1
>
> b = A()
> b.a += 2
> print b.a
> print A.a
>
> Which results in
>
> 3
> 1
>
I don't suppose you&
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>
>>>class A:
>>> a = 1
>>>b = A()
>>>b.a += 2
>>>print b.a
>>>print A.a
>>>Which results in
>>>3
>>>1
>>>
>>
>>I don
Robert Kern wrote:
> Steve Holden wrote:
>
>>Sorry about this almost off-topic post, but I am guessing there must be
>>other readers of this group who use Thunderbird (in my case 1.0.2) to
>>access it as gmane.comp.general.python.
>>
>>I'm currently sho
mmunity is much more welcoming than
that of most programming languages, which is important if you are
looking for support as your familiarity with the language grows.
Good luck with your Python advocacy.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
to the fully portable
import os
print os.path.basename(filepath)
that Robert Dowell suggested in immediate response to your post?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
hread qualify their opinions with "IANAL", but on second
thoughts I suppose that's fairly obvious by the fatuaous and inaccurate
nature of many of the observations.
Man, I'm beginning to really dislike Xah Lee.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494
defined name resolution order to
locate a value that was bound to the name "a" in class scope. So what?
This is a long-documented fact of Python life. It's *supposed* to be
that way, dammit.
I fail to understand why this is such a problem for you. But then it's
clear from lo
chies) unless the name is first found in the
instance's namespace.
That's just the way Python was designed. Like it or loathe it, it's too
late to change now. . Some languages only use such a technique
for resolving the names associated with methods, but this isn't
comp.
as unwise coding, doesn't imply
> it is sane behaviour of python. Variable shadowing happens. I don't
> consider it sane behaviour if the same reference in a line gets
> resolved in different name spaces
>
Well I'm sure Guido will be happy to know you think his design is
saying that Java
> is more or less like COBOL. (OO COBOL?)
>
Quite. People have said exactly that, you know ;-)
http://www.artima.com/weblogs/viewpost.jsp?thread=42242
[...]
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
te them).
Never used PygreSQL, so can;t help there (though you might try a similar
trick and Googal for "PygreSQL Windows installer", say).
If you look at
http://www.holdenweb.com/Python/
you'll find a link to Mike Fletcher's page describing how you can
install and use the free Mic
Antoon Pardon wrote:
> Op 2005-11-04, Steve Holden schreef <[EMAIL PROTECTED]>:
[...]
>>I suppose ultimately I'm just more pragmatic than you.
>
>
> It has nothing to do with being more pragmatic. Being pragmatic
> is about how you handle things with real life
ght version (or didn't set some variables),
> since the error remains. Could you please help me (it will need some
> patience with a computer newbie)?
>
See
http://www.vrplumber.com/programming/mstoolkit
and say thanks to Mike Farmer.
regards
Steve
--
Steve Holden +44
; variable gets updated instead of an instance variable getting created.
> If you don't find the inconsistency to be weird, then ducky for you.
Ho, hum.
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
mjakowlew wrote:
> Steve,
>
> the os commands don't run through zope, it denies access to them to be
> run at all through the webserver. So in turn, I had to use a work
> around to fix the IE problem. Also qwwee's suggestion to use:
>
> filepath.split('\
Antoon Pardon wrote:
> Op 2005-11-04, Steve Holden schreef <[EMAIL PROTECTED]>:
>
>>Antoon Pardon wrote:
>>
>>>Op 2005-11-04, Steve Holden schreef <[EMAIL PROTECTED]>:
>>
>>[...]
>>
>>>>I suppose ultimately I'm jus
separate CGI
> scripts?
>
Another alternative might be to serve a script that sent the browser
back 2 pages in its history, as long as server state hasn't changed in
the meantime.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
ongue and I am still trying to figure out how to
> solve this problem), how can I let MainClass knowing about the Custom
> methods without rewriting all the Custom functions inside MainClass and then
> pass the parameters to Custom? Is there a way to "propagate" the methods to
&g
x27;m reacting pretty badly to the construction you're
> describing. I haven't gotten around to looking at the asyncore code
> but will try to do so.
I wouldn't bother. From memory it's just using a class variable as an
initialiser.
regards
Steve
--
Steve Holden
Steve Holden wrote:
> [EMAIL PROTECTED] wrote:
>
>>What should I do to be able to compile C-extensions (with python 2.4,
>>winXP)? I get an error message, approximately "The .NET Framework SDK
>>needs to be installed"; I tried to get something from the Micros
rom
users' needs. But of course we pragmatists know that practicality beats
purity :-)
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
package tools suck quite badly.
>
> Debian and SUSE are both pretty good choices.
I used yum on Fedora Core 2, and it downloaded and installed
dependencies fine.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
P
37,
> in execute
> self.errorhandler(self, exc, value)
>
> File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
> 33, in defaulterrorhandler
> raise errorclass, errorvalue
>
> OperationalError: (1054, "Unknown column 'artist' in 'field list'")
>
> Thanks for the help
>
It's a while since I used mod_python, so this is a guess: The publisher
module finds function arguments in the POST input stream. Since your
form field is called "z_rating", publisher fails to find a "rating"
argument to pass to the function.
The second error message seems to imply that the database InventoryList
table doesn't have a column called "article".
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
[...]
>
> The second error message seems to imply that the database InventoryList
> table doesn't have a column called "article".
>
> regards
> Steve
^article^artist^
--
Steve Holden +44 150 684 725
There is a new gratis VMWare player at
http://www.vmware.com/download/player/
You can download an image http://www.vmware.com/vmtn/vm/browserapp.html
that they call a Browser Appliance, but if I remember correctly it is
Ubuntu.
--
http://mail.python.org/mailman/listinfo/python-list
Max wrote:
> (Mark Shuttleworth, ...
> really loves Python - he gave me quite a lot of money for using it).
Please elaborate.
--
http://mail.python.org/mailman/listinfo/python-list
. Needing to pull over and
> change a few jumpers on the PC board of the radio to get it on the right
> channel.
>
> PyGTK - no experience there
>
> Pythoncard - a 50cc motorbike with training wheels
>
Less of the "old", if you don't mind ...
regards
Steve
-
GNU gmp-static library, but then of course in both cases I was
missing the gmp library to link it against.
So I'm afraid you might need someone with access to VC to test this on
Windows for you, sorry.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden We
r it changed, but it is not that I *want* it to
> change. I'll happily continue with python if it doesn't change.
>
That's sort of a pity. At this stage I'd recommend Ruby just to be rid
of the incessant twaddle you come up with to defend your throwaway ideas.
> Maybe
va client i have the same:
>
> % java Loader server.py server.py server.py
> init 29
> server.py reading 631 1
> server.py reading 631 40
> server.py reading 631 41
>
> why?
>
Seems to me that should probably be a question for comp.lang.java.
regards
Steve
--
Steve Holden
Alex Martelli wrote:
> Steve Holden <[EMAIL PROTECTED]> wrote:
>...
>
>>I tried compiling it with the MS free toolkit but the C compile
>>complains about the absence of "gmp.h". Since I see such a header in my
>>Cygwin installation I presume it&
27;t see that you have a chance in
hell of extracting useful demographics. Which all leads me back to
"what's the point?" - just because you can?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
umber of different ways, and they are supposed to
indicate the technique they use by setting a module variable
"paramstyle" to one of five possible values.
Magnus' original code was written to use a different (but valid)
paramstyle, so I'm guessing that his sqlite module a
basic and i want to learn the right way
>
> thanks so much,
> dave
>
>
Sounds to me like you could usefully take a look at dabo and/or django.
Both can be used to produce multi-tier applications, but django is
web-based where dabo is GUI-based. Both seem to have the elements you
sa
x27;'
rows = []
for row in toprint:
print " "
for cell in row:
print "%s" % cell
print " "
print ""
Of course you should really be ensuring that the cell contents correctly
escape any special characters in the cell conte
> Does anyone know if it'll be coming back up, or if it's mirrored anywhere?
>
> Can anyone recommend any other good warehouses of Python goodies?
>
It appears to be up now ...
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC
posting".
The reason you can't run Tkinter applications under PythonWin is that
PythonWin does not use a separate process to run the modules you ask it
to execute.
Since PythonWin used MFC-style windowing, there is a conflict between
the event-handling loops of the two different wind
ou clearly aren't even good at spamming and have very few clues
about mailing lists.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Jarek Zgoda wrote:
>
>
> Computing is large area. Much larger than aunt Tilly's laptop.
>
You clearly haven't seen the size of Aunt Tilly's lap!
Sorry, couldn't resist it.
Steve
--
http://mail.python.org/mailman/listinfo/python-list
ter than this, or am I missing some joke?
>>> hex(33*33)
'0x441'
>>> hex(33*33)[2:]
'441'
>>> 33*33
1089
>>> "%x" % 1089
'441'
>>>
Of course, you have to watch out for operator precedence:
>
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>
>>>Try hex(33**33).
>>
>>You're usually smarter than this, or am I missing some joke?
>>
>> >>> hex(33*33)
>>'0x441'
>
>
> You used o
Peter Hansen wrote:
> [EMAIL PROTECTED] wrote:
>
>>I have no idea why people are so facinating with python.
>
>
> Hey, I'm fascinating even without python!
>
And so modest, too :-)
regards
Steve
--
Steve Holden +44 150 684 7255 +
1
#Guessing Loop
while guess != the_number and tries < 5:
if (guess >the_number):
print "Lower..."
else:
print "Higher..."
guess = int(raw_input("Take another Guess:"))
tries +=1
if guess == the_number:
print "You guess correctly!!"
print "The number was:", the_number
print "You got it correct in", tries, "tries"
else:
print "Sorry you lose."
print "The Correct Number was ", the_number
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Even though its for any (not just Tcl) experienced programmer, and even
though you've got all the appropriate resources, I'll mention that you
should get a lot out of the book Dive Into Python, at
http://www.diveintopython.org/
--
http://mail.python.org/mailman/listinfo/python-list
>
Unfortunately this appears to mean that pysqlite2 isn't fully DB
API-conformant.
>>> import pysqlite2
>>> pysqlite2.paramstyle
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: 'module' object has no attribute 'paramstyle'
>>>
Of course, given the module's flexibility it's difficult to know what
you *would* put in paramstyle. I take it mixing different paramstyles in
the same query will fail?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
do this.
>>>in fact, the free version of the visual studio 2005, which is free, have
>>>this ability.
>
>
> Just out of curiosity, how much is the free version of Visual Studio 2005?
>
>
I'm not positive, but i think they're currently giving i
7;RE GETTING BACK FROM THE SERVER ?
>
COULD YOU GUYS BE QUIET, PLEASE, I'M TRYING TO WORK HERE!
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
it more context, like:
"My boss tells me we have to be able to run admin commands from inside
the order processing suite. Can anyone tell me how to do this?".
If you *do* understand what you want to do then I'm afraid you still
need to explain yourself more clearly.
regards
Stev
he product.
Personally I've never bothered with obfuscation, and prefer to rely on
copyright when I deliver code to customers.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006
))
>
> [0, 1]
Maybe, but the code also implies an esoteric knowledge that the trught
value of the predicate is monotonically decreasing (in a Boolean sense).
This would not be true if (e.g.) p = lambda x: x % 2 == 0. So while
itertools.takewhile can save you unnecessary computations, such
gt;
>
> Thanks!
> Swaroop
> www.swaroopch.info
>
import sys
print sys.argv[0]
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Steve Holden wrote:
>
>
>>>Is there a way to set the program name in Python, similar to $0 in
>>>Perl?
>>>
>>>>From `man perlvar`:
>>>
>>>$0 Contains the name of the program being executed. On some op
ocation window.
I think it's a bit ill-advised to use parens in a URL, and if you do
then they shoud really be represented as %xx escapes.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006
ween the database server and the client, particularly
if the result set is large.
>>> curs.execute("SELECT secID, secTitle, secPath FROM SECTION")
>>> curs.fetchone()
(1, 'Explore Holden Web', 'hd_explore')
>>>
So of course you can unpack the tuple as well:
>>> id, ttl, pth = curs.fetchone()
>>> print "Title:", ttl, "path:", pth, "id:", id
Title: Student Links path: hd_students id: 2
>>>
If the result sets are too large to comfortably hold in memory you can
fetch them N at a time with fetchmany(N), repeating until there's
nothing left to read. And so on, but I hope this gives you the idea.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
net/projects/mysql-python
If you have any trouble installing it, get back on this list and someone
will help.
You're going to have *such* fun!
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006
guess)/2.
>
> Comments please.
>
> Norman
>
Effectively you want to start with a minposs and maxposs, which are set
to 0 and 100 respectively. Your guess should bisect the range (as nearly
as it can given that you are dealing with integers, and you have to be
careful to get
ter.Canvas before I can safely subclass it (and assign attributes
> to an instance of the subclass) or clear attribute names as I outlined
> above?
>
> Chris Marshall
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
paren and the x were perfectly
acceptable.
Copying the text and pasting it into Firefox's location widget brought
the page up without difficulty.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
t; should never get here
>
Which is Fredrik's way of telling you you need to *call* sys.exit and
not just reference it (works in Perl, which assumes you want to call it,
but in Python "explicit is better than implicit").
$ more test.py
import sys
print "should get here"
e are more pythonic ways to perform this task.
You might try:
for index in range(len(fruit)):
letter = fruit[-index-1]
print letter
as one example. I'm sure other readers will have their own ways to do
this, many of them more elegant.
regards
Steve
--
Steve Holden +44 150 6
john boy wrote:
[top-posting corrected]
>
> Steve Holden <[EMAIL PROTECTED]> wrote:john boy wrote:
>
>>using the following program:
>>
>>fruit = "banana"
>>index = 0
>>while index < len (fruit):
>>letter = fruit[index-1]
>>
n
$ grep -i keep-alive /lib/python2.4/urllib*.py
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
27;d be interested to see whether the material is any use to someone new
to networking.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
On 15 Nov 2005 14:45:27 -0800, Steve <[EMAIL PROTECTED]> wrote:
> Does any one know if python has the ability to run a shutdown hook.
Look at the "atexit" module.
barbet (~)$ pydoc atexit.register
Help on function register in atexit:
atexit.register = register(fu
The file C:\Python24\Lib\sitecustomize.py (which I think doesn't exist
by default) executes every time Python starts. (This means not just
your IDLE session but every time you run any Python script.)
One use for this file is to invoke sys.setdefaultencoding because that
name gets deleted during in
PORTABILITY comments all over the place and too much boilerplate. Now
> I go with a startup check on sys.hexversion, and exit with similar
> wording.
>
We could all take an example from Fredrik Lundh, who still regularly
releases products that run on everything back to Python 1.5.2.
; among them, do I need transfer the coordinates?
Transfer the coordinates of what?
When you go from the standard right-handed system to the system used
in computer graphics, you use these simple formulas:
max_x, max_y = image size
screen_x = original_x
screen_y = max_y - original_y - 1
HTH
-
Run the command
python -v
and if this doesn't explain what the problem is, post the output back on
the group.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
taking the time to make sure the subject line really
does describe the subject of your message - that way people with an
interest in your problem are much more likely to read it instead of
skipping over your posts.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494
methods, but basically you just need to close each cursor
you open once.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
Another way to simulate the ternary operator is this:
a = (quantity > 90 and "It is very huge") or "The value is correct"
You have to be careful of semantics of 'and' and 'or'. But in this case
I wonder why you don't just test whether quantity is greater than 90
and assign the corresponding value
bout base 2, 8, 10, 16.
>
> May be :
>
> int("E500.000,23")
>
> as we are using :
>
> 0x
>
> already for hex number
>
I really wouldn't want it to become possible to write Python code in one
locale that had to be edited before the numeric lite
t;>> dir(d)
['GetFileExt', 'GetFileName', 'GetFileTitle', 'GetPathName',
'GetPathNames', 'GetReadOnlyPref', 'SetOFNInitialDir', 'SetOFNTitle']
>>> d.Show()
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Steve Holden wrote:
[...]
>>I really wouldn't want it to become possible to write Python code in one
>>locale that had to be edited before the numeric literals were valid in
>>another locale. That way madness lies.
>
> That is the fact
rs werw regarded as equivalent.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
noticed the same thing in Unix-like operating systems when
running tail -f on a file being fed by an active process: the output
appears in chunks ending in partial lines because the feeding process's
output buffer has been filled and the operating system has passed it to
the tail process.
reg
each time is less efficient, am I right?
>
Not necessarily. Try this:
f = file("filename.txt")
for line in f:
if token in line: # or whatever you need to identify it
break
else:
sys.exit("File does not contain token")
lin
x2*(a6 + x2*(a8 + x2*a10
>
> (or least that's what I like to write). Now, if I were going to higher
> precision, I'd have more digits of course.
>
Right, this is clearly such a frequent use case it's worth changing the
compiler for.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
ter 5 seconds , other input 5
> after 5 more seconds , 15 is being proccessed
> Thanks.
It sounds like you will have to learn how to do two things in parallel,
which is normally done using threads. Unfortunately it also seems you
would like the input thread to be terminated when the timer thread finds
its time is up, and that's not particularly easy because there's no way
to stop a thread "from the outside" once it's started.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
he screen.
--
Steve Juranich
Tucson, AZ
USA
--
http://mail.python.org/mailman/listinfo/python-list
string
> with an empty string thus
> """.replace('\n','')
>
Of course there's also the alternative of escaping the newlines out in
the literal. The replace result above is exactly
"""\
lots of text hundreds of characters long\
more text on another line but we really don't want any line breaks\
in our final string\
so we replace newlines in this multiline string\
with an empty string thus\
"""
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
string
> with an empty string thus
> """.replace('\n','')
>
Of course there's also the alternative of escaping the newlines out in
the literal. The replace result above is exactly
"""\
lots of text hundreds of characters long\
more text on another line but we really don't want any line breaks\
in our final string\
so we replace newlines in this multiline string\
with an empty string thus\
"""
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
rs to favour
any one of the several reasonable alternatives that might be chosen.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://mail.python.org/mailman/listinfo/python-list
.wxpython.org/index.cgi/UsingSizers
but whether this will help you with Boa I'm not sure. I have tried Glade
and Boa as well as Python Card, and all I can really say is that I found
it worth spending the money to *buy* wxDesigner. It's not a perfect
product, but it fits my brain. Sorry
L or mxODBC?
> And how can I get just simple tab-delimited records with a standard
> carriage return separating the records?
>
> Thanks so much for any help.
>
> bs
>
Well you know that answer now. You might also consider using the recipe at
http://a
en you print it - the SQL
interpreter certainly won't care.
Many SQL statements are so long that it actually helps readability to
have newlines in them.
There have been plenty of solutions presented in the earlier posts in
this thread if you really do need to represent multi-line strings.
the wxPython Licence is compatible with the GPL -- if not,
> do we just cosmetically change any remaining lines, so none remain from
> the orignal?)
>
That won't stop your code from being a derivative work. You'll need to
take licensing and copyright issues a little more seriously
>
>
>>>>d.__class__
>
>
>
>>>>d is None
>
> False
>
>>>>^Z
>
>
> why
>
>>>>print d
>
> prints None ?
>
>
>
>Thanks for your answers,
>
>
>
At a guess, because it has
1401 - 1500 of 7149 matches
Mail list logo