Re: [Tutor] Changing the interpreter prompt symbol from ">>>" to ???

2016-03-12 Thread David Rock
SCII > terminals? ~(:>) I'm using mutt in a screen session on raspbian. Looks fine to me. I have put a lot of effort into "properly" displaying "weird" things, though. -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Concerning relative import paths

2016-03-14 Thread David Aldrich
I hope this isn't too tool specific, I'm just wondering whether there's a more pythonic way of implementing this import code? Best regards David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Rate transition from 60hz to 1000hz

2016-05-10 Thread David Wolfe
as fast as i can. Thanks, David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Study Tips

2016-05-30 Thread David Rock
oes something for you, it will be more satisfying and more likely to stick in your brain. -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help

2016-06-28 Thread David Palao
2016-06-28 7:54 GMT+02:00 Aaron Johnson : > I have a program that is telling my i need your digital snake, but i dont > want a snake. Help > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.o

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread David Rock
herry-pick packages from testing; that’s a little advanced (but something to keep in mind). — David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread David Rock
t be. The easiest thing to do is google for your distro name and the brand of device and see if there are any issues. If you follow my earlier advice on trying a liveCD of your chosen distro first, that will give you a really good idea if your hardware will work. — Davi

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread David Rock
is more important), try out Mint. You may or may not like it, but you won’t know until you try. I still say a dry run in a VM to get a feel for it would do wonders for you regardless. — David Rock da...@graniteweb.com ___ Tutor maillist - Tuto

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-29 Thread David Rock
ard do you have? Most Corsairs have a “BIOS switch” for exactly this issue. — David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-29 Thread David Rock
> On Jun 29, 2016, at 12:32, boB Stepp wrote: > > On Wed, Jun 29, 2016 at 12:02 PM, David Rock wrote: >> >>> On Jun 29, 2016, at 11:20, boB Stepp wrote: >>> >>> My Christmas present of a Corsair mechanical gaming keyboard was not >>> _seen

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-29 Thread David Rock
say yes. It adds a layer of flexibility with you disk layout that you will be sad you don’t have later. > Thanks for all of the help even though this has been off-topic for this list! > > Meanwhile, more playing around with Mint!! have fun! — David Rock da...@graniteweb.com

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-29 Thread David Rock
-many packages depending on the complexity. All you need to worry about is the thing you want, and let the system do the rest. :-) — David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o

Re: [Tutor] Regex/Raw String confusion

2016-08-03 Thread David Rock
al sequences in the documentation). For example, \s means any whitespace character, \w means any alphanumeric or underscore, \d means any digit, etc. You can look them up in the docs: https://docs.python.org/2/library/re.html — David Rock da...@graniteweb.com ___

Re: [Tutor] Downloading Slack Files

2016-08-16 Thread David Rock
r stops is because this test is never true: >if len(response.json()["files"]) == 0: >break Since you are downloading and not removing anything, there’s always going to be files so you will never break out of the while loop. I think you need to get the lis

Re: [Tutor] syntax error help

2016-08-26 Thread David Rock
e thing, please)? Where does it say the syntax error is? — David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Basic telnet question

2016-09-24 Thread David Rock
; it’s still trying to read everything until it times out. either add a short timeout value to your telnetlib.Telnet(), or try a different read method; for example, read_very_eager you could also try using telnetlib.set_debuglevel() to try and get more details about what’s actually

Re: [Tutor] Basic telnet question

2016-09-24 Thread David Rock
> On Sep 24, 2016, at 15:49, Phil wrote: > > On 25/09/16 01:01, David Rock wrote: >> >> when you say "the client is not responding, certainly not as expected”, >> what, exactly, is the output you get? >> > > In my dazed state I think I responde

Re: [Tutor] Basic telnet question solved

2016-09-25 Thread David Rock
> On Sep 24, 2016, at 18:59, Phil wrote: > > On 25/09/16 07:17, David Rock wrote: >> header = tn.read_until("character is '^]’.”, timeout=5) >> print(header) > > Thank you David, read_until() led me to a result. It seems that the telnetlib > doesn'

[Tutor] Python dependencies in Anaconda

2016-10-11 Thread David Wolfe
ing is, are the dependencies that are included in Anaconda just contained in Anaconda, and not actually accessible in Python, unless you go through the Anaconda prompt to get to Python? Thanks, David ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] formatting xml (again)

2016-12-27 Thread David Rock
in f1: if between [x02] and [x03]: output =+ line.strip() else: f2.write(output) output = "" Basically, you need to loop over everything between your markers and put them in a single entry, then send that one entry all

Re: [Tutor] formatting xml (again)

2016-12-27 Thread David Rock
stx and etx (comment lines, other data that you don't want), then it gets a lot harder. If you don't have at least a marginally consistent input, your only real option is probably going to be scanning by character and looking for the \x02 and \x03 to get a glob of data, then parse that glob

Re: [Tutor] formatting xml (again)

2016-12-27 Thread David Rock
ter). That would artificially create "record" data that you could manipulate and combine partial segments into complete xml records to parse. Might be faster, might not, probably would get complicated pretty quickly but could be an option. Without seeing actual data, it's tough to spec

Re: [Tutor] formatting xml (again)

2016-12-27 Thread David Rock
ml doesn't care about layout and whitespace etc. > > Which xml parser are you using - I assume you are not trying > to parse it manually using regex or string methjods - that's > rarely a good idea for xml. Yeah, since everything appears to be .., the "event" flags of [\

Re: [Tutor] (no subject)

2017-02-07 Thread David Rock
while loop is testing for r, p, and s to all be equal to each other and set, which is not what you want to test. Basically, your while loop is immediately false as soon as you run your script. You need to rework your logic to test the player’s value. — David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Q about .join() Thanks!

2017-02-13 Thread David Rock
e a specific order by design so will always be in the order they were created. What are you trying to do with join() on a dictionary in the first place? Is there a specific outcome you are trying to get? It’s unlikely that using join on a dictionary is what you actually want. — David Rock da...@g

Re: [Tutor] printing items form list

2017-03-03 Thread David Rock
e he wasn't looking, and > sneaked in some commas and spaces ;) > > That's cheating... yeah, just a little. :-) You can use join for this: suitcase = ["book", "towel", "shirt", "pants"] output = ', '.join(suitcase) print ("You

Re: [Tutor] printing items form list

2017-03-03 Thread David Rock
yours: You have a book, towel, shirt, pants, in your luggage. String concatenation with a loop is notorious for adding extra stuff at the end. To get it right, you have to take into account what to do at the end of the list, which adds code complexity. — David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] data analysis with python

2012-11-13 Thread David Martins
Hi All I'm trying to use python for analysing data from building energy simulations and was wondering whether there is way to do this without using anything sql like. The simulations are typically run for a full year, every hour, i.e. there are 8760 rows and about 100+ variables such as exter

Re: [Tutor] data analysis with python

2012-11-14 Thread David Martins
Thanks Andre and Ryan At first glance Pytables looks certainly a lot better than sql... I also found vitables which seems to be a nice GUI interface and will play around with both tomorrow. I remember having looked at R a while ago but did never pick it up. I found a nice tutorial and will giv

Re: [Tutor] data analysis with python

2012-11-14 Thread David Martins
data analysis with python > From: oscar.j.benja...@gmail.com > To: awesome.me...@outlook.com > CC: tutor@python.org > > On 14 November 2012 03:17, David Martins wrote: > > Hi All > > > > I'm trying to use python for analysing data from building energy simula

Re: [Tutor] how to control putty window

2012-12-20 Thread David Rock
th a couple auto-commands on connect, but that's not the same thing. If it's a long string of commands, you might be better to pscp a shell script to the target with one command, and then call that script with the putty profile. I would research automating putty first, then see if there

Re: [Tutor] Binary/Decimal convertor

2013-01-11 Thread David Rock
d to do is figure out how to use a loop (eg, while loop, for loop). I would recommend thinking about some pseudocode to determine your program's flow and then try to build something to accomplish that. -- David Rock da...@graniteweb.com ___ Tutor m

Re: [Tutor] First Python Test

2013-02-02 Thread David Rock
al prompt. Verified on 10.6.8 -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] First Python Test

2013-02-04 Thread David Rock
oogling for "cocoa emacs" returns: http://emacsformacosx.com/ Perhaps that will work for you. I've tested that it works on my system, at least ("works" = it ran). -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] increment a counter inside generator

2013-03-13 Thread David Knupp
On Wed, 13 Mar 2013, Oscar Benjamin wrote: (it's not actually a generator by the way) As Oscar points out, you're not working with a generator expression. The syntactical difference between a list comprehension and a generator expression is subtle. List comprehensions use square brackets, but

[Tutor] Text Processing - Questions/Help.

2013-03-14 Thread David Bradshaw
I have written some code that logs into a list of hosts and runs a couple of commands to find out some information. Which I then save to a file and process. A cut down version of the information I generate and save can be found here - http://pastebin.com/4ePz3Z7m The code I have written to proc

Re: [Tutor] increment a counter inside generator

2013-03-14 Thread David Knupp
On Thu, 14 Mar 2013, Steven D'Aprano wrote: If you have some unknown, arbitrary iterable that doesn't support len(), then you can use the sum() trick: it = some_unknown_iterable() sum(1 for x in it) Yes, of course you are correct. This was my intention, but I chose an especially poorly contri

Re: [Tutor] Text Processing - Questions/Help.

2013-03-18 Thread David Bradshaw
Alan, Thanks. See below [Dave] From: Alan Gauld To: tutor@python.org Sent: Thursday, 14 March 2013, 12:14 Subject: Re: [Tutor] Text Processing - Questions/Help. On 14/03/13 10:30, David Bradshaw wrote: > I have written some code that logs into a list

Re: [Tutor] Text Processing - Questions/Help.

2013-03-18 Thread David Bradshaw
Alan, Thanks. See below [Dave] From: Alan Gauld To: tutor@python.org Sent: Thursday, 14 March 2013, 12:14 Subject: Re: [Tutor] Text Processing - Questions/Help. On 14/03/13 10:30, David Bradshaw wrote: > I have written some code that logs into a list

Re: [Tutor] Dictionaries and multiple keys/values

2013-03-26 Thread David Rock
x27;) >>> data ['French'] Then just put the list as the value. d['characteristics'] = data >>> data = 'Canadian, Pub Food'.split(',') >>> d['characteristics'] = data >>> d['characteristics'] ['Canadian', ' Pub Food'] -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python help!!

2013-04-02 Thread David Mitchell
co-op student so I could really use the help. Any help would be greatly appreciated!! Thanks, David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] FYI: An Introduction to Interactive Programming in Python

2013-04-14 Thread David Kemeza
I'd really be interested in see that code since. I'm learning python right now and looking at code helps with my learning process. Thanx -dave On Tue, Apr 9, 2013 at 11:32 AM, brian arb wrote: > One game wrote along time ago when I was first learning Python and App > Engine is http://cdacabe

[Tutor] Text Editors and Linux (was Re: exit message)

2013-05-06 Thread David Robinow
On Mon, May 6, 2013 at 5:05 AM, Steven D'Aprano wrote: > (Actually, I am a great believer in not using IDLE for anything. If your > application acts weird, is that because it has a bug, or because IDLE is > doing something "clever"? I much prefer a text editor and a terminal > window. But then I'

Re: [Tutor] Text Editors and Linux (was Re: exit message)

2013-05-06 Thread David Robinow
On Mon, May 6, 2013 at 1:00 PM, Alan Gauld wrote: > On 06/05/13 16:13, David Robinow wrote: > > I certainly agree about IDLE and prefer a text editor myself. I don't >> use Linux much and haven't noticed the "practically an IDE" part. Could >> you expoun

Re: [Tutor] Text Editors and Linux (was Re: exit message)

2013-05-08 Thread David Rock
So it's really more about personal taste than anything. If you _like_ what you are using, that's fine. I wouldn't like that setup. All options are valid options. Try them all and find what you like. -- David Rock da...@graniteweb.com _

Re: [Tutor] Text Editors and Linux (was Re: exit message)

2013-05-08 Thread David Rock
* Steven D'Aprano [2013-05-09 10:29]: > On 09/05/13 02:57, David Rock wrote: > > > > Well, not to start a flame war, but that is all subjective. > > Did I say otherwise? I was very careful to say "more natural FOR ME, > faster FOR ME". Not at all, but it w

Re: [Tutor] Text Editors and Linux (was Re: exit message)

2013-05-09 Thread David Rock
ich again, works well, but is not necessarily intuitive. > Or use emacs... :-) There's always one. You aren't helping the case for console apps with that one at all. :-) -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@p

Re: [Tutor] Text Editors and Linux (was Re: exit message)

2013-05-09 Thread David Rock
moment. Yes, the disconnect/reconnect is nice (I use it a lot). It's not exactly relevant to merits of console interfaces vs GUI, though. That's more of a "this is a cool baked-in capability for working with lousy network connections", which you can also do with things like V

Re: [Tutor] Text Editors and Linux (was Re: exit message)

2013-05-09 Thread David Rock
* Alan Gauld [2013-05-09 16:50]: > On 09/05/13 15:42, David Rock wrote: > > >> Or use emacs... :-) > > > > There's always one. You aren't helping the case for console apps with > > that one at all. :-) > > But then emacs can also be considered

Re: [Tutor] I think I found what I'm looking for.

2013-06-03 Thread David Robinow
On Mon, Jun 3, 2013 at 7:32 PM, Michael Sparks wrote: > speech.py is a Python module that provides a clean interface to Windows's > voice recognition and text-to-speech capabilities. But it requires Windows > XP or Vista, and Python 2.4 or 2.5. I use Windows 7. > ... > I think that I'm satisfied w

Re: [Tutor] How convert an int to a string

2013-06-22 Thread David Rock
thought str() would do it but it didn't. Reading about str() it talks of > string representation. So how can I convert it to a true string I can > slice and build my date look a like? Is there a requirement to store them as numbers in the first place? Why not just store them as a st

Re: [Tutor] A list of 100+ projects to complete to master Python.

2013-07-18 Thread David Hutto
ns. > > - Karan Goel > Goel.im <http://www.goel.im/> | > Resume<http://www.goel.im/Karan.Goel.Resume.pdf> > | Github <https://github.com/thekarangoel> > > ___ > Tutor maillist - Tutor@python.org > To unsu

Re: [Tutor] A list of 100+ projects to complete to master Python.

2013-07-23 Thread David Hutto
| > Resume<http://www.goel.im/Karan.Goel.Resume.pdf> > | Github <https://github.com/thekarangoel> > > > On Wed, Jul 17, 2013 at 5:09 AM, David Hutto wrote: > >> First thing you should learn is offsite backups, I've lost several >> projects in the works becaus

Re: [Tutor] suggestions for splitting file based on date

2013-07-23 Thread David Hutto
You could also begin a little stats(I think steven D'aprano did pystats), which would show rhythms within those particular frequency windows, using y as a basis for your model On Sat, Jul 20, 2013 at 1:10 AM, David Hutto wrote: > Why not use the actual month? With a simple x/y c

Re: [Tutor] suggestions for splitting file based on date

2013-07-23 Thread David Hutto
Why not use the actual month? With a simple x/y canvas in Tkinter you could plot by the months with polygon coordinates as your data visualization, or in 30 day /etc windows, just the price(y) being a derivative of x(the frequency of changes), and create simple line segments with polygon coordinat

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-23 Thread David Hutto
nt => class containing countries > >> country => class containing states > >> state => class containing data > >> > >> It then becomes easier to build helper methods to extract/manipulate > the data you are interested in. > >> > >> Alternatively, if you have a large

Re: [Tutor] inconsistent destruction

2013-08-08 Thread David Hutto
l cnt right after the for, but that seems > artificial. > > -- > Jim > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopm

Re: [Tutor] inconsistent destruction

2013-08-08 Thread David Hutto
variable that corresponds within the lst global variable which uses list methods. On Thu, Aug 8, 2013 at 12:15 AM, David Hutto wrote: > if the variable is the range in the first one, then just don't append it, > and replace it with something else. > > The second, you use cnt2, but it

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-26 Thread David Robinow
On Wed, Sep 25, 2013 at 9:34 PM, Dave Angel wrote: > Clearly gmail isn't showing you all the headers. I looked for Alan's > message in one of these threads with the same subject, and see about 60 > lines of header information. Does gmail have a View->Source menu item? > In gmail the menu item i

Re: [Tutor] Parse text with python

2013-10-17 Thread David Rock
: INUSE field may be empty, so you will grab the wrong value 1700 might be somewhere other than where you expect it etc -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mai

Re: [Tutor] formatting datetime.timedelta to "HH:MM:SS"

2013-12-11 Thread David Robinow
On Wed, Dec 11, 2013 at 5:55 AM, Jignesh Sutar wrote: > Hi, > > I've googled around extensively to try figure this out assuming it should be > straight forward (and it probably is) but I'm clearly missing something. > > I'm trying to get the total run time of the program but have the final time >

[Tutor] Quantum computing

2013-12-14 Thread David Hutto
l the instruction sets of these newer technologies effect us considerably? Just to kick off a topic. -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com <http://www.hitwebdevelopment.com>* ___ Tutor maillist - Tutor@python.org To uns

Re: [Tutor] Quantum computing

2013-12-15 Thread David Hutto
Well, it would fit the market penetration, of corporate-upper middle class-middle class- the lower socioeconomic level. It would also fit the market of individuals that have a population control that intertwines with the dissemination -- Best Regards, David Hutto *CEO:* *http

Re: [Tutor] how to edit program files in Python?

2013-12-19 Thread David Robinow
On Thu, Dec 19, 2013 at 2:33 PM, Laurie Stephan wrote: > Hello, > My son and I just opened "Python for Kids" and we're working our way through > the lessons. Sometimes he mistypes the lines and hits return and discovers > after that that he made a mistake in the line. But, when we try to correct

Re: [Tutor] The Charms of Gmail

2013-12-22 Thread David Abbott
___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > Then what I do is reply to all and remove the individual email address and move tutor@ to the To: and make sure to r

Re: [Tutor] Shelve & immutable objects

2014-01-02 Thread David Hutto
> Separately, I'm also curious about how to process big files. For example, I > was trying to play 100 million games of chutes & ladders Without doing the 100,000,000, you could try either researching the nums, or trying an algorithm that tried intervals, and narrowed down the best , and numerical

Re: [Tutor] reading files

2014-01-29 Thread David Palao
f in line.split()) >> >> -- >> My fellow Pythonistas, ask not what our language can do for you, ask >> what you can do for our language. >> >> Mark Lawrence >> > > Please don't top post. > > FTR what is David'

[Tutor] Fwd: reading files

2014-01-29 Thread David Palao
...that I forgot to send to the mailing list... -- Forwarded message -- From: David Palao Date: 2014-01-29 Subject: Re: [Tutor] reading files To: Gabriele Brambilla Hi, One possibility I can think of: If you make one string with one line of your input, like s

Re: [Tutor] Traversing lists or getting the element you want.

2014-02-02 Thread David Hutto
lin_estimate = y[istart] + ((y[iend] - y[istart]) * ((x[m] - x[istart]) / (x[iend] - x[istart]))) errorsq += (lin_estimate - y[m]) * (lin_estimate - y[m]) return errorsq > At the end the three values I want are mini, minj, mink; > or x[mini], x[minj], x[mink] > > > So how do I do this (or approa

Re: [Tutor] Traversing lists or getting the element you want.

2014-02-02 Thread David Hutto
On Sun, Feb 2, 2014 at 6:44 PM, David Hutto wrote: > > > > On Sun, Feb 2, 2014 at 3:46 PM, Kipton Moravec wrote: > >> I am new to Python, and I do not know how to traverse lists like I >> traverse arrays in C. This is my first program other than "Hello World&quo

Re: [Tutor] Traversing lists or getting the element you want.

2014-02-02 Thread David Hutto
) errorsq += (lin_estimate - y[m]) * (lin_estimate - y[m]) #print errorsq # insert print for quick in line debugging by uncommenting return errorsq #Call function minimize minimize(max_elements) Don't forget the tabs , or spaces, and the forced indentation. On Sun, Feb 2, 2014 at 6:44 PM,

Re: [Tutor] Changing only intergers in a list of strings

2014-02-05 Thread David Palao
Hi, Is it not clear to me if you must distinguish ints from other type of numbers, or if, for instances floats and ints must be dealt differently. Anyway, I would propose something like the following function: def FindNumbers(a_string): print "You entered:", a_string out_list = [] for

Re: [Tutor] Changing only intergers in a list of strings

2014-02-05 Thread David Palao
Sorry, there is a typo: "(num+a,)" should be "(num+1,)", obviously. 2014-02-05 David Palao : > Hi, > Is it not clear to me if you must distinguish ints from other type of > numbers, or if, for instances floats and ints must be dealt > differently. > Anyway,

Re: [Tutor] Which computer operating system is best for Python

2014-02-05 Thread David Abbott
the box. Make sure you won't hate it. Linux runs great on older Laptops that were the top of the line in their day, two nice examples with great keyboards are dell e6400 and ibm T61's. Linux is easy to install and set up now a days :) -- David Abbott __

Re: [Tutor] good django book?

2014-02-07 Thread David Palao
Hi, The Django community has plenty of good information in the web. I would go there and have a look. At least this is what I did, precisely for the same reason that you mention. Best, David 2014-02-06 Christopher Spears : > Can anyone recommend a good Django book? I have been looking on Ama

Re: [Tutor] second if

2014-02-10 Thread David Palao
Also, could you explain better what is your doubt? You don't understand what "index >= 1" means, or why this "if" at this point, or anything else? Best 2014-02-07 17:14 GMT+01:00 rahmad akbar : > he guys, i am trying to understand this code: i understand the first if > statement (if line.startswi

Re: [Tutor] second if

2014-02-10 Thread David Palao
I guess the replies by Alan and Peter precisely answer to your question? Best 2014-02-10 12:46 GMT+01:00 rahmad akbar : > David, > > thanks for your reply. i cant figure out why the if at that point and what > is the 'if' try to accompolish > > > On Mon, Feb 10

Re: [Tutor] Beginner - explaining 'Flip a coin' bug

2014-02-14 Thread David Hutto
flips* each time until the loop > becomes false. > > Can somebody explain the reason of the bug. > Cheers, > > Marc > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://m

Re: [Tutor] Beginner - explaining 'Flip a coin' bug

2014-02-14 Thread David Hutto
On Fri, Feb 14, 2014 at 10:49 PM, David Hutto wrote: > Here is a problem I've come across, from empirical evidence, that also > relates to your equation. We always assume > that their are always two probabilities, that a coin can be either head > or tails. > > However, th

Re: [Tutor] Beginner - explaining 'Flip a coin' bug

2014-02-14 Thread David Hutto
Just to add a footnote to the above remember: http://en.wikipedia.org/wiki/Random_seed unless setting your own random seed algorithm is applied. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.o

Re: [Tutor] for: how to skip items

2014-02-17 Thread David Palao
Hi Gabriele, Without knowing the details of what you are trying, I guess you could be interested in looking at how to define your own iterators. Regards 2014-02-17 17:05 GMT+01:00 Gabriele Brambilla : > Hi, > > I'm wondering how I can (if I can) make a for loop in which I don't use all > the elem

Re: [Tutor] from command prompt use interactive python and running script together

2014-02-21 Thread David Palao
2014-02-21 15:20 GMT+01:00 Gabriele Brambilla : > Hi, > > Is possible on python to running scripts from the command prompt (I'm using > python on windows) and in the end saving all the variables and continue the > analysis in the interactive mode? (the one that you activate typing python > in the c

Re: [Tutor] When to use multiprocessing Managers?

2014-02-26 Thread David Palao
2014-02-25 11:52 GMT+01:00 James Chapman : > Hello tutors > > I'm curious about managers and when to use them. > For example, I see they offer a Queue() for sharing a Q between > processes, but if I create a Q in the parent process and pass it down > to child processes, then they can put messages i

Re: [Tutor] help (Splitting a word into letters)

2014-03-18 Thread David Rock
ne 1, in IndexError: string index out of range >>> Can you be a little clearer what you need? Are you looking to store them in variables, an array, print them? If printing them, are you looking to output one per line, or spaced out? -- David Rock da...@graniteweb.com

Re: [Tutor] Help Noob Question

2014-03-27 Thread David Palao
Hello, What do you mean by "open it in the interpreter"? Do you want to open it and read from it its content? or do you want to execute its python code within the interpreter? Best 2014-03-27 7:43 GMT+01:00 Leo Nardo : > Im on windows 8 and i need to open a file called string1.py that is on my > d

Re: [Tutor] Help Noob Question

2014-03-28 Thread David Rock
he merits of one place over the other, just that simple organization is a good thing. Put it wherever you want, but at least keep it organized. Dropping everything in Desktop is not organized. -- David Rock da...@graniteweb.com ___ Tutor maill

Re: [Tutor] while loop

2014-03-31 Thread David Rock
So, instead of while n <= 10: Think about: while something <= n: and changing something and retesting. -- David Rock da...@graniteweb.com __

Re: [Tutor] Inheritance in classes

2014-04-08 Thread David Palao
2014-04-08 7:44 GMT+02:00 Santosh Kumar : > Can i mask the parent attibutes in the child. let me give a quick example. > > In [1]: class a: >...: value1 = 1 >...: value2 = 2 >...: > > In [2]: class b(a): >...: value3 = 3 >...: > > In [3]: obj1 = b() > > In [4]: obj1.

[Tutor] Question about O(N**2)

2014-05-03 Thread David Rock
#x27;, 'ignore').strip()] is an O(N**2)? 2. How do you know that fullPath.append(line.decode('utf-8', 'ignore').strip()) is not? -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] While truth

2014-05-20 Thread David Palao
Hi, 6, -1 or 0 are not bools (True or False): >>> 6 is True False >>> 0 is False False If you had to design a language and want to think about using numbers in a logical context you could do at least two things: 1) convert the number to bool, ie define a set of rules to assign to each number a lo

[Tutor] what is the cores?

2014-05-25 Thread Marino David
o module named cores* I am sure this cores module is related to probability distributions since there are a lot of codes like these: co.alpha, co.beta, co.uniform, etc. I google "cores python", and I did get useful information. Can anyone help me out? Any information will

Re: [Tutor] what is the cores?

2014-05-25 Thread Marino David
Thanks Marc. After I have close look at the toolbox, I found that cores.py is in the toolbox. Thanks again. David 2014-05-26 2:21 GMT+08:00 Marc Tompkins : > On Sun, May 25, 2014 at 10:32 AM, Marino David > wrote: > > Hi all: > > I am a newpie at python. > > I read a

[Tutor] How can I let the Python Console display more decimal precision?

2014-06-12 Thread Marino David
Hi All: I am a newbie at the Python. I type "26/12" in Python Console and get result of "2". It is obvious that the corresponding result should be 2... I don't know why the Console only returns the integer part of true result. Anyone can he

Re: [Tutor] printing all text that begins with "25"

2014-10-02 Thread David Rock
ch would be to change the command you are running. I've never heard of hamachi list before; does it have any commandline options to display only IP addresses? -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] A question about using stdin/out/err vs named files

2014-10-19 Thread David Rock
nput(). A single file name is also allowed." It gives a fairly clean way to just "do the Right Thing" whether you are feeding files, or reading from stdin. -- David Rock da...@graniteweb.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] subprocess.Popen basics

2014-10-27 Thread David Abbott
> It hangs at the print statement and, from the sound of the fans in the > computer, I suspect it spirals off into an infinite loop somewhere / > somehow. Does anyone have any ideas about what it is that I might be > misunderstanding? Works here. david@heater ~/pyt

Re: [Tutor] subprocess.Popen basics

2014-10-27 Thread David Abbott
I did do this also; david@heater ~/python_practice $ chmod a+x parrot.sh david@heater ~/python_practice $ chmod a+x subprocess_pipe.py ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman

Re: [Tutor] Ideas for Child's Project

2015-01-06 Thread David Heiser
Twelve years ago, I started with "The Quick Python Book". Harms and McDonald. Manning Pub. I learned a lot in a hurry. I still use it for reference once in a while to refresh my memory. On 1/6/2015 1:46 PM, Stephen Nelson-Smith wrote: Hello, My son is interested in programming, and has da

[Tutor] Alan's book - was "Learning python scripts for practical linux activities."

2015-01-15 Thread David Heiser
Thanks for the Shameless Plug, Alan. I went to Amazon, scanned through your book, and learned some things about "sets" that will help me in my job. Bought the Kindle version. Great stuff. On 1/15/2015 8:53 AM, Alan Gauld wrote: On 15/01/15 14:07, dw wrote: I would like to find a source,

Re: [Tutor] file exists question

2015-03-09 Thread David Heiser
On 3/9/2015 9:50 AM, Alan Gauld wrote: Somebody posted a question asking how to fond out if a file exists. The message was in the queue and I thought I'd approved it but it hasn't shown up yet. Sorry to the OP if I've messed up. The answer is that you use the os.path.exists() function. It take

<    5   6   7   8   9   10   11   12   >