try:
db = MySQLdb.connect(host="localhost", user="user", passwd="pass",
db="myDB")
localhost can be a URL also (if MySQL is set up properly in the first place)
regards,
DimtiriOn 6/30/05, nephish <[EMAIL PROTECTED]> wrote:
Hey there all,i have a question about how to point my python install to my s
Sadly, its not a solution that I'm after, but a particular toolkit that
can be used for solving that type of problem.
- Pad.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hey there all,
> i have a question about how to point my python install to my sql
> database.
>
> when i enter this: db = MySQLdb.connect(user="user", passwd="pass",
> db="myDB")
>
> i get this:
> Traceback (most recent call last):
> File "", line 1, in -toplevel-
>
Hello,
here is a trouble that i had, i would like to resolve it with python,
even if i still have no clue on how to do it.
i had many small "text" files, so to speed up processes on them, i used
to copy them inside a huge one adding some king of xml separator :
[content]
content is tab separa
PyGaim has been released.
Summary: Gaim Python plug-in. The product provides developers with the
capability to develop python plugins for Gaim
This release is just a get it out there release and a lot of polishing
still needs to be done.
However, it does enable a python developer to develop ga
Steven Bethard wrote:
> Guido also suggests that the explicit:
>
> class C(object):
> pass
>
> is "much preferred"[2] over:
>
> __metaclass__ = type
>
> class C:
> pass
Really? I have been toying with the idea of using the __metaclass__
trick, since it results in c
Hey there all,
i have a question about how to point my python install to my sql
database.
when i enter this: db = MySQLdb.connect(user="user", passwd="pass",
db="myDB")
i get this:
Traceback (most recent call last):
File "", line 1, in -toplevel-
db = MySQLdb.connect(user="user", passwd="pa
Hey there all,
i have a question about how to point my python install to my sql database.
when i enter this: db = MySQLdb.connect(user="user", passwd="pass",
db="myDB")
i get this:
Traceback (most recent call last):
File "", line 1, in -toplevel-
db = MySQLdb.connect(user="user", passwd="p
To draw a large array of data on a small panel, I need to shrink it to a
given size. e.g:
To draw numarray.arange(1) on a panel of width of 100, I only need
to draw the points of (0, 100, 200, 300, ...) instead of (0, 1, 2, ...).
So I need a method to shrink it to an 100-item array.
x[::len
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The OZ homepage has an example for solving the eight queens problem:
Buried in the generator test module (something like
lib/test/test_generators.py) are solutions for both 8Queens and Knight's
Tour. You might find these of
Patch / Bug Summary
___
Patches : 344 open ( +6) / 2875 closed ( +9) / 3219 total (+15)
Bugs: 897 open (-17) / 5094 closed (+34) / 5991 total (+17)
RFE : 191 open ( +3) / 170 closed ( +0) / 361 total ( +3)
New / Reopened Patches
__
fileinput
John Machin wrote:
> BTW, don't use "l".
Excellent advice.
But since the original poster appears to be rather a
newbie, perhaps a little bit of explanation would be
useful.
Variables like l and I should be avoided like the
plague, because in many fonts and typefaces they are
indistinguishab
John Machin wrote:
> If "work" is meant to detect *all* possibilities of 'chunks' not having
> been derived from 'text' in the described manner, then it doesn't work
> -- all information about the positions of the whitespace is thrown away
> by your code.
>
> For example, text = 'foo bar', chun
Suppose I want to define the class MyClass so I can create an instance by
MyClass(arg0, arg1, kwarg0=None, kwarg1=0, reuse=None, save=None)
If reuse is not None, it is the name of a pickle file. Unpickle the file
to get the instance.
If save is not None, it is a file name. Pickle the instanc
Joseph Garvin wrote:
'm curious -- what is everyone's favorite trick from a non-python
language? And -- why isn't it in Python?
I use constraints programming at work, Check out "System Verilog" or
OZ/Mozart.
It would be great if this style of programming could be added to
Python.
It is a de
Steven D'Aprano wrote:
> But don't worry, there is one thing we all agree on throughout the
> English-speaking world: you Americans don't speak English.
>
> There are a few things that you can do to help:
>
> Herb starts with H, not E. It isn't "ouse" or "ospital" or "istory".
> It isn't "erb" eith
[EMAIL PROTECTED] wrote:
> Good day:
> Probably the answer to my question is staring me in the face, but the
> solution escapes me.
>
> The following is the input line of the file: SoftDict-.csv:
> ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14
>
> I expected an instance of Machine()
On Wednesday 29 June 2005 04:55 am, Simon Brunning wrote:
> On 6/28/05, John Roth <[EMAIL PROTECTED]> wrote:
> > I'd definitely like to see ctypes. I can agree with the segfault
> > issue, but I think that some design work would eliminate that.
>
> I'm not sure that it would. Ctypes allows you, as
Steven Bethard wrote:
[snip]
> And it appears to work:
[snip]
> But it seems somewhat inelegant. Can anyone see an easier/cleaner/more
> Pythonic way[1] of writing this code?
>
> Thanks in advance,
>
> STeVe
>
> [1] Yes, I'm aware that these are subjective terms. I'm looking for
> subjective
Rocco Moretti <[EMAIL PROTECTED]> writes:
> Except that (please correct me if I'm wrong) there is somewhat of a
> policy for not including interface code for third party programs which
> are not part of the operating system. (I.e. the modules in the
> standard libary should all be usable for anyon
"Adriaan Renting" <[EMAIL PROTECTED]> writes:
> I realy prefer a WYSIWYG UI design tool
> to having to code BUTTON(120, 123, 123, 335, -1, NULL, doButton, "Push",
> "push this button")
With a modern GUI library, it's more like:
buttonBox.addWidget(Button("&New", my, "new"))
and your button
On 29 Jun 2005 17:55:44 -0700,
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> The following is the input line of the file: SoftDict-.csv:
> ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14
> I expected an instance of Machine() to be created with a name ca1017.
> Instead, an object i
On Wed, 29 Jun 2005 19:43:33 -0400,
Roy Smith <[EMAIL PROTECTED]> wrote:
> Not just plywood panels, but sheets of paper, bolts of cloth, sheet
> metal, plate glass, etc. A slight complication is that some materials
> have a preferred orientation (i.e. plywood has a grain, textiles have
> warp vs.
Good day:
Probably the answer to my question is staring me in the face, but the
solution escapes me.
The following is the input line of the file: SoftDict-.csv:
ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14
I expected an instance of Machine() to be created with a name ca1017.
Inste
I have a string with a bunch of whitespace in it, and a series of chunks
of that string whose indices I need to find. However, the chunks have
been whitespace-normalized, so that multiple spaces and newlines have
been converted to single spaces as if by ' '.join(chunk.split()). Some
example d
Stephen Kellett wrote:
> In message <[EMAIL PROTECTED]>, Markus Wankus
> <[EMAIL PROTECTED]> writes
>
>> Have you ever tried anything that provides real, usable refactoring
>> like Eclipse does with Java? I guarantee if you used it more than a
>> few times your view would most likely change.
>
On 2005-06-29, Jp Calderone <[EMAIL PROTECTED]> wrote:
> On Thu, 30 Jun 2005 00:13:45 +0200, Irmen de Jong <[EMAIL PROTECTED]> wrote:
>>Grant Edwards wrote:
>>
>>> Under Linux, you need to be root to send a broadcase packet.
>>
>>I don't think this is true.
>>
>
> I think you're right. I believe y
On 2005-06-29, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> That depends on the accent. I believe that's probably true for
>> the educated south of England, BBC, received pronunciation. I
>> don't think that's true for some of the other dialects from
>> northern areas (e.
Fuzzyman wrote:
> Surely when they are removed :
>
> class foo:
> pass
>
> won't become invalid syntax, it will just automatically inherit from
> object ?
Well, Guido views this particular syntax as an "oopsie"[1]. It should
actually look like:
class C():
pass
Guido also su
In article <[EMAIL PROTECTED]>,
Don <[EMAIL PROTECTED]> wrote:
> Chung Leong wrote:
>
> > Isn't that an NP-complete problem or am I crazy?
>
> It is NP complete. Its known as the "cutting stock problem" (aka "Knapsack
> problem"). Here's a Wikipedia page that describes it:
>
> http://en.wikipe
Rex Eastbourne schrieb:
> Also, when I try running pdb in my Emacs shell, I get very weird
> behavior: for instance, I'll hit 'h' and enter twenty times with no
> output. Then, all of a sudden, twenty output messages will pop up.
That may be due to output buffering. Try running your script with
"p
Trent Mick ha scritto:
> Note that the APPDATA environment variable is only there on *some* of
> the Windows flavours. It is there on Win2k and WinXP. It is not there on
> WinME. Dunno about Win95, Win98, WinNT... but you may not care about
> those old guys.
That's (I guess) because the DOS spawn
Don wrote:
> Chung Leong wrote:
>
> > Isn't that an NP-complete problem or am I crazy?
>
> It is NP complete. Its known as the "cutting stock problem" (aka "Knapsack
> problem"). Here's a Wikipedia page that describes it:
>
> http://en.wikipedia.org/wiki/Cutting_stock_problem
>
> There are commer
Chung Leong wrote:
> Isn't that an NP-complete problem or am I crazy?
It is NP complete. Its known as the "cutting stock problem" (aka "Knapsack
problem"). Here's a Wikipedia page that describes it:
http://en.wikipedia.org/wiki/Cutting_stock_problem
There are commerical applications available t
phil <[EMAIL PROTECTED]> writes:
> > Wow! How about a sextant?
> > Simple device really. And a great practical demonstration of trigonometry.
> >
>
> Excellent idea, even found a few how to sites. We'll do it.
> Any others?
Sextants are difficult to build precisely (compared with quadrants)
and t
Thomas Bartkus wrote:
> "phil" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>>About teaching in the exact sciences: I think we need a more hands-on
>>>applied approach, to some extent this holds for the entire school
>>>system.
>>
>>YES! As a geometry(& trig) teacher, I am goin
Jan Danielsson wrote:
Hello all,
I wanted to plot some statistics, so I wrote a simple wxPython class
to do it. Then I realized that I would like to draw bar graphs, so I
added that too.
Since I'm a complete Python newbie, I haven't done much of it the
"Python way", I suspect. So, I'm won
> Wow! How about a sextant?
> Simple device really. And a great practical demonstration of trigonometry.
>
Excellent idea, even found a few how to sites. We'll do it.
Any others?
I think I am going to have them build a shed because
they need to get their hands on SOMETHING.
But the geometry/tim
Steven,
Very well written... I enjoyed reading your post!
Brian
---
Steven D'Aprano wrote:
> On Tue, 28 Jun 2005 11:27:40 -0700, muldoon wrote:
>
>
>>Americans consider having a "British accent" a sign of sophistication
>>and high intelligence. Many companies hire salespersons from Britain t
Reinhold Birkenfeld schrieb:
> Do you have any other good and valued Python modules that you would think are
> bug-free, mature (that includes a long release distance) and useful enough to
> be granted a place in the stdlib?
Hmmm, let's look into /site-packackes, That's what I always
have install
Grant Edwards wrote:
> That depends on the accent. I believe that's probably true for
> the educated south of England, BBC, received pronunciation. I
> don't think that's true for some of the other dialects from
> northern areas (e.g. Liverpool) or the "cockney" accent.
What's exactly the "cockn
Chung Leong wrote:
> Isn't that an NP-complete problem or am I crazy?
That makes it a more realistic challange, doesn't it?
Suppose it was something simple, like calculating a
minimal spanning tree. Every program would produce the
same output. What kind of contest would that be?
--
http://mai
Jan Danielsson wrote:
>So, for future reference: I should *never* mix x and y versions in
> verion: x.y.z. I've wondered why there are versions of libraries for
> different versions of Python..
For packages with extension modules at least. Python maintains binary
compatibility between micro-
On Thu, 30 Jun 2005 00:13:45 +0200, Irmen de Jong <[EMAIL PROTECTED]> wrote:
>Grant Edwards wrote:
>
>> Under Linux, you need to be root to send a broadcase packet.
>
>I don't think this is true.
>
I think you're right. I believe you just need to set the broadcast SOL_SOCKET
option.
>>> import
Grant Edwards wrote:
> Under Linux, you need to be root to send a broadcase packet.
I don't think this is true.
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
muldoon wrote:
> Americans consider having a "British accent" a sign of sophistication
> and high intelligence. Many companies hire salespersons from Britain to
> represent their products,etc. Question: When the British hear an
> "American accent," does it sound unsophisticated and dumb?
>
> Be bl
Steven D'Aprano wrote:
> Herb starts with H, not E. It isn't "ouse" or "ospital" or "istory". It
> isn't "erb" either. You just sound like tossers when you try to pronounce
> herb in the original French. And the same with homage.
Strangely enough there are Brits who pronounce "hotel" without an H
So theres no actual advantage that you know of ;-)
Surely when they are removed :
class foo:
pass
won't become invalid syntax, it will just automatically inherit from
object ?
That's what I assumed, anyway
Regards,
Fuzz
http://www.voidspace.org.uk/python
--
http://mail.python.org/ma
Isn't that an NP-complete problem or am I crazy?
--
http://mail.python.org/mailman/listinfo/python-list
Fuzzyman wrote:
> Also, can anyone explain any tangible benefit of inheriting from
> object, when not explicitly using any features of new style classes ?
One reason is that properties won't work correctly.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
I understood your point.
thanks...
rahul
Steven Bethard wrote:
> Steven Bethard wrote:
> >
> > def wrap(obj):
> > def f(*args, **kwargs):
> > for arg in args:
> > print arg
> > return obj(*args, **kwargs)
> > return f
> >
> > @wrap
> > def func(a, b, c):
Steven Bethard wrote:
>
> def wrap(obj):
> def f(*args, **kwargs):
> for arg in args:
> print arg
> return obj(*args, **kwargs)
> return f
>
> @wrap
> def func(a, b, c):
> ...
>
> class C(object):
> ...
> C = wrap(C)
Rahul top-posted:
> If you
Fuzzyman a écrit :
> Hello,
>
> To create a classic (old style) class, I write :
>
> class foo:
> pass
>
> To do the equivalent as a new style class, I write :
>
> class foo(object):
> pass
>
> *Should* I in fact write :
>
> class foo(object):
> def __init__(self, *args, **kwargs)
Rahul wrote:
> If you do C = wrap(C) C no longer remains a class..it becomes a
> function.
Does that matter?
Reinhold
--
http://mail.python.org/mailman/listinfo/python-list
"phil" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> > About teaching in the exact sciences: I think we need a more hands-on
> > applied approach, to some extent this holds for the entire school
> > system.
>
> YES! As a geometry(& trig) teacher, I am going to have them build a
>
Harry George wrote:
> "Adriaan Renting" <[EMAIL PROTECTED]> writes:
>>Both VB and Python are easier to learn as the more powerful
>>languages, the price is that they lack features that make it easier to
>>manage large and complex projects.
>
> What is a large project, and what is Python missing th
Robert Kern wrote:
>> [---]
>>
>>> It's okay. Just about every Pythonista in the sciences has, at one time
>>> or another, started a plotting library. It's a rite of passage. Welcome
>>> to the club. :-)
>>
>>
>>Question: I need to install SciPy in order to use matplotlib,
>
> No you don't.
If you do C = wrap(C) C no longer remains a class..it becomes a
function.
Steven Bethard wrote:
> Rahul wrote:
> > def wrapper(obj):
> >g = obj.__call__
> >def f(*args,**kwargs):
> > for arg in args:print arg
> > return g(*args,**kwargs)
> >obj.__call__=f
> > but it seems thi
Noah wrote:
> def unzip(list):
> if len(list) == 0: return ()
> l = []
> for t in range(len(list[0])):
> l.append(map( lambda x,t=t: x[t], list ))
> return tuple(l)
The simplest solution to this problem that I know of:
def unzip(iterable):
return zip(*iterabl
Rahul wrote:
> def wrapper(obj):
>g = obj.__call__
>def f(*args,**kwargs):
> for arg in args:print arg
> return g(*args,**kwargs)
>obj.__call__=f
> but it seems this will not work for functions :(
def wrap(obj):
def f(*args, **kwargs):
for arg in args:
#! rnews 1192
Newsgroups: comp.lang.python
Path:
news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!195.241.76.212.MISMATCH!transit1.news.tiscali.nl!tiscali!transit0.news.tiscali.nl!tudelft.nl!txtfeed1.tudelft.nl!feeder2.cambrium.nl!feed.tweaknews.nl!feeder.enertel.nl!nntpfeed-01.ops.a
"F. Petitjean" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ]
> Hoping that zip will not be deprecated.
Cease worrying. Zip was added to replace the zipping behavior of map and
the idiom map(None, a, b, ...). It simultaneously alter
Jan Danielsson wrote:
> Robert Kern wrote:
> [---]
>
>>It's okay. Just about every Pythonista in the sciences has, at one time
>>or another, started a plotting library. It's a rite of passage. Welcome
>>to the club. :-)
>
>Question: I need to install SciPy in order to use matplotlib,
No you
Robert Kern wrote:
[---]
> It's okay. Just about every Pythonista in the sciences has, at one time
> or another, started a plotting library. It's a rite of passage. Welcome
> to the club. :-)
Question: I need to install SciPy in order to use matplotlib, but on
the download page I see that ther
Rocco Moretti <[EMAIL PROTECTED]> writes:
> Except that (please correct me if I'm wrong) there is somewhat of a
> policy for not including interface code for third party programs which
> are not part of the operating system. (I.e. the modules in the
> standard libary should all be usable for anyone
unzip() -- Not really a module, but a standard library function.
Why isn't it in the standard library?
It seems like I'm always adding it to my code.
I think I once heard an argument against it, but I forget what it was.
And yet I still find myself wanting unzip.
def unzip(list):
if len(list)
Greg Miller wrote:
> I tried the code snippet using win32api.GetFileVersionInfo(), what I
> get now is the following when running on the executable machine:
>
> . . . FileFlagsMask => 63
> FileType => 2
> FileVersionMS => 65536
> FileVersionLS => 1
> Signature => -17890115
> FileSubtype => 0
> File
QOTW: "And what defines a 'python activist' anyway? Blowing up Perl
installations worldwide?" - Ivan Van Laningham
"Floating point is about nothing if not being usefully wrong." - Robert Kern
Sibylle Koczian needs to sort part of a list. His first attempt made
the natural mistake - sort
Fuzzyman wrote:
> Hello,
>
> To create a classic (old style) class, I write :
>
> class foo:
> pass
>
> To do the equivalent as a new style class, I write :
>
> class foo(object):
> pass
>
> *Should* I in fact write :
>
> class foo(object):
> def __init__(self, *args, **kwargs):
>
And 1 more argument for adding DB support, a large part of PHP's
success as a web langauge is being easily interoperable with MySQL
(out of the box I think? I haven't used it.) But I think it's tight
integration with MySQL really helped it find its niche.
I think "batteries included" means Pyth
While that policy does make sense, I think a database program falls
somewhere in between an OS and an everyday third party program. For
web developers, the database might as well be the OS. I use the
database to store everything in my web app. That way I can just worry
about 1 place to access in
Hello,
To create a classic (old style) class, I write :
class foo:
pass
To do the equivalent as a new style class, I write :
class foo(object):
pass
*Should* I in fact write :
class foo(object):
def __init__(self, *args, **kwargs):
object.__init__(self)
?
Also, can anyon
Hello all (well, some of you I guess),
Is it true that you can't configure a proxy handler for urllib2 to
fetch https URLs through a proxy ?
I know that you pass a dictionary, keyed by protocol, to the proxy
handler - but when we get an exception when we fetch an https URL.
Fetching the same URL
Forth clarifications below...
Rocco Moretti wrote:
>
> So for Math you'd do something like:
>
> y = b + mx + cx^2
>
> IIRC, for Forth it would be something like (please excuse the mistakes
> in operator notation):
>
> x 2 ^ c * m x * + b + 'y' setvar
Assuming these are all VALUEs:
x DUP * c *
Jan Danielsson wrote:
> Robert Kern wrote:
>>Trick #1:
>>
>>import matplotlib
>
> Oh. :-)
>
> That's a pretty neat trick -- now can you make my embarrassment go away?
>
>I did do a quick search to see if anyone had done anything similar;
> but I guess I wasn't using the right keywords.
>
>
> Is there any way of keeping this info in PIL?
I don't think so... when I investigated in the past, I think I
discovered that the PIL can't write EXIF data (I might be wrong,
though, or my information might be outdated).
> Alternatively, is there a simple image
> processing package that does it?
Robert Kern wrote:
>>I wanted to plot some statistics, so I wrote a simple wxPython class
>> to do it. Then I realized that I would like to draw bar graphs, so I
>> added that too.
>>
>>Since I'm a complete Python newbie, I haven't done much of it the
>> "Python way", I suspect. So, I'm won
Paul Rubin wrote:
> Gregory Piñero <[EMAIL PROTECTED]> writes:
>
>>I'd like to see some database API's to the most common databases
>>included.
>
> Yes, certainly, this is a serious deficiency with Python.
Except that (please correct me if I'm wrong) there is somewhat of a
policy for not inclu
On Wed, 29 Jun 2005 18:49:10 +, Peter Tillotson <[EMAIL PROTECTED]> wrote:
>cheers Scott
>
>should have been
>from myZip.zip import base.branch1.myModule.py
>
>and no it didn't work, anyone know a reason why this syntax is not
>preferred ??
>
>sorry posted the soln again, it works but feels nas
Jan Danielsson wrote:
> Hello all,
>
>I wanted to plot some statistics, so I wrote a simple wxPython class
> to do it. Then I realized that I would like to draw bar graphs, so I
> added that too.
>
>Since I'm a complete Python newbie, I haven't done much of it the
> "Python way", I suspec
cheers Scott
should have been
from myZip.zip import base.branch1.myModule.py
and no it didn't work, anyone know a reason why this syntax is not
preferred ??
sorry posted the soln again, it works but feels nasty
Scott David Daniels wrote:
> Peter Tillotson wrote:
>
>> ... With the file system
>
Hello all,
I wanted to plot some statistics, so I wrote a simple wxPython class
to do it. Then I realized that I would like to draw bar graphs, so I
added that too.
Since I'm a complete Python newbie, I haven't done much of it the
"Python way", I suspect. So, I'm wondering if someone would
solution: have to add the zip archives to the PYTHONPATH, can be done in
the env but also as below
import sys, os.path
zipPackages=['base.zip']
for package in zipPackages:
sys.path.insert(0,os.path.join(sys.path[0],package))
import base.branch1.myModule
Peter Tillotson wrote:
> Hi all,
>
>
Peter Tillotson wrote:
> ... With the file system
>
> base/
> __init__.py
> branch1/
> __init__.py
> myModule.py
>
> At the same time its possible to store modules in a flat zip-file and
> import modules with the following.
>
> from myZip.zip import myModule.py
Does this work for yo
Gregory Piñero <[EMAIL PROTECTED]> writes:
> I'd like to see some database API's to the most common databases
> included.
Yes, certainly, this is a serious deficiency with Python.
--
http://mail.python.org/mailman/listinfo/python-list
[Mike Holmans]
> Some of those sonorous slow talkers from the South, and majestic bass
> African-Americans like James Earl Jones or Morgan Freeman, have far
> more gravitas than any English accent can: to us, such people sound
> monumental.
On a related note, have you ever seen any of the original
Hi all,
I was wondering if this is possible. In python v2.3 the import systems
was extended via PEP302 to cope with packages. *.py files in a directory
hierarchy can be imported as modules each level in the directory
hierarchy needs to contain at least an empty __init__.py file.
eg. With the file
Hi Nathan,
Please see my comments listed below.
Nathan Pinno wrote:
> print "Program Author: Nathan Pinno"
> print "ID# 2413448"
> print
> print "Program 3 - Loops and IF Conditions"
> print
> password = raw_input("Type in the password, please: ")
> while password != "hello":
>
Steve -
Good catch - in v1.3, I added some Unicode support for pyparsing,
although I have not gotten much feedback that anyone is using it, or
how well it works. So it is preferable to test against basestring
instead of str.
-- Paul
--
http://mail.python.org/mailman/listinfo/python-list
I tried the code snippet using win32api.GetFileVersionInfo(), what I
get now is the following when running on the executable machine:
. . . FileFlagsMask => 63
FileType => 2
FileVersionMS => 65536
FileVersionLS => 1
Signature => -17890115
FileSubtype => 0
FileFlags => 0
ProductVersionLS => 1
FileD
Most things do work, but some still seem to have problems with version
3.1 (and thus it is still not officially supported - but should be, not
long from now).
Cheers,
Fabio
Dave Cook wrote:
>On 2005-06-28, Fabio Zadrozny <[EMAIL PROTECTED]> wrote:
>
>
>
>>PyDev - Python IDE (Python Developm
Hi.
well if you do dir(a) just after defining 'a' then it does show
'__call__'.
the reason i wanted to do it is that i wanted to see if theres a
uniform way to wrap a function and callable objects so that for
example i can get some message printed whenever a function or a
function-like-object is c
OK, I (sort of) tried that. Used chr() to avoid issues of which editor and
rant the following:
import sys
ESC = chr(27)
DarkRed = ESC + "[31;2m"
ResetColour = ESC + "[0m"
print "Initial colour"
sys.stdout.write(DarkRed) ; sys.stdout.flush()
print "Is this dark red?"
sys.stdout.write(ResetCo
[Paul Rubin wrote]
> "Rune Strand" <[EMAIL PROTECTED]> writes:
> > You have the environment variable APPDATA. You can access it with
> > os.environ().
>
> Thanks!! Wow, I'd been hacking away at much messier approaches
> than that. It's actually os.environ['APPDATA'] ;-)
Note that the APPDAT
A question on using the PIL library. If I take a jpg file then, say, resize it
and save it
somewhere else, all metadata that is part of the jpg file is lost. This is a
pity: digital
cameras routinely add metainformation, so does, for example, Photoshop.
Is there any way of keeping this info in P
> About teaching in the exact sciences: I think we need a more hands-on
> applied approach, to some extent this holds for the entire school
> system.
YES! As a geometry(& trig) teacher, I am going to have them build a
shed, a kite, a sundial. I would love some doable ideas for hands
on which woul
Also, when I try running pdb in my Emacs shell, I get very weird
behavior: for instance, I'll hit 'h' and enter twenty times with no
output. Then, all of a sudden, twenty output messages will pop up.
--
http://mail.python.org/mailman/listinfo/python-list
One thing: is it possible to go through the code within emacs? Doing it
on the command line is useful, but it would be very helpful if I could
have a little marker within the emacs buffer that showed me where I am.
Rex
--
http://mail.python.org/mailman/listinfo/python-list
The question was about someone with limited programming experience
building simple easy to use programs on Windows. This is the niche where
VB and Delphi realy shine. Python with TkInter is kind of o.k., I realy
like Python+PyQt+Eric3+QtDesigner, but currently that only works with a
commercial lice
In article <[EMAIL PROTECTED]>,
BORT <[EMAIL PROTECTED]> wrote:
>
>Gentle folk of comp.lang.python, I heartily thank you all for your
>input. I think I'm taking the boys through the door marked "Logo." We
>may be back this way, though. We will likely need MORE in the nebulous
>future. I am impr
1 - 100 of 189 matches
Mail list logo