Re: How complex is complex?

2009-03-28 Thread james
practices, the teaching of software practices continues throughout the cs degree program. if the original poster wants to email me off-list both the question and its context, i'm willing to see if i have anything useful to contribute. -james Quoting Paul Rubin <"http://p

Re: Bullshit Generator

2009-03-29 Thread james
just make sure it stays out of the hands of IT managers. Quoting Dotan Cohen : Hello, For those of you that - want to surf on the edge of Web technology without understanding it, - desire to be considered as a software guru, - are forced to write technical documents that nobody will read. - wa

how to suspend program and save state data in python or IDLE?

2009-04-25 Thread james
ing a program in a student computer lab, i can write the state of the program and all intermediate data to -- say -- a usb drive, then read in the state data later so the program can pick up where it left off? thanks, james -- http://mail.python.org/mailman/listinfo/python-list

Best practice for operations on streams of text

2009-05-07 Thread James
ken out as StopIteration is raised before the whole token stream is consumed. Any suggestions on an elegant way to chain together a bunch of generators, with processing steps in between? Thanks, James -- http://mail.python.org/mailman/listinfo/python-list

Distributed locking

2009-05-13 Thread James
their CAS operation doesn't handle the case of a non-existent key.. Does anyone have suggestions on how I can do distributed locking to take advantage of the time limit on operations? Many thanks, James -- http://mail.python.org/mailman/listinfo/python-list

A quick question

2008-05-28 Thread James
Hey everyone, I just started using python and cant figure this out, I'm trying to make a program where someone types in a word and the program gives it back backwards. For example if the person puts in "cat" I want the program to give it back as "tac" and what it does is prints out 3,2,1. Ho

Cyclic imports

2008-06-26 Thread James
n I have this module hierarchy in some other way? Thanks, James Stack trace from example: File "main.py", line 1, in from a import a File "/Users/james/tmp/python/a/a.py", line 1, in from b import b File "/Users/james/tmp/python/b/b.py", line 1, in

Re: Cyclic imports

2008-06-26 Thread James
is now defined, but b.b_mod isn't: File "main.py", line 1, in from a import a_mod File "/Users/james/tmp/python/a/a_mod.py", line 3, in class A(): File "/Users/james/tmp/python/a/a_mod.py", line 4, in A print('b.b_mod:', b.b_mod) Attr

Re: Cyclic imports

2008-06-27 Thread James
cific imports, as Dan originally suggested. Re-factoring the use of partially loaded modules into functions wasn't an option for me, unfortunately, as the classes were being used as super classes or class variables. So, the code is a bit more verbose than before, but works! James -- http://ma

Module to read input from commandline

2008-04-13 Thread james
Parse that would be nice. Anyone know of a decent module that handles this type of thing? Writing from scratch would be simple but why re-invent the wheel. Cheers, James. -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read input from commandline

2008-04-13 Thread james
thing already in place. I'd rather use a module built for the purpose now that I have several scripts that will use the functionality. Thanks! James. FYI: This is what I have so far: from re import compile def yes_no(question, default=None): """Prompt the user with a

Request a short code review

2008-04-17 Thread james
h a key 'type' I am not necessarily looking to make the code shorter or more functional or anything in particular. However if you spot something to improve then I am happy to learn. Any and all comments appreciated. Cheers, James. -- http://mail.python.org/mailman/listinfo/python-list

Re: Request a short code review

2008-04-17 Thread james
d the output_lessons variable, assigned it to a default. This remove an else statement and reduced the call to self.output_random to a single instance in the return statement Cheers, James -- http://mail.python.org/mailman/listinfo/python-list

Re: Request a short code review

2008-04-18 Thread james
me to easily switch my data providers between SQLAlchemy and YAML. Cheers again. This is very valuable for me. I am a true believer that if one takes care in the smallest of methods then the larger code- base will be all the better. James. -- http://mail.python.org/mailman/listinfo/python-list

Installed python 2.5 over 2.4 and lost installed packages

2008-04-27 Thread james
sable? Any help on best practices appreciated. James. -- http://mail.python.org/mailman/listinfo/python-list

Re: Installed python 2.5 over 2.4 and lost installed packages

2008-04-28 Thread james
s. Perhaps once my server (Ubuntu) moves to 2.6 I'll update my Mac at the same time. >From now on I am storing my install packages somewhere accessible instead of deleting them once I'm done with them. I wish I could generate a manifest of installed packages to make upgrading easier. Cheers, James. -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read input from commandline

2008-05-06 Thread james
se someone finds this through a search. cheers, James -- http://mail.python.org/mailman/listinfo/python-list

Re: Module to read input from commandline

2008-05-06 Thread james
is invoked? What I was looking for was a commandline read loop that executes within a script that is already running ... or can optparse be used in this context as well? Thanks, James. -- http://mail.python.org/mailman/listinfo/python-list

PEP proposal optparse

2008-09-18 Thread James
('-q', '--quiet', action="store_false", dest='verbose') parser.add_option('-o', '--output' , type='string', dest='castordir' , metavar='' ) parser.add_option('-r', '--prevrel' , type='string', dest='previousrel' , metavar='' ) Help descriptions can often be quite long and separating them in this fashion would, IMHO, be desirable. Kind Regards, James Nicolson -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread James
ypes would probably be surprising... James On 7 Apr 2006 12:45:48 -0700, Clodoaldo Pinto <[EMAIL PROTECTED]> wrote: > I'm starting a programming tutorial for absolute beginners using Python > and I would like your opinions. > > http://programming-crash-course.com > >

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread James
Perhaps use the phrase "whole number" there and mention that in programming they're called integers. Having a glossary with definitions for things like integer, float etc etc. would be good if when you talked about integers it linked to the glossary. And similarly use "decimals" for floats? Less su

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread James
u can use straight away? James On 8 Apr 2006 11:53:34 -0700, Clodoaldo Pinto <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > > Clodoaldo Pinto wrote: > > > > > "Python is a remarkably powerful dynamic programming language that is > > > used in a wid

MAKE UPTO $5000 MONTHLY! $2000 INYOUR FIRST 30 DAYS!

2010-06-18 Thread james
MAKE UP TO $5000 PER MONTH $2000 IN FIRST 30 DAYS Generate $50 to $100 whenever you have a couple of hours free time tospare. You could make $50 or more in the next 2 hours. Starting right Now! Today! Awesome earnings get paid for your honest work Join as a free member and get paid to your bank ac

Re: I strongly dislike Python 3

2010-06-26 Thread james
thanks for the info, christian! Quoting Christian Heimes : Am 26.06.2010 17:59, schrieb Stefan Reich: The main problem is that Python 3 is incompatible with almost all scripts written for Python 2 (if they use print). And it gets worse: Python 3 scripts are incompatible with Python 2! (If they

Re: Good books in computer science?

2009-06-15 Thread james
this mit course in the open courseware catalog is focused specifically on python: http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2007/Syllabus/index.htm Quoting Terry Reedy : Phil Runciman wrote: Gain access to one of the IEEE or ACM web sites and their reso

Open Position: Software/System Engineer....Python....

2009-09-09 Thread James
submit resumes to employm...@globalww.com. If this is not the place for this type of posting, if someone could suggest an area, I would appreciate the guidance. Thanks James -- http://mail.python.org/mailman/listinfo/python-list

Re: Open Position: Software/System Engineer....Python....

2009-09-09 Thread James
On Sep 9, 10:06 am, "Diez B. Roggisch" wrote: > Diez B. Roggisch wrote: > > James wrote: > > >> Hello All > >> I do not know if this is the correct forum.  I am looking for a > >> Software/System Engineer with Python experience in the Clevel

Continuous Deployment Style Build System for Python

2013-05-17 Thread James Carpenter
/defend_against_fruit/ License: Apache Public License v2 Authors: James Carpenter jcarpenter621 at yahoo.com LinkedIn: http://www.linkedin.com/in/jamescarpenter1 Matthew Tardiff mattrix at gmail.com LinkedIn: http://www.linkedin.com/in/matthewtardiff -- http://mail.python.org/mailman/listinfo

Re: Editor Ergonomics [was: Important features for editors]

2013-07-08 Thread Rhodri James
while emacs is bad on the second, its excellent on the third -- to the extend that you 'live inside emacs,' you dont need the mouse. You clearly never trained as a classical pianist :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread Rhodri James
something obvious? Are you using Python 2.x or 3.x? That print statement is valid 2.x, but "print" is a function in Python 3, so the parameter need parentheses around them. This would all involve a lot less guesswork if you cut and pasted both your code and the error traceback. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-29 Thread Rhodri James
having to keep flipping between them slows me down dramatically. Long lines have no effect on the speed of the program, but they can have serious effects on the speed of the programmer. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-29 Thread Rhodri James
On Tue, 30 Jul 2013 01:11:18 +0100, Joshua Landau wrote: On 30 July 2013 00:08, Rhodri James wrote: I'm working on some shonky C code at the moment that inconsistent indentation and very long lines. It is extremely annoying not to be able to put the original code, my "transl

Re: [Tutor] Pymongo Error

2012-06-19 Thread James Reynolds
On Tue, Jun 19, 2012 at 1:22 AM, Ranjith Kumar wrote: > Hi all, > I tried Django with Mongodb while running manage.py syncdb I endup with > this error > > note : it works fine with sqlite and mysql db > > (django-1.3)ranjith@ranjith:~/ > sandbox/python-box/hukkster-core-site/hukk$ ./manage.py sync

Re: 2 + 2 = 5

2012-07-05 Thread Rhodri James
five.contents[five.contents[:].index(5)] = 4 print(2 + 2 == 5) # True (must be sufficiently large values of 2 there...) Heh. The author is apparently anonymous, I guess for good reason. Someone's been writing FORTRAN again :-) -- Rhodri James *-* Wildebeest Herder to the Masses --

PYODBC Print Cursor Output Question

2012-09-10 Thread james simpson
I think there's a simple answer but displaying my ignorance here. I'm using Python 2.7.3 IDLW with pydoc 3x I think I've connected to my SQL Server 2005 and my SQL is good. How do I display the actual data returned from my fetch? Been searching for several hours but no joy... Thanks. Jamie ===

Re: Parsing ISO date/time strings - where did the parser go?

2012-09-10 Thread Rhodri James
A short standard, then :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

cant install livewires

2012-09-23 Thread james . kennedy
i cant install livewires and their help about making a directory is useless to me as i dont know how btw im using windows 7 REALLY DESPERATE :) -- Disclaimer -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups

2012-11-01 Thread Rhodri James
I have here a language that does exactly what I want without all that messy syntax nonsense. I call it "Research Assistant." -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: loops

2012-12-02 Thread Rhodri James
t;, "copyright", "credits" or "license" for more information. print(1,2,3) 1 2 3 Python 2.7.1+ (r271:86832, Sep 27 2012, 21:12:17) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more inf

Re: Working with classes

2012-12-03 Thread Rhodri James
t make any sense at all I'm just starting to learn this. The program makes perfectly good sense, it is your description that I don't understand. Please tell us what it is supposed to do, and what makes you think it doesn't do it. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-23 Thread Rhodri James
your code and leave us to guess? Sorry but I'm not bored enough to try. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart (Terminolgy): "Class"

2013-01-14 Thread Rhodri James
computer science. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Help about dictionary append

2012-02-05 Thread James Broadhead
On 5 February 2012 15:13, Anatoli Hristov wrote: > Hi there, > > I`m again confused and its the dictionary. As dictionary does not support > append I create a variable list with dictionary key values and want to add > new values to it and then copy it again to the dictionary as I dont know > other

Re: list comprehension question

2012-02-29 Thread James Broadhead
On 29 February 2012 13:52, Johann Spies wrote: > In [82]: t.append(instansie) > t.append(instansie) > > In [83]: t > t > Out[83]: ['Mangosuthu Technikon'] > In [84]: t = [x.alt_name for x in lys].append(instansie) > t = [x.alt_name for x in lys].append(instansie) > > In [85]: t > t > > In [86]: t

Re: Raise X or Raise X()?

2012-03-12 Thread James Elford
self.tag = number ...self.is_match = False >>>def __str__(self): ...return str(self.tag) >>> # Construct a list of items >>> l = [[Item(range(i)) for i in range(10)], ... [Item(range(i, 2*i)) for i in range(10,20)]] >>> l[0][9].list_field[3].is_match = True >>> for i in find(l): ... print(i) 3 James -- http://mail.python.org/mailman/listinfo/python-list

Re: concatenate function

2012-03-13 Thread James Elford
you want. l = [0, 3, 5, 2] l.append(10)# [0, 3, 5, 2, 10] l.sort()# [0, 2, 3, 5, 10] l.append(3) # [0, 2, 3, 5, 10, 3] James > > > > -- > View this message in context: > http://python.6.n6.nabble.com/concatenate-function-tp4574176p4

Re: concatenate function

2012-03-13 Thread James Elford
On 13/03/12 16:02, ferreirafm wrote: > Hi James, thank you for your replay. Indeed, the problem is qsub. And as > warned by Robert, I don't have functions properly, but just scripts. > > > -- > View this message in context: > http://python.6.n6.nabble.com/concatenate-

Need Help Using list items as output table names in MsACCESS

2012-03-28 Thread Cathy James
Dear Python folks, I need your help on using list items as output table names in MsACCESS-new to Python- simple would be better: import arcpy, os outSpace = "c:\\data\\Info_Database.mdb\\" arcpy.overwriteOutput = True SQL = "Database Connections\\SDE_ReadOnly.sde\\" inFcList = [(SDE + "sde.GIS.Pa

Re: pyjamas / pyjs

2012-05-04 Thread james hedley
rs who make a living out of this stuff and the actions of the new de-facto leader has jeopardised this, pretty needlessly in our opinion. James -- http://mail.python.org/mailman/listinfo/python-list

Re: pyjamas / pyjs

2012-05-04 Thread james hedley
By the way, there's a lot more to say on this, which I'll cover another time. There are arguments for and against what's happened; at this stage I'm just trying to flag up that there is *not* unanimity and we are not just carrying on as normal. -- http://mail.python.org/mailman/listinfo/python-

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread james hedley
Agreed with pretty much all of that. It's third-world politics, lurching from one dictator to another. Risinger seems to have banned all discussion of the subject from the list too, I'm not posting anymore because I don't want to give him an excuse to wield his newly found banhammer. But yeah,

Re: How do I run a python program from an internet address?

2012-05-08 Thread james hedley
> What would be the best way to figure out how to do this? I looked at > Google app engine tutorial, but can't figure out how that will help we > get the code into the cloud so I can access it from any browser. GAE is quite a good option, since it includes free hosting. You should be able to ge

Re: which book?

2012-05-09 Thread james hedley
catches the spirit of Python programming; clean, readable, and idiomatic. Plus it's fairly concise itself and emphasises the standard libraries. If you get stuck, obviously just search, but there is a lot of good info on Stack Overflow particularly. James -- http://mail.python.org/mailman/listinfo/python-list

Uploaded package not pip installable

2012-05-10 Thread James Pic
Hello everybody, I uploaded a couple of packages: - http://pypi.python.org/pypi/django-cities-light/1.0 - http://pypi.python.org/pypi/django-autocomplete-light/0.1 But they are not pip installable: <<< 10:12.00 Thu May 10 2012!~ <<< jpic@germaine!10012 E:1 env >>> pip install django-autocomple

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-14 Thread james hedley
ions of legitimacy and leadership. In my ideal outcome, we could tailor pyjamas more to business use; e.g. tidying up any license issues, offering a commercial support contract (this will help mitigate the damage done to perceptions of credibility), publishing a commercial use policy (one of the foundations could offer support with this I hope). James -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting DB schema (newbie Q)

2012-05-14 Thread james hedley
On Monday, 14 May 2012 17:01:49 UTC+1, Steve Sawyer wrote: > Brand-new to Python (that's a warning, folks) > > Trying to write a routine to import a CSV file into a SQL Server > table. To ensure that I convert the data from the CSV appropriately, > I"m executing a query that gives me the schema (

Re: Need to get Tags and Values from Dom

2012-05-14 Thread james hedley
On Monday, 14 May 2012 01:50:23 UTC+1, TommyVee wrote: > I have a very simple XML document that I need to "walk", and I'm using > xml.dom.minidom. No attributes, just lots of nested tags and associated > values. All I'm looking to do is iterate through each of the highest > sibling nodes, che

Re: fputs

2012-06-05 Thread Rhodri James
files ...and stop trying to think in terms of PHP. While you can write PHP in any language (I know people who still write FORTRAN, whatever language they might be using), you'll find that getting into the right mindset for whatever language you are using works a lot better. -- Rhodri James *-*

RunPy (was py2bat (was: How do I make a Python .bat executable file?))

2012-06-08 Thread James Lu
no way just use py2exe 1.download it and python 2.make a setup file with this replacing ? with python file name: from setuptools import setup setup(app=['Tic-Tac-Toe easy.py']) james a intermediate child programmer -- http://mail.python.org/mailman/listinfo/python-list

Newby Python help needed with functions

2011-06-03 Thread Cathy James
I need a jolt here with my python excercise, please somebody!! How can I make my functions work correctly? I tried below but I get the following error: if f_dict[capitalize]: KeyError: Code below: def capitalize (s): """capitalize accepts a string parameter and applies the capitalize() m

Re: Programmer font

2011-06-05 Thread James Mills
On my desktop at home which runs CRUX (http://crux.nu) I use the Terminius (1) fonts which I installed myself. I find this font especially nice for both Terminals and Editing code. cheers James 1. http://terminus-font.sourceforge.net/ -- -- James Mills -- -- "Problems are solv

Re: announcing: dmangame: an ai game. maybe.

2011-06-05 Thread James Mills
is really cool. I haven't looked at the source code yet... There was another game very similar to this - much more basic though and when I saw it back then I wanted to do something similar! Nice job! cheers James -- -- James Mills -- -- "Problems are solved by method" -- http:/

Of Functions, Objects, and Methods-I NEED HELP PLEASE

2011-06-08 Thread Cathy James
I am almost there, but I need a little help: I would like to a) print my dogs in the format index. name: breed as follows: 0. Mimi:Poodle 1.Sunny: Beagle 2. Bunny: German Shepard I am getting (0, ('Mimi', 'Poodle')) . Mimi : Poodle instead-what have I done wrong? b) I would like to append to

NEED HELP-process words in a text file

2011-06-18 Thread Cathy James
Dear Python Experts, First, I'd like to convey my appreciation to you all for your support and contributions. I am a Python newborn and need help with my function. I commented on my program as to what it should do, but nothing is printing. I know I am off, but not sure where. Please help:( impor

print header for output

2011-06-18 Thread Cathy James
er. (Terry Reedy) >   4. Re: debugging https connections with urllib2? (Roy Smith) >   5. Re: Improper creating of logger instances or a Memory Leak? >      (Chris Torek) >   6. Re: Strategy to Verify Python Program is POST'ing to a web >      server. (Chris Angelico) >   7. NEED

search through this list's email archives

2011-06-23 Thread Cathy James
Dear All, I looked through this forum's archives, but I can't find a way to search for a topic through the archive. Am I missing something? Thanks as always. CJ. -- http://mail.python.org/mailman/listinfo/python-list

Re: doing cross platform file work

2011-06-23 Thread Rhodri James
On Thu, 23 Jun 2011 08:13:18 +0100, Gurpreet Singh wrote: ...Cygwin spam. Twice. Please don't mail to both comp.lang.python and python-list. They are gatewayed to each other, so we see your messages twice, which makes us roughly half as likely to respond to them. -- Rhodri

Struggling with sorted dict of word lengths and count

2011-06-27 Thread Cathy James
Dear Python Programmers, I am a Python newby and I need help with my code: I have done parts of it but I can't get what I need: I need to manipulate text to come up with word lengths and their frequency:ie how many 1-letter words in a text how many 2-letter words in a text, etc I believe I am on

Please Help with vertical histogram

2011-07-11 Thread Cathy James
Please kindly help- i have a project where I need to plot dict results as a histogram. I just can't get the y- axis to print right. May someone please help? I have pulled my hair for the past two weeks, I am a few steps ahead, but stuck for now. def histo(his_dict = {1:16, 2:267, 3:267, 4:169,

Re: test systems

2011-08-01 Thread James Matthews
Wow, why don't you find some cloud providers and write bootstrap programs. James On Mon, Aug 1, 2011 at 6:35 PM, Dan Stromberg wrote: > > I've been testing my Python code on these using virtualbox and/or physical > machines (but mostly virtualbox): > > CentOS 6.

Re: Community Involvement

2011-08-04 Thread Rhodri James
an be pretty hit-and-miss. The other thing that may affect this is that anything posted to SE is subject to the Creative Commons license. This may be an issue for academic purposes, I don't know. (It's certainly an issue when you come across J*ff!) -- Rhodri James *-* Wildebees

Re: List spam

2011-08-18 Thread Rhodri James
27;s some, sure -- usually for Bollywood actress pictures -- but not enough to make me worry about Opera's relatively poor newsgroup filtering facilities. If you're getting as much as you say, it's being injected on the mail side of the gateway somehow. -- Rhodri Jame

Re: Word Perfect integration

2011-08-18 Thread Rhodri James
lumns, etc) has so far been unequaled in anything else I have looked at. I take it you haven't looked at TeX, then? :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: attach to process by pid?

2011-03-08 Thread James Mills
'm missing something here I don't see how you could achieve communication with another process unless that process has some kind of communication(s) interface; eg: * some kind of listening socket * some kind of I/O (pipe, stdin/stdout) cheers James -- -- James Mills -- -- "Prob

Re: Defining class attributes + inheritance

2011-03-08 Thread James Mills
. def __init__(self, x, y): ... super().__init__(x) ... print("Hello %s" % y) ... >>> x = ExtendedBase("foo", "bar") Hello foo Hello bar >>> cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Defining class attributes + inheritance

2011-03-08 Thread Rhodri James
Class, self).__init__(new_thing) I get the error TypeError: __init__() takes exactly 1 argument (6 given) Please give us either the rest of the code or the rest of the traceback, or preferably both. Without one or the other we have little hope of guessing what you've typed. -- Rh

Re: Defining class attributes + inheritance

2011-03-08 Thread Rhodri James
__ you will have to provide them somehow. In this case, I think what you meant was something like this: class NewClass(BaseClass): def __init__(self, a, b, c, d, new): super(NewClass, self).__init__(a, b, c, d) self.new = new # etc -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: attach to process by pid?

2011-03-10 Thread James Mills
x27;s stdin (file descriptor of 0) Probably not a portable solution. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: attach to process by pid?

2011-03-10 Thread James Mills
On Fri, Mar 11, 2011 at 9:30 AM, Grant Edwards wrote: > No it doesn't.  Try writing something other than "foobar". You've demonstrated a case where this doesn't work :) cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing.Process Daemonic Behavior

2011-03-15 Thread James Mills
t process with the KILL signal then any child procesases that were created become zombies. You also can't handle the KILL signal in your application (nor can the multiprocessing library) and so it therefore cannot cleanup and terminate any child processes in the normal way. cheers James --

Re: class error

2011-03-19 Thread Rhodri James
p://bugs.python.org/issue11604 It has to be said that the confusion is exacerbated by ignoring PEP-8 and using the same (CamelCase) name for the module and the class. That does provide a rich source of errors in cases like this. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://ma

Re: Regex in if statement.

2011-03-20 Thread Rhodri James
t of applying regexes to everything regardless of how appropriate they are. I certainly did! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Python problem

2011-03-28 Thread Rhodri James
t the list *as a whole* on commas. That doesn't work. You split strings, not lists. By the looks of it that line is something left over from a previous attempt. Just delete it, it's not doing anything useful for you. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: cx_Freeze 4.2.3

2011-03-31 Thread James Mills
ecognized cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
ython ideology. > be expanded to > >    _temp = expr >    if _temp: return _temp This could be simplified to just: return expr or None And more to the point... If your calee is relying on the result of this function, just returning the evaluation of "expr" is enoug

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
ot;didn't find an answer") >  raise ValueError                     raise ValueError > > Are you saying the two snippets above are equivalent? def foo(n): x = n < 5 if x: return x is functionally equivalent to: def foo(n): return n < 5 -- -

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
On Tue, Apr 12, 2011 at 12:18 PM, Jason Swails wrote: > This is only true if n < 5.  Otherwise, the first returns None and the > second returns False. Which is why I said: return expr or None But hey let's argue the point to death! cheers James -- -- James Mills -- -- "

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
deology. > be expanded to > >_temp = expr >if _temp: return _temp This could be simplified to just: return expr or None """ Please read carefully before putting words in my mouth. I stated very clear y that return? expr didn't seem fitting in the python

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
making assumptions about what the OP intended. Perhaps OPs should be more clear ? :) kid! cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
state this at all. There was never any mention of early termination of the function iif expr was True. Sorry :/ I'm not picking on your comprehension skills here but you didn't read what the OP wrote (which he/she may not have been clear about in the first place( nor what I said in

Re: Feature suggestion -- return if true

2011-04-11 Thread James Mills
On Tue, Apr 12, 2011 at 4:08 PM, Nobody wrote: > It should be abundantly clear that this only returns if the expression is > considered true, otherwise it continues on to the following statements. Uggh come on guys. We've been over this. You cannot make that assumption. c

Re: Feature suggestion -- return if true

2011-04-12 Thread James Mills
the same today! Regardless of anyone's subjective opinions as to what was clear - I still stand by what I said. Nice comments btw Chris :) cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-12 Thread James Mills
preciate your comments. Thank you! Yes I do understand there is probably more code that follows the return? - but I made an assumption and I'm not going back on it :) Thanks for making the two sides obviously clear! cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: [Bug / Feature Request] IDLE Shell

2011-04-12 Thread James Mills
get the latest IDLE source code, patch it, test it, see how you like it and if you feel it useful, share the patch and/or file a bug with the patch. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-12 Thread James Mills
nt) but hey it's all in good fun until someone looses an eyeball! cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested inner classes and inheritance -> namespace problem

2011-04-13 Thread James Mills
tter to make use of modules here as opposed to nesting classes. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
2) Formalize a new design for xyz 3) File a bug report for xyz Complaining doesn't really get you very far, nor does berating others (even if indirectly). Whilst I agree that there are some folk who "might" be guilty of egotist / arrogant attitudes there isn't much anyone can do abou that - that's just part of life and part of social interaction(s). Get over it. For the most part - the Python Community as a whole is very helpful, positive and has a lot of nice thinigs about it (not just the language). cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

automated pep8 reformatter ?

2011-04-13 Thread James Mills
Does anyone know of a tool that will help with reformatting badly written code to be pep8 compliant ? a 2to3 for pep8 ? cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: automated pep8 reformatter ?

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 11:47 AM, James Mills wrote: > Does anyone know of a tool that will help with > reformatting badly written code to be pep8 compliant ? > > a 2to3 for pep8 ? In case there is no such tool (And I don't have the time to write one) I've found this to be

Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
On Thu, Apr 14, 2011 at 11:47 AM, Ethan Furman wrote: > *Please* don't re-post his crap. Opps sorry :) I have never really known what to do with big-huge-long posts ? :) Won't happen again! cheers James -- -- James Mills -- -- "Problems are solved by method" --

<    1   2   3   4   5   6   7   8   9   10   >