Re: Python's popularity

2008-12-22 Thread Richard Riley
Marco Mariani writes: > Richard Riley wrote: > >> One does not have to by a language maestro to try and assess its >> popularity. While his numbers or his reading of the numbers might be >> open to some questions, to suggest that one needs to be totally familiar >>

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Jason Rumney writes: > On Jan 1, 3:12 pm, r wrote: > >> The man lives in a world driven by common sense > > "Common" sense suggests that his views are shared among the general > populace. I don't see much evidence of that in the sometimes never- > ending threads that frequently follow his posti

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
r writes: > On Jan 1, 2:05 am, Jason Rumney wrote: >> On Jan 1, 3:12 pm, r wrote: >> >> > The man lives in a world driven by common sense >> >> "Common" sense suggests that his views are shared among the general >> populace. I don't see much evidence of that in the sometimes never- >> ending

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tim Greer writes: > Giampaolo Rodola' wrote: > >> This is not a Ruby group. >> I recommend you to go waste your time there. > > That poster has a frequent habit of cross posting to multiple, > irrelevant news groups. There's no rhyme or reason to it. It's best > to just filter the guy's posts.

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tamas K Papp writes: > On Thu, 01 Jan 2009 23:28:08 +0100, Richard Riley wrote: > >> posts controversial but always interesting. His ELisp tutorial is far >> and away better than anything else out there for the programmer moving >> to Elisp IMO. He backs up his points wit

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Raymond Wiker writes: > Richard Riley writes: > >> Tamas K Papp writes: >> >>> On Thu, 01 Jan 2009 23:28:08 +0100, Richard Riley wrote: >>> >>>> posts controversial but always interesting. His ELisp tutorial is far >>>> and away b

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tim Greer writes: > Richard Riley wrote: > >> >> Tim Greer writes: >> >>> Giampaolo Rodola' wrote: >>> >>>> This is not a Ruby group. >>>> I recommend you to go waste your time there. >>> >>> That poste

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Kenneth Tilton writes: > Richard Riley wrote: >> Jason Rumney writes: >> >>> On Jan 1, 3:12 pm, r wrote: >>> >>>> The man lives in a world driven by common sense >>> "Common" sense suggests that his views are shared among th

Re: time

2008-10-07 Thread Richard Brodie
"Gabriel Rossetti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] . > I'm a UTC/GMT +1, I tried obtaining the UTC time, it says it's 2 hours > earlier than the > current time (14:59). I tried various other methods, I still get the wrong > time. Does > anyone have an idea with wha

[no subject]

2008-11-07 Thread Richard Carlsen
Hey! My name is Richard Carlsen. I am trying to create a program/game with the following plot/requirement in Python (a basic river-crossing game). I have just begun programming and have read a basics book on Python, but av having problems getting started with this. I would very much

Wild cards for comparison

2008-11-16 Thread Foster, Richard
I am trying to update a program to search for two servers instead of 1 and I am having problems. The two servers are blah1-gt1 and blah2-gp1 It has been working as shown in the example below: Ex x="blah1-gt1" I tried x="*-g*1" And it did not work. I have imported both the glob

Re: Need help converting text to csv format

2008-11-21 Thread Richard Riley
George Sakkis <[EMAIL PROTECTED]> writes: > On Nov 21, 11:05 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> George Sakkis wrote: >> > On Nov 21, 10:18 am, Chuck Connors <[EMAIL PROTECTED]> wrote: >> >> >> Any help, pseudo code, or whatever push in the right direction would >> >> be most appreciate

Re: Python AppStore / Marketplace

2009-02-24 Thread Richard Brodie
"Rhodri James" wrote in message news:mailman.615.1235436896.11746.python-l...@python.org... > A souq is a bazaar :-) > Maybe I've just read too much arabic-themed fiction, but I was surprised not > to find the word in my trusty Chambers. Try under 'souk'. Transliterating to the Roman 'q' seem

Re: Jerry Pournelle gives award to Python and Guido for 2008

2009-03-03 Thread Richard Hanson
[Tardy as well as drifting off-topic:] Terry Reedy wrote: > Richard Hanson wrote: > > > Jerry Pournelle commends Python and Guido in "The Annual Orchid > > and Onions Parade" portion of his Chaos Manor Reviews column: > > > > ><http://www.

Re: Response codes and \r\n

2009-03-05 Thread Richard Brodie
"Catherine Heathcote" wrote in message news:n3nrl.2951$lc7.2...@text.news.virginmedia.com... = > I am reading an XML file (code at the end if it helps) and all goes well > except I am > getting the http response code printed. I suggest you comment out line 22. The status shouldn't be in the d

Bizarre import duplication.

2009-03-06 Thread Richard Thomas
't be outside possibility. Richard -- http://mail.python.org/mailman/listinfo/python-list

Re: error after upgrade

2009-03-09 Thread Richard Brodie
"jonsoons" wrote in message news:3102ef22-b5e6-466d-a3f3-8648ccb5a...@p11g2000yqe.googlegroups.com... >from binascii import hexlify as _hexlify > ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/ > lib/libpython2.5.so.1.0: symbol libintl_gettext: referenced symbol not >

Roundup Issue Tracker release 1.4.7

2009-03-13 Thread Richard Jones
I'm proud to release version 1.4.7 of Roundup. 1.4.7 is primarily a bugfix release which contains important security fixes: - a number of security issues were discovered by Daniel Diniz - EditCSV and ExportCSV altered to include permission checks - HTTP POST required on actions which alter data -

Re: [Roundup-users] Roundup Issue Tracker release 1.4.7

2009-03-13 Thread Richard Jones
On Sat, Mar 14, 2009 at 9:51 AM, Richard Jones wrote: > I'm proud to release version 1.4.7 of Roundup. I would like to also specially thank Stefan Seefeld who is responsible for the new features and a lot of the bugfixes in this release. Richard -- http://mail.python.org/mailman/

Re: ValueError: filedescriptor out of range in select()

2009-03-17 Thread Richard Brodie
"Laszlo Nagy" wrote in message news:mailman.2032.1237300298.11746.python-l...@python.org... > This method is called after the connection has been closed. Is is possible > that somehow > the file handles are leaking? If I understand correctly, you call shutdown() but not close() in response t

Roundup Issue Tracker release 1.4.8

2009-03-17 Thread Richard Jones
I'm proud to release version 1.4.8 of Roundup. This release fixes some regressions: - bug introduced into hyperdb filter (issue 2550505) - bug introduced into CVS export and view (issue 2550529) - bugs introduced in the migration to the email package (issue 2550531) And adds a couple of other fi

pythoncom -- ImportError: DLL load failed

2009-04-24 Thread Richard Whidden
ink of them right now. I have this sickening feeling in my gut that the solution is so obvious that a blind and dead person would have spotted the solution before me. Anyway, if anyone has an idea (or a link to an idea) please let me know. Thanks, Richard Whidden -- http://mail.python.org/mailman/listinfo/python-list

Re: pythoncom -- ImportError: DLL load failed - Update

2009-04-24 Thread Richard Whidden
iginal problem... Argh. The msvc* dlls are in an odd place: C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e I've tried including that directory to my system path too, of course. "Richard Whidden" wrote in message news:002a58fa$0$25248$c3e8.

Re: pythoncom -- ImportError: DLL load failed - Solved, sort of.

2009-04-24 Thread Richard Whidden
I installed a clean copy of Python 2.5, pywin32 and PyGreSQL and it works. I'll have to figure out what broke with my 2.6 install. Thanks for letting me scribble here. "Richard Whidden" wrote in message news:002a58fa$0$25248$c3e8...@news.astraweb.com... > I've sniffed a

Re: Thread-killing, round 666 (was Re: Lisp mentality vs. Python mentality)

2009-04-27 Thread Richard Brodie
"Vsevolod" wrote in message news:42cebb2b-0361-416c-8932-9371da50a...@y6g2000prf.googlegroups.com... > There's a common unification library -- bordeaux-threads -- > that abstracts away implementation specifics. It's API includes > the function destroy-thread. Which is deprecated, like the Jav

Re: thc v0.3 - txt to html converter - better code?

2009-05-06 Thread Richard Brodie
"Stefan Behnel" wrote in message news:4a008996$0$31862$9b4e6...@newsspool3.arcor-online.net... >language_map = {'English': 'EN', 'Deutsch': 'DE'} >strict_or_transitional = {True: 'Transitional', False: 'Strict'} > ># this will raise a KeyError for unknown languages >language = l

Re: urllib2 slow for multiple requests

2009-05-14 Thread Richard Brodie
"cgoldberg" wrote in message news:9ae58862-1cb2-4981-ae6a-0428c7684...@z5g2000vba.googlegroups.com... > you aren't doing a read(), so technically you are just connecting to > the web server and sending the request but never reading the content > back from the socket. > > But that is not the pro

Re: urllib2 slow for multiple requests

2009-05-14 Thread Richard Brodie
"Tomas Svarovsky" wrote in message news:747b0d4f-f9fd-4fa6-bb6d-0a4365f32...@b1g2000vbc.googlegroups.com... > This is a good point, but then it would manifest regardless of the > language used AFAIK. And this is not the case, ruby and php > implementations are working quite fine. What I meant

Re: "TypeError: 'int' object is not callable"

2009-06-02 Thread Richard Brodie
"Visco Shaun" wrote in message news:mailman.966.1243852864.8015.python-l...@python.org... > when I was executing the below code I got "TypeError: 'int' object is > not callable" exception. Why is it so? > > if type(c) == type(ERROR): You've probably assigned to type somewhere in your code. What

Re: Why does python not have a mechanism for data hiding?

2008-06-03 Thread Richard Levasseur
On Jun 3, 3:07 am, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > On Mon, Jun 2, 2008 at 10:50 PM, Russ P. <[EMAIL PROTECTED]> wrote: > > On Jun 2, 6:41 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > >> You are not realizing that only useful(**) thing about data hiding is > >> that some code has acc

Re: cgi, parse_header and semi-colon

2008-06-06 Thread Richard Brodie
"Sylvain" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") : > cgi.FieldStorage.filename returns only "my" everything after the semi- > colon is missing > > Is it a bug or i'm missing something ? I doubt it's bug in par

Re: 32 bit or 64 bit?

2008-06-17 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >That was suggested. Problem is, that sometimes the velocities are near >zero. So this solution, by itself, is not general enough. Maybe working in p, and delta-p would be more stable. -- http://mail.python.org/mailman/listinfo/pyth

Redirecting stdout to another script

2008-07-15 Thread Richard Simões
problem here is that the python script's outputting the result to stdout via print statements isn't doing what we expected: my friend's perl script isn't getting the result back via the pipe. Is there is simple solution for this problem? Whose script needs to be modified? Th

Re: SimpleJson is slow .... is there any C Compiled version ?

2008-07-26 Thread Richard Levasseur
On Jul 25, 5:52 pm, Matt Nordhoff <[EMAIL PROTECTED]> wrote: > Also, simplejson and python-cjson might not be entirely compatible: > there's one character that one escapes and the other doesn't, or something. > -- They also have different interface. simplejson uses load/loads/dump/ dumps, whereas

Re: URLs and ampersands

2008-08-05 Thread Richard Brodie
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I could just do a string replace, but is there a "right" way to escape > and unescape URLs? The right way is to parse your HTML with an HTML parser. URLs are not exempt from the normal HTML escaping rules, although

Re: Game design : Making computer play

2008-04-14 Thread Richard Heathfield
a no-brainer: 13,7 and 8,7 is far and away the best move. > I know this is kind of off-topic here. Please redirect me, if there > are more appropriate newsgroup. comp.programming is probably where you want to be, at least to start off with. -- Richard Heathfield <http://www.cpax.o

Re: Game design : Making computer play

2008-04-14 Thread Richard Heathfield
[comp.programming added, and followups set to that group] v4vijayakumar said: > On Apr 14, 12:35 pm, Richard Heathfield <[EMAIL PROTECTED]> wrote: >> v4vijayakumar said: >> > In computer based, two player, board games, how to make computer play? >> >> Wri

Re: Game design : Making computer play

2008-04-14 Thread Richard Heathfield
one by one. Tigers appear only to be able to move orthogonally (up/down/left/right) - although they can use the horn to whizz across the chest (e.g. CHEST-1 to HORN, HORN to CHEST-4, in two moves). The rest of the rules are beyond me, I'm afraid. It's not clear how tigers eat goats o

Re: Serving binary content (images, etc) using BasteHTTPServer

2008-04-16 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:556871d3-1fea-40f2-9cc6- >s.end_headers A bare method name (without parentheses) won't get called. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode chr(150) en dash

2008-04-17 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I think I understand the unicode basic principles, what confuses me is the > usage > different applications > make out of it. > > For example, I got that EN DASH out of a web page which states > at the beggining. That's why I > di

Troubles with 'self'

2008-05-08 Thread Richard Speaker
I'm somewhat new to Python... and programming in general. I know enough to be dangerous for sure. I have a feeling the solution to this is simple. I'm having trouble getting 'self' to initialize or work in a class application. I keep getting the message: LogFile = self.BasicSummary (

Roundup Issue Tracker version 1.4.5.1 released

2008-08-18 Thread Richard Jones
I'm proud to release version 1.4.5 of Roundup. 1.4.5.1 has one new feature: - Add use of username/password stored in ~/.netrc in mailgw (sf patch #1912105) It is otherwise mostly a bugfix release: - 'Make a Copy' failed with more than one person in nosy list (sf #1906147) - xml-rpc security c

Re: exception handling in complex Python programs

2008-08-20 Thread Richard Levasseur
One common-place thing I've noticed in a lot of python code is that every package or module has a main Error class, and all sub-types inherit from that class. So you just catch mylib.Error, and you're going to catch all the exceptions that package generates directly. There seems to be a lot of co

epoch seconds from a datetime

2008-08-28 Thread Richard Rossel
Hi friends, I need a little help here, I 'm stuck with epoch calculation issue. I have this datetime: date_new = datetime(*time.strptime('20080101T00','%Y%m%dT%H%M%S') [0:6]) This date_new is in UTC Now I need to know the seconds since epoch of this new date, so I run this: seconds = int(time.m

Re: epoch seconds from a datetime

2008-08-28 Thread Richard Rossel
On 28 ago, 14:25, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Thu, Aug 28, 2008 at 10:18 AM, Richard Rossel <[EMAIL PROTECTED]> wrote: > > Hi friends, > > I need a little help here, I 'm stuck with epoch calculation issue. > > I have this

Roundup Issue Tracker version 1.4.6 released

2008-08-31 Thread Richard Jones
I'm proud to release version 1.4.6 of Roundup. 1.4.6 is a bugfix release: - Fix bug introduced in 1.4.5 in RDBMS full-text indexing - Make URL matching code less matchy If you're upgrading from an older version of Roundup you *must* follow the "Software Upgrade" guidelines given in the maintenan

Re: XML-RPC "filter"

2008-09-10 Thread Richard Levasseur
On Sep 9, 8:53 am, Luigi <[EMAIL PROTECTED]> wrote: > Dear all, > > I'm writing an XML-RPC server which should be able to modify the > incoming request before dispatching it. In particular I wand to added > two fixed parameters to the method called: one is the client host > address, and the other i

Re: md5 differences

2008-09-10 Thread Richard Brodie
"Python" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > here's an example: > [EMAIL PROTECTED]:~% echo "hello" | md5 > b1946ac92492d2347c6235b4d2611184 > How do I get the same results? Checksum the same string. >>> md5.new("hello\n").hexdigest() 'b1946ac92492d2347c6235b4d2611184

Re: XML-RPC "filter"

2008-09-11 Thread Richard Levasseur
On Sep 10, 2:04 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > On 9 Set, 17:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> I would go for a slightly different approach: make your server have a > >> dispatch-method that delegates the calls to the und

Re: Installing pySerial

2008-09-18 Thread Richard Brodie
"Joe G (Home)" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have installed Python for windows today from the python web site .I also > installed > pySerial using the Windows installer from the sourceforge web site. You need to read the pySerial smallprint, where it say

Re: index all instances by id - a memory leak?

2008-10-02 Thread Richard Levasseur
On Oct 1, 10:35 pm, Jason Scheirer <[EMAIL PROTECTED]> wrote: > On Oct 1, 10:01 pm, Dan Barbus <[EMAIL PROTECTED]> wrote: > > > On Oct 2, 7:54 am, Dan Barbus <[EMAIL PROTECTED]> wrote: > > > >     def getItemById(id): > > >         return _itemsById[id] > > > I just saw that this won't compile. Sti

Re: import random module

2006-03-22 Thread Richard Brodie
"Benjamin Niemann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Don't name your script 'random.py' (or any other name from the stdlib). > 'import random' will import the script itself (not the random module from > the stdlib), which is not what you want. I discovered long, long

Re: Why TypeError: 'str' object is not callable?

2006-03-22 Thread Richard Townsend
On 22 Mar 2006 12:10:49 -0800, Randall Parker wrote: > > TmpErrMsg1 = "State machine %s " (StateMachineName) > TmpErrMsg1 = "State machine %s " % (StateMachineName) -- Richard -- http://mail.python.org/mailman/listinfo/python-list

Re: RPC client class?

2006-03-22 Thread Richard Tew
calls from server to client and vice versa. Perhaps it was bad naming on my part, but I assumed remote procedure calls was a general technique rather than just a Sun RPC protocol. Richard. -- http://mail.python.org/mailman/listinfo/python-list

Louie + Twisted

2006-03-22 Thread Richard Townsend
I recently came across the Louie package (http://louie.berlios.de/) I am particularly interested in the TwistedDispatchPlugin, however the documentation is very sparse. Does anyone have some example code showing how to use it, please? -- Richard -- http://mail.python.org/mailman/listinfo

Re: does python could support sequence of short or int?

2006-03-30 Thread Richard Brodie
"momobear" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > then how can I convert it to a int list? I read about struct and array, > I think they are not suitable, since I don't know how long will the > buffer is. I know if I write a plugins modules in C should works, but > that's

Stackless Python for 2.4.3

2006-03-30 Thread Richard Tew
sible they are. But if you see any for your build that are unexpected, please mention them. Thanks, Richard Tew. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to determine an object is "scriptable"

2006-03-30 Thread Richard Brodie
"abcd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I recently came across a problem where I saw this error: > "TypeError: unsubscriptable object" > > How can I determine if an object is "scriptable" or "unscriptable"? subscriptable: supports an indexing operator, like a list do

Re: How to determine an object is "scriptable"

2006-03-30 Thread Richard Brodie
"abcd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > doesn't seem to be a builtin function or module...or is that just your > definition of subscriptable? Yes, I figured you were just confused. You were using the wrong words, after all. -- http://mail.python.org/mailman/list

Re: Stackless Python for 2.4.3

2006-03-30 Thread Richard Tew
works on them all and is therefore more or less complete except for known issues is what I am interesting in learning. Or what has to be fixed. Thanks, Richard. -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi error

2006-03-31 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It works fine when i run it in python , but it won't run when i run my > cgi script. > > It says AttributeError: 'module' object has no attribute 'FTPHost' > what could be a possible cause? thanks. Perhaps you called your script 'ftp

slicing question: rawdata[j:j+1] == 'xx' #will this ever be true ??

2006-04-05 Thread richard . hsu
I am new to python language and most of my python programming has been done with IronPython. I was looking at the source of markupbase.py which is included with Python 2.4 and came across the following line of code:- if rawdata[j:j+1] == '--': #comment i was confused because based on my understa

Re: urllib.urlencode wrongly encoding � character

2006-04-06 Thread Richard Brodie
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm obviously missing some context here, but "encoding ± to %B1 on any > platform" is exactly what urlencode does: > >>>> import urllib >>>> urllib.urlencode([("key", chr(0xb1))]) >'key=%B1' Yeah but you'

Searching python-list and MySQL

2006-04-11 Thread Richard Brosnahan
very much appreciate any hints. tia -- Richard Brosnahan Owner Engineering Art, L.L.C Silence is golden when you can’t think of a good answer. Muhammad Ali, boxer -- http://mail.python.org/mailman/listinfo/python-list

finish_endtag in sgmllib.py [Python 2.4]

2006-04-11 Thread Richard Hsu
uot; to self.unknown_endtag(tag) ?? thank you in advance. Richard Hsu hobbyist programmer. Toronto, Canada. -- http://mail.python.org/mailman/listinfo/python-list

Re: finish_endtag in sgmllib.py [Python 2.4]

2006-04-11 Thread Richard Hsu
thank you Ben. not only did i learn something about my question, i learnt the 'truth' :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot import htmllib

2006-04-13 Thread Richard Brodie
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > As far as I can see, the files formatter.py and htmllib.py are where > they are supposed to be, in /usr/lib/python2.4/. You probably have aliased it by calling your main program formatter.py, or something similar. -- http://mail.

Re: Python certification/training

2006-04-16 Thread Richard Marsden
Aahz wrote: > Then may I suggest that you subscribe to the tutor list? That will give > you a good place to ask questions; as you learn Python, answering other > people's questions will give you a good way to hone your own knowledge. Which is? :-) Richard (who might also be i

Re: Python certification/training

2006-04-17 Thread Richard Marsden
ons, as well as see some useful tips. Cheers, Richard -- Richard Marsden Winwaed Software Technology, http://www.winwaed.com http://www.mapping-tools.com for MapPoint tools and add-ins Pre-Order MapPoint 2006 now: http://www.mapping-tools.com/mappoint2006 -- http://mail.python.org/mailman/listinfo/python-list

Re: test if an input string starts with a python expression

2009-12-07 Thread Richard Thomas
On Dec 8, 1:22 am, r0g wrote: > Torsten Mohr wrote: > > Hi, > > > i'd like to test if an input string starts with a python expression > > and also where that expression ends.  An example: > > > a_func(3*7, '''abc''') +5 pls some more > > > The first part until (inclusive) the 5 should be found as

Re: UnboundLocalError: local variable '_[1]' referenced before assignment

2009-12-09 Thread Richard Thomas
y, p)) > params = r > > Does anyone understand what is going on here? > > Thank you, > Gabriel That isn't an error that should occur, not least because _[1] isn't a valid name. Can you post a full traceback? Richard. -- http://mail.python.org/mailman/listinfo/python-list

Re: Variable class instantiation

2009-12-11 Thread Richard Thomas
an always do eval(my_string) to get the class object. Better I think is to make an explicit dictionary of options (much safer). classes = dict((cls.__name__, cls) for cls in (C1, C2)) classes["C1"] # gives you C1 classes["C2"] # gives you C2 Richard. -- http://mail.python.org/mailman/listinfo/python-list

Re: More stuff added to ch 2 of my programming intro

2009-12-16 Thread Richard Heathfield
d you even > think about that?). > > Unfortunately one then also get responses from trolls, small kids, > idiots, etc.. In my experience, mensanator doesn't usually behave trollishly. Perhaps he's just rubbing you up the wrong way accidentally. It might be worth it for both yo

Re: Raw string substitution problem

2009-12-17 Thread Richard Brodie
"Alan G Isaac" wrote in message news:qemdnrut0jvj1lfwnz2dnuvz_vqdn...@rcn.net... > Naturally enough. So I think the right answer is: > > 1. this is a documentation bug (i.e., the documentation >fails to specify unexpected behavior for raw strings), or > 2. this is a bug (i.e., raw strings

Re: Line indexing in Python

2009-12-18 Thread Richard Thomas
or which you should use a dictionary: index = {} for line in file: index[line[0]] = line a.write(index['0']) Richard. -- http://mail.python.org/mailman/listinfo/python-list

Re: basic Class in Python

2010-01-19 Thread Richard Brodie
"bartc" wrote in message news:xl_4n.28001$ym4.5...@text.news.virginmedia.com... > Any particular reason why two, and not one (or three)? In some fonts it's > difficult to > tell how many as they run together. It follows the C convention for reserved identifers. -- http://mail.python.org/

Re: Object Integer mapping

2010-01-20 Thread Richard Thomas
ds. class Point(object): ... def __eq__(self, other): return self.x == other.x and self.y == other.y and self.z == other.z This addition makes sure that if two points a equivalent then they count as the same key in the dictionary. Richard. -- http://mail.python.org/mailman/listinfo/python-list

reading from pipe

2010-01-25 Thread Richard Lamboj
Hello, is there any solution to catch if a pipe has closed? Maybe the signal modul? For Simulation: #!/usr/bin/env python # -*- coding: utf-8 -*- import sys while True: line = sys.stdin.readline() sys.stdout.write(line) sys.stdout.flush() time cat /tmp/proxy.test | te

starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
hello, just for _curiosity_. What would be if i start a thread in a nother thread and acquire a lock in the "child" thread. Is there anything that could go wrong if someone try to start threads in threads? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
Am Wednesday 27 January 2010 14:10:13 schrieb Stefan Behnel: > Richard Lamboj, 27.01.2010 14:06: > > just for _curiosity_. What would be if i start a thread in a nother > > thread and acquire a lock in the "child" thread. Is there anything that > > could go wrong

Re: starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
Am Wednesday 27 January 2010 15:30:17 schrieb Stefan Behnel: > Richard Lamboj, 27.01.2010 15:23: > > Am Wednesday 27 January 2010 14:10:13 schrieb Stefan Behnel: > >> Richard Lamboj, 27.01.2010 14:06: > >>> just for _curiosity_. What would be if i start a threa

Killing a Thread

2010-01-29 Thread Richard Lamboj
Hello, which Method is better to kill a Thread? Using Thread Events, or a raising a Exception? Maybe someone has a small example for me? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial non-standard baud rate

2009-10-01 Thread Richard Brodie
"oyinbo55" wrote in message news:2feb36fc-106c-4d7c-a697-db59971dc...@a7g2000yqo.googlegroups.com... > Using the standard 19200 baud results in gobbledegook from the > multimeter. You aren't going to notice a 0.1% clock skew within 1 byte. Forget about the difference between 19200 and 19230.

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread Richard Brodie
"Chris Colbert" wrote in message news:mailman.868.1254748945.2807.python-l...@python.org... > I am trying to abstract this machinery in a single class called > Controller which I want to inherit from either SimController or > RealController based on whether a module level flag SIMULATION is set

Re: struct curiosity

2009-10-16 Thread Richard Brodie
"pjcoup" wrote in message news:b1537079-6e3a-43e1-814b-7ccf185fb...@v15g2000prn.googlegroups.com... > I would have expected calcsize('BB') to be either 10 or 12 > (padding), but 11? Is there a simple explanation of what is going > on here? The purpose of the padding is to align the words

python, emacs, pylint, epylint, flymake

2009-10-21 Thread Richard Riley
I have asked in emacs help too, but basically does anyone here have pylint integrated with emacs so that you can actually read the error description? I am set up as described here:- http://tinyurl.com/yfshb5b or http://stackoverflow.com/questions/1259873/how-can-i-use-emacs-flymake-mode-for-pyt

Re: Fallen Sword

2009-10-22 Thread Richard Riley
Ben Finney writes: > Richard Riley writes: > >> Ben Finney writes: >> > Reported to service provider as spam. >> >> Please don't reply to SPAM. You just make it visible to those of us >> with better filters. Hint : spammers do not read your reply. &g

Re: Passing values from html to python

2009-10-22 Thread Richard Brodie
"Albert Hopkins" wrote in message news:mailman.1851.1256208328.2807.python-l...@python.org... > On Thu, 2009-10-22 at 10:44 +0200, Ahmed Barakat wrote: >> Hi guys, >> >> I am playing with google app engine, I have this situation: >> >> I have a text box in an html page, I want to get the value i

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-28 Thread Richard Heathfield
7;s parallel comment along similar lines, and Jon Clements's reply - which appears to solve the problem, albeit in a semi-proprietary way. So I'm not asking for a solutio, just adding my vote for "let's try to keep the Web as open to everyone as we can". -- Richard Heat

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-28 Thread Richard Heathfield
http://preview.tinyurl.com/progintro >> >> Cheers, > > Why is chapter 2 called "ASD"? Presumably its subtitle is "Introducing UPPER CASE". -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ "Usenet is a strange place" - dmr 29 July 1999 Sig line vacant - apply within -- http://mail.python.org/mailman/listinfo/python-list

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-28 Thread Richard Heathfield
larly enjoy relying on proprietary non-text formats, however, is not crippled, just cautious. A man who cannot express what he needs to express /without/ resorting to .pdf format is computer-illiterate. -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ "Usenet is a

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Richard Heathfield
In <7ktsj6f3bciq...@mid.individual.net>, osmium wrote: > "Richard Heathfield" wrote: > >> A man who cannot express what he needs to express /without/ >> resorting to .pdf format is computer-illiterate. > > What format do you suggest? Firstly, I want to

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Richard Heathfield
In <7ku6jhf3a23e...@mid.individual.net>, osmium wrote: > "Richard Heathfield" wrote: > >>> if the OP had just been smarter. >> >> Er, no, I didn't have that in mind at all. > > In some cultures, implying that someone is illiterate sugges

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Richard Heathfield
In , Richard Heathfield wrote: > In <7ku6jhf3a23e...@mid.individual.net>, osmium wrote: >> >> In some cultures, implying that someone is illiterate suggests "not >> smart". > > I don't see that at all. Babies are illiterate. Nobody knows wheth

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-30 Thread Richard Heathfield
But why should you have to? > > As opposed to...? Something you can grep. -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ "Usenet is a strange place" - dmr 29 July 1999 Sig line vacant - apply within -- http://mail.python.org/mailman/listinfo/python-list

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-30 Thread Richard Heathfield
, so every book /should/ have an errata list - at least until such time as an author can correct errors in already-sold books. That not every book does have such a list is therefore of some concern. -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ "Usenet is

Unexpected python exception

2009-11-11 Thread Richard Purdie
I've seen, its very unusual to have something operate "backwards" in scope in python. Can anyone explain why this happens? Cheers, Richard -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected python exception

2009-11-11 Thread Richard Purdie
functions without adding it to each one? I suspect this equates to intentionally "leaking the imported names into the module scope"? :) What I'm trying to do is to avoid having "import X" statements everywhere by changing __builtin__. It seems my approach doesn't have quite the same effect as a true import though. Cheers, Richard -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected python exception

2009-11-11 Thread Richard Purdie
On Wed, 2009-11-11 at 05:04 -0800, Chris Rebert wrote: > On Wed, Nov 11, 2009 at 4:37 AM, Richard Purdie wrote: > > > Is there a way to make the "global x" apply to all functions without > > adding it to each one? > > Thankfully, no. Hmm :(. > >

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread Richard Heathfield
n. The gap between nought and one is much greater than the gap between one and a thousand. > It's like > the difference between driving a car and designing one. You don't > need an engineering degree to drive a car. :-) Right. Nowadays, you need a degree in electronics ins

<    4   5   6   7   8   9   10   11   >