Re: Telnet Program

2008-01-29 Thread Rob Wolfe
hat I am logging into says, use > Carriage Return after each command. Nothing seems to get back the > data. I am not sure if the Python telnet is looking for more of true > command line like telnet>. Have you tried: tn.set_debuglevel(1) ? HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Write ooxml .ods (spreadsheat) from python?

2008-02-14 Thread Rob Wolfe
;s own private version of python, which would not help me. Check this: http://opendocumentfellowship.com/development/projects/odfpy HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for up to date documentation for Python/Tkinter

2008-02-21 Thread Rob Wolfe
een Fredrik Lundh's introduction to tkinter (and others) and >> it appears to be for an earlier version of Python. I am working with >> Python 2.5 and most doc I am finding are for Python 2.2 or earlier. >> >> Many thanks > > One of my favorites is http://effbot.

Re: Tkinter Menu Item Activation

2008-02-22 Thread Rob Wolfe
le.add_command(label="Save", command=hello) menubar.add_cascade(label='File', menu=mfile) root.config(menu=menubar) root.mainloop() But I think that you should read this: http://effbot.org/zone/vroom.htm HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-22 Thread Rob Wolfe
use a global CookieJar > object. Is there anyway that could handle all this INSIDE the class? > > I am totally new to OOP & python programming, so could anyone give me > some suggestions? Thanks in advance Google for urllib2.HTTPCookieProcessor. HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding/decoding issue with python2.5 and pymssql

2008-03-24 Thread Rob Williscroft
m uuid import * u = UUID( bytes = '\xe3N`\xee\xb0J\xe7N\xafM\x01\x81$9<\xd7') print u u = UUID( bytes_le = '\xe3N`\xee\xb0J\xe7N\xafM\x01\x81$9<\xd7') print u The "bytes_le" version prints: ee604ee3-4ab0-4ee7-af4d-018124393cd7 so I guess, this is what my

Re: Mocking `from foo import *` functions

2009-01-09 Thread Rob Williscroft
mails() Because python is dynamic alerter.DoStuffAndSendEmails will call the sendEmails in the alerter module that has been replaced with mock_sendEmails from the test script. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Mocking `from foo import *` functions

2009-01-10 Thread Rob Williscroft
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* testin

Unexpected behavior with dictionary keys containment and a user-defined class

2009-01-12 Thread Rob Clewley
t sure what other details to provide! Thanks a lot, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected behavior with dictionary keys containment and a user-defined class

2009-01-12 Thread Rob Clewley
. I forgot all about dictionary hashing for some reason... -Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: function argument dependent on another function argument?

2009-01-18 Thread Rob Williscroft
%r" % ( ( a, b, c, d ), ) ) if c is SENTINEL: print( "c is missing" ) if d is SENTINEL: print( "d is missing" ) f( *( 1, 2, SENTINEL, SENTINEL ) ) f( **dict( a = 1 , b = 2, d = 4 ) ) f( **dict( a = 1 , b = 2, d = 4, c = SENTINEL ) ) Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3: exec arg 1

2009-01-18 Thread Rob Williscroft
3: exec arg 1" Python 3.0 (r30:67507, Dec 3 2008, 19:44:23) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> open( "hello.py" ) >>> exec "a = 1"

Re: function argument dependent on another function argument?

2009-01-18 Thread Rob Williscroft
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 wrote: >> Aaron Brady wrote >> innews:6a10378f-addb-4d56-bc1b-0c382b3cb...@t26g2000prh > .googlegroups.com >> in comp.

Re: Python 3: exec arg 1

2009-01-20 Thread Rob Williscroft
rg/issue1762972 (*) IIRC, exec(open(fname).read()) is the Py 3.0 replacement. *) For reference, 2 clicks away from http://www.google.co.uk/search? hl=en&q=TextIOWrapper+exec+site%3Abugs.python.org&meta=> Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: list subsetting

2009-01-21 Thread Rob Williscroft
operations.) In this case something like this: a = [0 , 1, 3.14, 20, 8, 8, 3.14] count = sum( 1 for x in a if 3.13 < x and x < 3.15 ) http://docs.python.org/library/functions.html#sum http://docs.python.org/reference/expressions.html#generator-expressions Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-21 Thread Rob Williscroft
nt side manipulation. Then have your remote webserver render a form that posts via javavscript to the localhost webserver. The localhost server would post back in the same way. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-21 Thread Rob Williscroft
ocalhost server would >> post back in the same way. > > AFAIK the JS security model prevents that. > Are you thinking of frames?, or the way IE 7 complains about runnning javavscript (though it bizzarly calls it an "running an ActiveX control" )?. Anyway it works fine.

Re: Start Python at client side from web app

2009-01-22 Thread Rob Williscroft
m not > used to windows programming. Then don't do any (windows programming), do Python: http://docs.python.org/3.0/library/wsgiref.html#module- wsgiref.simple_server http://docs.python.org/3.0/library/cgi.html#functions Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-22 Thread Rob Williscroft
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

Re: pyAA for Python2.5

2009-01-28 Thread Rob Williscroft
c. You shoulf be able to verify it is on your path by typing: gcc --help or gcc --version and see some output. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: pyAA for Python2.5

2009-01-29 Thread Rob Williscroft
Kottiyath wrote in news:d86a0c1d-e158-4aa1-a47f-e2149948bdc3 @p2g2000prf.googlegroups.com in comp.lang.python: > On Jan 29, 1:51 am, Rob Williscroft wrote: >> Kottiyath wrote in news:6a594643-f6a2-4d8d-aab3-27eb16cb2fb8 >> @b38g2000prf.googlegroups.com in comp.lang.python:

Re: asp oddness , why specify ASP twice

2008-11-26 Thread Rob Williscroft
read it now as by next week microsoft will have moved the content elsewhere (I'd add a smiley here, but it really isn't funny). > <% > Response.Write ("test") > %> Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: 'new' module deprecation in python2.6

2008-11-29 Thread Rob Williscroft
tr) > > class MyNewClass(Test): > pass > > a = MyNewClass() > > print a.foo, a.buz, a.fiz, type(a) print( ( a.foo, a.buz, a.fiz, type(a) ) ) py 3.0: ('bar', 'brr', 'An attribute', ) py 2.4 ('bar', 'brr', 'An attribute', ) Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I return a non-zero status result from a python script?

2008-12-15 Thread Rob Williscroft
it is another kind of object, it will be printed and the system exit status will be one (i.e., failure). >>> Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Triple quoted string in exec function ?

2008-12-30 Thread Rob Williscroft
a function: http://docs.python.org/3.0/library/functions.html#exec print is also a function in python 3.x, so: >>> print(1, 2) 1 2 >>> Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Triple quoted string in exec function ?

2008-12-30 Thread Rob Williscroft
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: >>

Re: About PyOpenGL

2009-01-05 Thread Rob Williscroft
glut.html and put the glut32.dll where python can find it, the readme says \system which worked, but sticking it in the same directory as python.exe (c:\python25 in your case) worked too. http://pyopengl.sourceforge.net/ http://pyopengl.sourceforge.net/documentation/installation.html Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 nonlocal statement

2009-01-06 Thread Rob Williscroft
p://www.python.org/dev/peps/pep-3104/ A shorthand form is also permitted, in which nonlocal is prepended to an assignment or augmented assignment: nonlocal x = 3 The above has exactly the same meaning as nonlocal x; x = 3. (Guido supports a similar form of the global statement [24].) Search

Re: Generator metadata/attributes

2009-01-07 Thread Rob Williscroft
corated class Example( object ): @mydecorator def foo(self, a, b, ): yield 1 print( help( Example ) ) But realise that when the decorator ("mydecorator" above) is run neither the class ("Example") or the instance (self) is available. Which limits somewhat the debugging

Re: Generator metadata/attributes

2009-01-08 Thread Rob Williscroft
i in e.foo( 2, 3 ): print( i ) Output of the above is: DEBUG:root:Created Example 6 Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading from stdin (in windows)

2008-10-14 Thread Rob Williscroft
[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) >

Re: OOP books?

2008-10-15 Thread Rob Wolfe
ng to OOP practices, etc. Take a look at design patterns in Python: http://www.aleax.it/goo_pydp.pdf http://video.google.com/videoplay?docid=-3035093035748181693 HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: properties access by name

2008-10-17 Thread Rob Williscroft
@setproperty > def title(self, value): > self.__title = value > > properties_to_set = ['title'] > f = Film('aaa') Ther is a builtin `setattr` to do this: #http://www.python.org/doc/2.5.2/lib/built-in-funcs.html setattr( f, "title

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-18 Thread Rob Wolfe
mode-name "Python" local-abbrev-table python-mode-abbrev-table - font-lock-defaults '(python-font-lock-keywords) +font-lock-defaults'(python-font-lock-keywords nil nil nil nil +(font-lock-syntactic-keywords + . python-font-lock-syntactic-keywords)) + paragraph-separate "^[ \t]*$" paragraph-start "^[ \t]*$" require-final-newline t -- Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-18 Thread Rob Wolfe
mode-name "Python" local-abbrev-table python-mode-abbrev-table - font-lock-defaults '(python-font-lock-keywords) +font-lock-defaults'(python-font-lock-keywords nil nil nil nil +(font-lock-syntactic-keywords + . python-font-lock-syntactic-keywords)) + paragraph-separate "^[ \t]*$" paragraph-start "^[ \t]*$" require-final-newline t -- Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pyparsing 1.5.1 released

2008-10-19 Thread Rob Williscroft
maintain your 2.x code base adding another test where the code (and tests) is run through 2to3.py and then python 3.x runs the test suite. Presumably you only need to start maintining a 3.x code base when you start adding 3.x specific features or abandon support for 2.x python. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl/Python regular expressions vs. Boost.regex?

2008-10-23 Thread Rob Williscroft
ression matches the whole of the input sequence. If you want to search for an expression somewhere within the sequence then use regex_search. If you want to match a prefix of the character string then use regex_search with the flag match_continuous set. So yes it does. Rob. -- http://www.vi

Re: Exact match with regular expression

2008-10-26 Thread Rob Williscroft
27;aabb' > Instead it matches the first part: > >>>> m = p.match('aabb') >>>> m.group() > 'aab' Read (and bookmark) this: http://www.python.org/doc/2.5.2/lib/re-syntax.html You want the 3rd item down about the "$" special c

Re: Exact match with regular expression

2008-11-01 Thread Rob Williscroft
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

Re: Strange output from list

2008-11-11 Thread Rob Williscroft
quot;count" from table_1 count --- 64 (1 row(s) affected) Like it should. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Rob Clewley
You get None b/c that's what's being returned from your join strings function. Your function already prints out the result and doesn't return the joined strings a your usage case expects. So either return the joined strings from your function and don't print them inside the function, or vice versa

[JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Rob Clewley
PyDSTool (pydstool.sourceforge.net) is a multi-platform, open-source environment offering a range of library tools and utilities for research in dynamical systems modeling for scientists and engineers. Please contact Dr. Rob Clewley (rclewley) at (@) the Department of Mathematics, Georgia State Universit

Re: [JOB] Short-term python programming consultant - funds expire soon!

2009-03-10 Thread Rob Clewley
basis as a >> technical consultant (i.e., no fringe benefits offered) FYI I also discovered that the funds will in fact be available until **early June** which I will correct in the posting to that jobs site. Thanks, Rob -- http://mail.python.org/mailman/listinfo/python-list

pyconfig on 64-bit machines with distutils vs 32-bit legacy code

2009-03-21 Thread Rob Clewley
nderstanding? I assumed it would be possible to do this compilation even if a 64 bit version of python has been installed on this linux box. I'm somewhat out of my depth talking about these internal gubbins so please go easy on me. Thanks in advance, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: pyconfig on 64-bit machines with distutils vs 32-bit legacy code

2009-03-22 Thread Rob Clewley
sts/dopri853_temp -I/data/home/nwagner/local/include/python2.5 -E -dD /data/home/nwagner/svn/PyDSTool/PyDSTool/tests/dopri853_temp/dop853_HHnet_vf_wrap.c -w -m32 -D__DOPRI__ Maybe Nils can pick up the thread from here. Thanks, Rob On Sun, Mar 22, 2009 at 2:36 AM, "Martin v. Löwis" wrote: &

Re: sqlite single transaction without foreign key or triggers

2009-05-11 Thread Rob Williscroft
''', (s.SID, v['uid']) ) # Finally commit the transaction connection.commit() > # only do this if there is no primary key conflict in the above > if db.ERROR == None: db.execute('UPDATE groups SET uid=? WHERE uid=?', > (v['uid'],s.UID)) Python reports errors by throwing exceptions, so if you needed somthing like this it would more likely be: try: ... # somthing that errors up ... catch sqlite3.DatabaseError: connection.rollback() Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite single transaction without foreign key or triggers

2009-05-12 Thread Rob Williscroft
Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python: > In article , > Rob Williscroft wrote: >> >>db.execute( ''' >> update "sessions" set "uid" = ? >> where "uid" = ?

Re: sqlite single transaction without foreign key or triggers

2009-05-13 Thread Rob Williscroft
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 , >> Rob Williscroft   wrote: >> >> >> >> >Aahz wrote innews:guao50

Re: 4 hundred quadrillonth?

2009-05-21 Thread Rob Clewley
On Thu, May 21, 2009 at 8:19 PM, Gary Herron wrote: > MRAB wrote: >> >> Grant Edwards wrote: >>> >>> On 2009-05-21, Christian Heimes wrote: seanm...@gmail.com schrieb: > > The explaination in my introductory Python book is not very > satisfying, and I am hoping someone can e

Re: Questions about regex

2009-05-30 Thread Rob Williscroft
y/re.html The grouping operators, '(' and ')', appear to be unnessasery, so altogether this 1 line should probably be: text = re.sub( r']+>', '', text ) Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the biggest number that i can send to Wave_write.writeframes(data)

2009-06-02 Thread Rob Williscroft
ent ): self.sound = wx.SoundFromData( sample ) self.sound.Play( wx.SOUND_ASYNC ) frame = Frame( None ) frame.Show() app.MainLoop() Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a bug in urlunparse/urlunsplit

2008-05-18 Thread Rob Williscroft
s the path part with the other 2 its the location (domain) part. Although it may not be immediately obvious that the result is correct, consider the follwing html fragment: http://anothersite.com/bbb.gif";> If you were to use urlparse to parse the src attributes you would want: (

Re: Logger Configuration

2008-07-08 Thread Rob Wolfe
', 'a', '80', '5') so it would look like this: args=('/logs/application.log', 'a', 80, 5) HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Logging to zero or more destinations

2008-07-08 Thread Rob Wolfe
;>> logging.root.warning('error message') Note only one warning message. > P.S. I tried researching this further by myself, but the logging > module doesn't come with source (apparently it's written in C?) and I > don't have the time to find and downl

Re: FOSS projects exhibiting clean/good OOP?

2008-07-09 Thread Rob Wolfe
of very interesting and clean design: docutils: http://docutils.sourceforge.net/docs/dev/hacking.html trac: http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture In both of them code is not just clean, it is a work of art. ;) HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: logging via SocketHandler and TCPserver

2008-07-15 Thread Rob Wolfe
he rule is the same. > As far as the book is concerned, I guess I'd purchase the only copy ;-). "The Art of Logging" - four volumes. ;-) Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Help Tracing urllib2 Error, Please?

2008-07-20 Thread Rob Wolfe
f digest: proxy_support = urllib2.ProxyDigestAuthHandler(passwd_mgr) else: proxy_support = urllib2.ProxyBasicAuthHandler(passwd_mgr) opener.add_handler(proxy_support) return opener def fetchurl(url, opener): f = opener.open(url) data = f.read()

Re: The Importance of Terminology's Quality

2008-07-22 Thread Rob Warnock
thunks on the caller's dynamic stack frame [or at least call instructions *to* the thunks which could pass the current lexical contours as sub-arguments]. Knuth's nasty "man or boy test" stressed this to the limit: http://en.wikipedia.org/wiki/Man_or_boy_test -Rob p.s.

Re: Questions on 64 bit versions of Python

2008-07-26 Thread Rob Williscroft
sses IronPython 1.1 (1.1) on .NET 2.0.50727.1433 Copyright (c) Microsoft Corporation. All rights reserved. >>> I don't know what happens if you have both 32 bit and 64 bit versions of the framwork installed (presumably with slightly different minor version numbers) as I uninstalled the 32 bit version before I installed the AMD64 version. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions on 64 bit versions of Python

2008-07-26 Thread Rob Williscroft
results, however interestingly there is no 64 bit build for the 3.5 framework (or at least I was unable to find one). Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib and login with passwords

2008-07-26 Thread Rob Williscroft
password and submit-button are the name of the controls on the form you would normally login from. If the form has an enctype='multipart/form-data' then things get a little more complex, possibly start here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 Rob. -- http://w

Re: Iterating through 2 files simultaneously

2008-07-27 Thread Rob Williscroft
he same file handle as for stdout. So import STDOUT and make stderr=STDOUT in the Popen call, you will then have one file/pipe to deal with p1.stdout. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Profiling weirdness: Timer.timeit(), fibonacci and memoization

2008-08-02 Thread Rob Williscroft
ing on with timeit.Timer ? Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Profiling weirdness: Timer.timeit(), fibonacci and memoization

2008-08-03 Thread Rob Williscroft
e call *is* repeated, not just called once like you intended. Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

New python module to simulate arbitrary fixed and infinite precision binary floating point

2008-08-10 Thread Rob Clewley
lled. The source code is released under the BSD license, but I am amenable to other licensing ideas if there is interest in adapting the code for some other purpose. Full details of the functionality and known issues are in the module's docstring, and many examples of usage are in the accompa

Re: New python module to simulate arbitrary fixed and infinite precision binary floating point

2008-08-11 Thread Rob Clewley
sub-class of my ContextClass. Thanks for pointing out that page, anyway. I didn't know the smaller formats had been given their own name. -Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: formatting number of bytes to human readable format

2008-08-12 Thread Rob Weir
start - just need to change the table to something like:: _abbrevs = [ (2 ** 30L - 1, 'G'), (2 ** 20L - 1, 'M'), (2 ** 10L - 1, 'K'), (1, '') ] (and add a 'B'). -- -rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Downloading and Installing gasp

2008-08-12 Thread Rob Weir
On 13 Aug 2008, Cyprian Kumwaka wrote: > I am a beginner in Python. Please tell me how to go about in > downloading and installing the module gasp.I am using Python 2.5.2. What OS are you using? Do you have PyGame installed already? -- -rob -- http://mail.python.org/mailman/listinfo/

Re: Checking a file's time stamp -- followup

2008-08-12 Thread Rob Weir
On 13 Aug 2008, Virgil Stokes wrote: > Is it possible to change the time stamp of a file (Win2K platform)? If > yes, how? os.utime, http://docs.python.org/lib/os-file-dir.html. -- -rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Timer or Scheduler in a Class

2008-08-13 Thread Rob Weir
ion. Or http://www.gossamer-threads.com/lists/python/python/652793?page=last. -- -rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematical Python Library

2008-04-07 Thread Rob Clewley
calculating the nulls of a function (for instance) as numerical approximations, provided you are able to write small scripts to use those tools. -Rob On Mon, Apr 7, 2008 at 12:05 PM, mc <[EMAIL PROTECTED]> wrote: > I'm looking for a library which can do mathematical stuff like > solvi

Re: https and POST method

2008-04-11 Thread Rob Williscroft
his perl > script does: Curl maybe, http://pycurl.sourceforge.net/ Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with urllib2 and authentification

2008-04-22 Thread Rob Wolfe
passwd='mypass') > opener=urllib2.build_opener(aut, urllib2.HTTPHandler(debuglevel=1)) Add here: opener.add_handler(aut)) > print opener.open(fullurl).read() HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with urllib2 and authentification

2008-04-22 Thread Rob Wolfe
Rob Wolfe <[EMAIL PROTECTED]> writes: >> ---script: >> import urllib2 >> >> protocolo='http://' >> servidor='10.28.1.239/' >> pagina='manage' >> fullurl=protocolo+servidor+pagina >> >> aut=urlli

Re: The Importance of Terminology's Quality

2008-05-09 Thread Rob Warnock
George Neuner wrote: +--- | Common Lisp doesn't have "filter". +--- Of course it does! It just spells it REMOVE-IF-NOT!! ;-} ;-} > (remove-if-not #'oddp (iota 10)) (1 3 5 7 9) > (remove-if-not (lambda (x) (> x 4)) (iota 10))

Re: print "%s"

2008-08-17 Thread Rob Weir
On 18 Aug 2008, Beema Shafreen wrote: > Hi ALL, > > In my script i have to print a series of string , so > > print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") print "\t".join(("a&q

Re: Python Substitute for PHP GD, Resizing an image on the client side

2008-08-18 Thread Rob Weir
On 19 Aug 2008, [EMAIL PROTECTED] wrote: > Hi Folks, > > I am using cherrypy and python. I am trying to get a user profile > image to resize on the client side before uploading to the server. PHP > has a gd library that does it it seems. PIL? http://www.pythonware.com/products/

Re: The Importance of Terminology's Quality

2008-08-20 Thread Rob Warnock
haracter were named 1, 2, 4, 8, A, B, and W (wordmark). Oh, and C, but that was character parity -- the programmer couldn't set that separately.] What was the corresponding 1401 boot sequence? Oh, for the record, IMHO the DEC PDP-8 had a *much* simpler machine language and assembler than the IBM 1

Re: The Importance of Terminology's Quality

2008-08-20 Thread Rob Warnock
nibble values... "but that would have been wrong".] -Rob [1] The LGP-30 character code was defined before the industry had yet standardized on a common "hex" character set, so instead of "0123456789abcdef" they used "0123456789fgjkqw". [The &

Re: The Importance of Terminology's Quality

2008-08-21 Thread Rob Warnock
[EMAIL PROTECTED]> wrote: +--- | [EMAIL PROTECTED] (Rob Warnock) wrote: | >In the LGP-30, they used hex addresses, sort of[1], but the opcodes | >(all 16 of them) had single-letter mnemonics chosen so that the | >low 4 bits of the character codes *were* the correct nibbl

Re: logging exceptions

2008-08-26 Thread Rob Wolfe
ver printed' > ... [...] You need to subclass your handler and redefine `handleError` method. See: http://docs.python.org/lib/node409.html HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: floating point arithmetic

2008-08-26 Thread Rob Clewley
you are doing very technical calculations at high precision. If you need decimals to be represented "perfectly" in python (e.g. you are writing scripts for financial applications), try importing the decimal package (look it up in the python docs). -Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Leak?

2008-08-27 Thread Rob Wolfe
: http://guppy-pe.sourceforge.net/heapy-thesis.pdf .. [1] http://guppy-pe.sourceforge.net/ HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: logging exceptions

2008-08-27 Thread Rob Wolfe
ptions: ei = sys.exc_info() traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) del ei > > To cause logging to *not* raise exceptions, set > logging.raiseExceptions to 0 (default is 1). The raiseExceptions > variable would normally be set t

Re: Python svn bindings for Subversion?

2008-08-28 Thread Rob Wolfe
an anyone point me in the right direction. Check this: http://svn.collab.net/repos/svn/trunk/subversion/bindings/swig/python/ HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-09-01 Thread Rob Warnock
Robert Maas, <[EMAIL PROTECTED]> wrote: +--- | > From: [EMAIL PROTECTED] (Rob Warnock) | > In the LGP-30, they used hex addresses, sort of[1], but the | > opcodes (all 16 of them) had single-letter mnemonics chosen so that | > the low 4 bits of the character codes

Re: How do I set a callback in Python?

2008-09-08 Thread Rob Williscroft
ass > > self.client = Client("connection string") > self.client.callback_login = get_login > > ... but obviously, the Client class, when it calls the callback, > doesn't pass a reference to the "self" object. How do I do this? use: se

Re: Newbie Question:Please help

2008-09-08 Thread Rob Weir
in__": ^ = is used for assignment in Python, you want ==. -- -rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Cython dynamic library problem

2008-09-18 Thread Rob Wolfe
x-i686-2.5/test_cython.o -o pyx_test.so $ python2.5 test_cython.py 0 100 HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Visualize class inheritance hierarchy

2008-09-23 Thread Rob Kirkpatrick
special... I'm assuming this has been discussed before, but I'm lacking any Google keywords that bring up the appropriate discussion. Cheers, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Visualize class inheritance hierarchy

2008-09-23 Thread Rob Kirkpatrick
On Sep 23, 4:58 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > Rob Kirkpatrick wrote: > > I'm assuming this has been discussed before, but I'm lacking any > > Google keywords that bring up the appropriate discussion. > > You are looking for "mro

Re: processing email with Python on Windows?

2008-10-03 Thread Rob Williscroft
x' ) typ, data = imap.search( None, 'SINCE', today ) for num in data[0].split(): typ, data = imap.fetch(num, '(RFC822)') msg = email.message_from_string(data[0][1]) print ( "%s, %s\n" % ( num, msg['subject'] ) ) for part in msg.walk():

Re: csv files for download

2008-10-04 Thread Rob Williscroft
ent-Type: text/csv" print 'Content-Disposition: attachment; filename=whatever.csv' print ... http://search.yahoo.com/search?p=Content-Disposition http://www.python.org/doc/2.5.2/lib/cgi-intro.html Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie
the python interpreter fails. Likewise any attempt to utilise pysqlite2 in a python script fails. Has anyone here successfully installed it? If you have, do you have any pearls of wisdom that might help me out? Cheers, Rob C -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie
Fredrik Lundh wrote: > Rob Cowie wrote: > > > There are some notes on the pysqlite wiki regarding modification of the > > setup.py script and I've followed them to no avail. > > > > Build and install appear to go smoothly but attempting to run the tests &g

Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie
Gerhard Häring wrote: > Rob Cowie wrote: > > [...] > > However, if I do "from pysqlite2 import test" as suggested after > > installation, I get the following traceback... > > > > Traceback (most recent call last): > > File "", line 1

Re: Installing PySQLite on OS X 10.4

2006-03-16 Thread Rob Cowie
Cheers. I should have read the installation notes more carefully :) Rob C -- http://mail.python.org/mailman/listinfo/python-list

Re: SSH, remote login, and command output

2006-03-26 Thread Rob Williscroft
ndows clients, but IIRC its win2K, XP only, or you could use cygwin (which the above is taken from). Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Standalone Python functions in UML?

2006-04-04 Thread Rob Cowie
ow/when/why it is generated. > > (I know that Python code itself is best at communication design ideas, > but there are some people which prefer to talk UML.) > > (Have not found anything relevant with google) > > Thanks! > > Regards, > Roman Suzi Rob C -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 359: The "make" Statement

2006-04-14 Thread Rob Williscroft
t; I don't know wether this has been suggested or not, but what about def: def namespace ns: x = 1 def type blah(object): pass def property x: def get(): return ns.x Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8   9   10   11   >