Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 3:52 AM, Stefan Behnel wrote: > Chris Fuller, 21.12.2010 03:27: >> >> This isn't XML, it's an abomination of XML.  Best to not treat it as XML. >> Good thing you're only after one class of tags.  Here's what I'd do.  I'll >> give a general solution, but there are two parame

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 3:55 AM, David Hutto wrote: > On Tue, Dec 21, 2010 at 3:52 AM, Stefan Behnel wrote: >> Chris Fuller, 21.12.2010 03:27: >>> >>> This isn't XML, it's an abomination of XML.  Best to not treat it as XML. >>> Good thing you'r

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
And from what I recall XML is intended for data transfer in respect to HTML(from a recent brushup, nothing more), so not having used it, it sure has been displayed as a data transfer mechanism, I remember this from using Joomla's framework, and the xml files for menus I think. _

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 3:59 AM, David Hutto wrote: > And from what I recall XML is intended for data transfer in respect to > HTML(from a recent brushup, nothing more), Apologies that is browser based transfer, (not sure what more, although I think it means any data tranfer) so not

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
. I sympathize with you. I wonder who thought that building a 1GB XML file was a good thing. If it is: XML stands for eXtensible Markup Language. XML is designed to transport and store data. Then what other file medium would you suggest as the tagging means. You have a file wit

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:10 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 09:55: >> >> On Tue, Dec 21, 2010 at 3:52 AM, Stefan Behnel wrote: >>> >>> Chris Fuller, 21.12.2010 03:27: >>>> >>>> This isn't XML, it's an abo

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:17 AM, David Hutto wrote: > On Tue, Dec 21, 2010 at 4:10 AM, Stefan Behnel wrote: >> David Hutto, 21.12.2010 09:55: >>> >>> On Tue, Dec 21, 2010 at 3:52 AM, Stefan Behnel wrote: >>>> >>>> Chris Fuller, 21.12.2010 03:27:

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
File = string going through string code finding pieces of the string and marking the territory. I don't see 'real' optimization other than rolling your own. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:28 AM, Stefan Behnel wrote: > Hi, > > I wonder why you reply to my e-mail without replying to what I wrote in it. > > > David Hutto, 21.12.2010 10:12: >> >> . >>>>>> >>>>>> I sympathize with you. I wonder

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:34 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 10:19: >> >> On Tue, Dec 21, 2010 at 4:17 AM, David Hutto wrote: >>> >>> On Tue, Dec 21, 2010 at 4:10 AM, Stefan Behnel wrote: >>>>>> >>>>>>

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:43 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 10:29: >> >> File = string A file is a string of character encoded in it's format >> >> going through string code Code that goes through the file format and the encoding >&g

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:46 AM, Alan Gauld wrote: > "David Hutto" wrote > >>> And from what I recall XML is intended for data transfer in respect to >>> HTML(from a recent brushup, nothing more), >> >> Apologies that is browser based transfer, >

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:49 AM, Alan Gauld wrote: > > "David Hutto" wrote > >> > Note that it's not unlikely that this is actually *slower* than > using >> > a real >> > XML parser: >> >> Or a 'real' language like

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 4:58 AM, Alan Gauld wrote: > > "David Hutto" wrote > >>> I sympathize with you. I wonder who thought that building a 1GB XML file >>> was a good thing. > >> that was just the first listing: >> >> >> http://w

Re: [Tutor] Writing a programming language in Python (was: Trying to parse a HUGE(1gb) xml file in python)

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 5:00 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 10:46: >> >> On Tue, Dec 21, 2010 at 4:34 AM, Stefan Behnel wrote: >>> >>> David Hutto, 21.12.2010 10:19: >>>> >>>> If I want to write a programming langua

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
Give me a little time to review this when it's not 5:30 in the morning and I've been up since 9 am yesterday, and 'relearning' c++:) But it still seems that you have have coding + filetype + charactersinfileinformat., one long string that has to be parsed by the C functions. __

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 5:19 AM, Stefan Behnel wrote: > Alan Gauld, 21.12.2010 10:58: >> >> "David Hutto" wrote >>> >>> >>> http://www.google.com/search?client=ubuntu&channel=fs&q=parsing+gigabyte+xml+python&ie=utf-8&oe=utf-8 &g

Re: [Tutor] Writing a programming language in Python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 5:25 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 11:16: >> >> I understand it's .pyc so it's a compiled file and ready for usage >> as 'anyother'(I might be wrong on this, but sure it's the same as >> converting

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 5:35 AM, Alan Gauld wrote: > > "David Hutto" wrote > >> Somewhat of the fact that python uses C encourages me of that, but I >> have still been looking into c++ to optimize, because I've used it >> before, and the more lan

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 5:45 AM, Alan Gauld wrote: > > "David Hutto" wrote > >> That';s what I saying above that xml seems to be the hog in terms of >> it's user defined tags. Is that somewhat a confirmation of my hunch, >> that it's the

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 5:49 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 11:29: >> >> On Tue, Dec 21, 2010 at 5:19 AM, Stefan Behnel wrote: >>> >>> Alan Gauld, 21.12.2010 10:58: >>>>> >>>>> 22 Jan 2009 ... Stripping Illegal Cha

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 6:19 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 12:02: >> >> On Tue, Dec 21, 2010 at 5:45 AM, Alan Gauld wrote: >>> >>> 8 bytes to describe an int which could be represented in >>> a single byte in binary (or even in CSV).

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 6:41 AM, David Hutto wrote: > On Tue, Dec 21, 2010 at 6:19 AM, Stefan Behnel wrote: >> David Hutto, 21.12.2010 12:02: >>> >>> On Tue, Dec 21, 2010 at 5:45 AM, Alan Gauld wrote: >>>> >>>> 8 bytes to describe an int which c

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 6:59 AM, Stefan Behnel wrote: > David Hutto, 21.12.2010 12:45: >>> >>> If file a.xml has simple tagged xml like, and file b.config has >>> tags that represent the a.xml(i.e.  =) as greater tags, >>> does this pattern optimize

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
Establish that with fact that initiatially I didn't have a reason to be hostile, and that your comment of my kubit kaba here, and your comment on comp.python.lang about your pystats, aftger our conversation, and your reference to it not being "set in stone", wasn't a reference tyo our statrs argume

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
Take a look at the flame wars individuals see, comments by programmers who are sarcastic, and think of the response you might have had to the initial questions you had , and maybe even a few paranoid delusions you got hacked. It's not a rewarding experience not being a college educated individual

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 9:32 AM, David Hutto wrote: > Take a look at the flame wars individuals see, comments by programmers > who are sarcastic, and think of the response you might have had to the > initial questions you had , and maybe even a few paranoid delusions > you got hack

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
And furthermore, I'm not the first, nor the last to get angry and frustrated on the internet. I'm not the first to get drunk, and type. And I dare any employer to deny me the right to MY personal time. ___ Tutor maillist - Tutor@python.org To unsubscrib

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 9:36 AM, Steven D'Aprano wrote: > David Hutto wrote: >> >> Establish that with fact that initiatially I didn't have a reason to >> be hostile, and that your comment of my kubit kaba here, and your >> comment on comp.pytho

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 9:40 AM, David Hutto wrote: > On Tue, Dec 21, 2010 at 9:36 AM, Steven D'Aprano wrote: >> David Hutto wrote: >>> >>> Establish that with fact that initiatially I didn't have a reason to >>> be hostile, and that your comment

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
Me and you, apparently know exactly what i'm talking about... http://code.activestate.com/lists/python-tutor/79293/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
you got nothing of real value. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
And a lesson of what you really are to anyone listening. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 10:03 AM, Stefan Behnel wrote: > Alan Gauld, 21.12.2010 15:11: >> >> "Stefan Behnel" wrote And I thought a 1G file was extreme... Do these people stop to think that with XML as much as 80% of their "data" is just description (ie the tags). >>> >>> A

Re: [Tutor] Trying to parse a HUGE(1gb) xml file in python

2010-12-21 Thread David Hutto
On Tue, Dec 21, 2010 at 1:23 PM, Luke Paireepinart wrote: > You're not going to win any friends here Dave. Wasn't trying to. Steven is well known on this list. And that means something to you only. He is sometimes abrasive but it's rarely if ever malicious. Anytime he's ever been rude to me

Re: [Tutor] Opening and closing SQLite db

2010-12-26 Thread David Hutto
Just for future reference, when it's part of the python standard library, always go to the docs for the full functions and methods available. http://docs.python.org/library/sqlite3.html It can make the usage a lot easier. ___ Tutor maillist - Tutor@py

Re: [Tutor] Opening and closing SQLite db

2010-12-26 Thread David Hutto
On Sun, Dec 26, 2010 at 11:16 AM, Noah Hall wrote: > As a rule, I tend to open and close a connection based on what I'm doing > with the database. I +1 that. Usually if I open the db in a function, I commit and close. If it's in an app, for me personally, that should be the only place it takes pl

Re: [Tutor] Opening and closing SQLite db

2010-12-26 Thread David Hutto
Unless intermittent > saves are necessary within the app loop. Which is suggestible just in case the app or program crashes during use. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/

Re: [Tutor] Opening and closing SQLite db

2010-12-28 Thread David Hutto
But in the case you need the db constantly open(such as tracking something, where you update the db through some other offsite db), then just committing the current would be suggestible(in my opinion), and keeping the update live to check periodically for changes in the timestamps of data from the

Re: [Tutor] Opening and closing SQLite db

2010-12-28 Thread David Hutto
On Tue, Dec 28, 2010 at 9:18 PM, David Hutto wrote: > But in the case you need the db constantly open(such as tracking > something, where you update the db This assumes you don't connect directly to, but update from, for data analysis, not real time tracking. through some other

Re: [Tutor] Opening and closing SQLite db

2010-12-28 Thread David Hutto
So in the end it boils down to: What you want the db to hold? When do you need the db to hold it? And... When and where is it necessary to access it by the user? Ah! Not an algorithm. Many paths, same destination...grasshoppa. ___ Tutor maillist

Re: [Tutor] syntax error that i cant spot!

2011-01-01 Thread David Hutto
On Sat, Jan 1, 2011 at 12:02 PM, pete wrote: > Hi, > Please help just starting out and have come up with the following code to > create a simple guessing game. > > on line 30 print good job etc i get a syntax error! sure it's simple but > i've looked for ages and cant spot it! > > Regards > Pete

Re: [Tutor] syntax error that i cant spot!

2011-01-01 Thread David Hutto
You also can place: else: print " this is not a number" And: if guess == number: break if guess == number: guessesTaken = str(guessesTaken) print 'Good job, ' + myName + "! You guessed the number in " + guessesTaken + ' guesses!' which could be combined. if guess =

[Tutor] Command line scripts

2011-01-08 Thread David Hutto
This is somewhat of a cross post,but I think it applies here as well. If I use as command line script, is there any disruption in the execution of the code using wxpython. In other words, is a command line app different from bindings in a compiled app? @ trace def play(self, event =

Re: [Tutor] Command line scripts

2011-01-09 Thread David Hutto
On Sat, Jan 8, 2011 at 9:10 AM, Alan Gauld wrote: > "David Hutto" wrote > >> If I use as command line script, is there any disruption in the >> execution of the code using wxpython. > > I don't understand the question. > wxPython is a GUI toolkit so

Re: [Tutor] Command line scripts

2011-01-12 Thread David Hutto
On Sun, Jan 9, 2011 at 9:03 AM, ALAN GAULD wrote: > > >> The following line is what I mean by calling a  command line from within the >>app >> using subprocess. >> >> self.espeak =  subprocess.Popen(['espeak', word],stdout  = >> subprocess.PIPE).communicate()[0] > > OK, Now I understand. > You wan

Re: [Tutor] Command line scripts

2011-01-12 Thread David Abbott
On Wed, Jan 12, 2011 at 9:29 PM, David Hutto wrote: > On Sun, Jan 9, 2011 at 9:03 AM, ALAN GAULD wrote: >> >> >>> The following line is what I mean by calling a  command line from within the >>>app >>> using subprocess. >>> >>

Re: [Tutor] Command line scripts

2011-01-12 Thread David Hutto
I think it works great as an easy integration for the blind(although I'm sure there is already a python module for that somewhere), as long as they have espeak(or it can be easily adapted), but also if you just like the ai feel of a voice in your apps. __

Re: [Tutor] Command line scripts

2011-01-12 Thread David Hutto
Although, I'd just go with a function that gets passed the text, that way it was reusable, like the one I gave. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Command line scripts

2011-01-12 Thread David Hutto
Although, you did just that, didn't pay attention to the whole thing. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Command line scripts

2011-01-13 Thread David Hutto
As you can tell, I was excited, and impressed by my own work, and therefore thought you should follow my wise and almighty work. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo

Re: [Tutor] Command line scripts

2011-01-13 Thread David Hutto
On Thu, Jan 13, 2011 at 8:41 AM, David Hutto wrote: > As you can tell, I was excited, and impressed by my own work, and > therefore thought you should follow my wise and almighty work. On the flip side, it's like being an electrician, and seeing the lights come on when you hook

Re: [Tutor] turn a path into nested list

2011-01-13 Thread David Hutto
> Its not clear what exactly the sort criteria is, however have you looked > at the os.walk() function for traversing directory trees? It may be all > you need. it's amazing what the designers of the builtins left for your disposal. ___ Tutor maillist

Re: [Tutor] turn a path into nested list

2011-01-13 Thread David Hutto
It's like the were psychic...or intuitive . ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to print random number multiply

2011-01-14 Thread David Hutto
>  import random for x in range(1,10) > print (random.random()) -- Sometimes...my mama...says I get over excited about technology. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/li

Re: [Tutor] how to print random number multiply

2011-01-14 Thread David Hutto
Sorry , the tab button doesn't work for text in google mail, and it jumped to send >>  import random > for x in range(1,10): print (random.random()) This assigns a new random each time, where as outside the for loop it assigns it once. ___ Tut

Re: [Tutor] how to print random number multiply

2011-01-14 Thread David Hutto
On Fri, Jan 14, 2011 at 8:01 PM, David Hutto wrote: > Sorry , the tab button doesn't work for text in google mail, and it > jumped to send > >>> > >   import random >> for x in range(1,10): num = random.random() >       print (num) this should 

Re: [Tutor] Add rownumber to list of .arff files

2011-01-15 Thread David Hutto
On Sat, Jan 15, 2011 at 12:02 PM, Daan Raemdonck wrote: > Dear all, > > > > I am reaching out to you because I have a small issue I need to deal with, > yet I feel that it requires pretty advanced coding to solve. > > I have a whole lot of .arff files that would simply need a case number added > t

Re: [Tutor] Add rownumber to list of .arff files

2011-01-15 Thread David Hutto
>>> filename = ['file1','file2','file3'] >>> fileprefix = 'TRE_' >>> for item in filename: print('%s%s'%(fileprefix,item)) ... TRE_file1 TRE_file2 TRE_file3 or with list comp >>> combined = [('%s%s'%(fileprefix,item)) for item in filename] >>> combined ['TRE_file1', 'TRE_file2', 'TRE_file3'] >>>

[Tutor] Problems passing a parameter in a GUI

2011-01-18 Thread David Holland
Hi All, I hope this makes sense I am trying to write a GUI where you click on a button and each time you click on the button it shows in the entry text how many times you have clicked.  However when I changed an earlier version of the code to pass a parameter it errors. This works :- from Tkin

Re: [Tutor] Problems passing a parameter in a GUI

2011-01-19 Thread David Holland
Dave, Sorry I did not include the traceback but now James Reynolds (thank you very much) has provided a solution I don't need the info any more. Thank you both for your help and time. Traceback (most recent call last):   File "/home/david/Documents/learnJava2010/v6c.py", line

Re: [Tutor] Tutor Digest, Vol 83, Issue 83

2011-01-19 Thread David Holland
: -- Message: 7 Date: Wed, 19 Jan 2011 17:59:40 - From: "Alan Gauld" To: tutor@python.org Subject: Re: [Tutor] Problems passing a parameter in a GUI Message-ID: Content-Type: text/plain; format=flowed; charset="iso-8859-1";     reply-type=original "David Holland"

Re: [Tutor] How to plot graph?

2011-01-19 Thread David Hutto
actually i just want to plot a simple x and y graph. any suggestion? how about using excel to plot? any sample code that i can follow to: 1) launch excel 2) read x-y from a text file 3) plot graph thanks x,y is simple in many modules(beyond is more computational. What version of python, platform

Re: [Tutor] Tkinter in classes...why?

2011-01-20 Thread David Hutto
On Thu, Jan 20, 2011 at 2:43 PM, Elwin Estle wrote: > I have some experience in Tcl\Tk, and so far, Tkinter is striking me as > harder to use that Tk in it's "native" environment. > > I am attempting to re-write a program I originally did in Tcl\Tk in Python.   > I managed to get a GUI done using

Re: [Tutor] Exercise suggestions

2011-01-22 Thread David Hutto
On Sat, Jan 22, 2011 at 3:02 PM, Corey Richardson wrote: > On 01/22/2011 11:56 AM, michael scott wrote: >> >> I am new to programming, I intend to get an entry level job programming >> next year (or a little bit longer). I am switching fields and not going >> to college, but kinda "self teaching"

[Tutor] Telephone app

2011-01-22 Thread David Hutto
This is just a reach question. What modules would i want to use if i wanted to just send the signal, and receive the signal, other than maybe, signal. In other words please tone.dumb it down, and show a pseudo example. -- The lawyer in me says argue...even if you're wrong. The scientist in me...

Re: [Tutor] Telephone app

2011-01-22 Thread David Hutto
No, its just wondering whether it works like the USB, with two data pins, and -+, I know how the original works, but interpreting through computer language is a little disabling. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscriptio

Re: [Tutor] Telephone app

2011-01-22 Thread David Hutto
I'm getting ahead and behind my self here. I'm going from electrician to programmer. So I'm tring to construct the 'flow through' and the functional flow through. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http:

Re: [Tutor] Telephone app

2011-01-23 Thread David Hutto
> Can you step back a bit and explain what it is you are trying to > accomplish? "flow through" and "functional flow through" are meaningless > terms in telecomms - at least so far as I am aware (after my 35 years in > telecomms engineering...) It's two fold. First is the obvious of conducting a

Re: [Tutor] Not understanding a bit of code behavior

2011-01-24 Thread David Hutto
On Tue, Jan 25, 2011 at 2:42 AM, Alan Gauld wrote: > > "Bill Allen" wrote > >> I am convinced that I had previously assigned part_list to out_list by >> reference, not value as I mistaken thought when I first wrote the code, > > In Python variables are names which refer to objects. > So your assi

Re: [Tutor] placing widgets

2011-01-25 Thread David Hutto
Note when you answer yourself, it shows initiative and responsiveness to the situation you're trying to comprehend. -- The lawyer in me says argue...even if you're wrong. The scientist in me... says shut up, listen, and then argue. But the lawyer won on appeal, so now I have to argue due to a co

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread David Hutto
On Fri, Jan 28, 2011 at 11:30 PM, Steven D'Aprano wrote: > Karim wrote: >> >> Hello, >> >> I want to create a client to access a webpage. But when I access it >> interactively  there is a dialog box >> which ask for login and password. > > You should read this: > > http://www.voidspace.org.uk/pyth

[Tutor] Fwd: open linux file browser from nuke python script

2011-01-31 Thread David Abbott
-- Forwarded message -- From: David Abbott Date: Mon, Jan 31, 2011 at 9:55 AM Subject: Re: [Tutor] open linux file browser from nuke python script To: Pete O'Connell On Mon, Jan 31, 2011 at 6:42 AM, Pete O'Connell wrote: > Hi, I am trying to get a python script

Re: [Tutor] oops...sorry, just top posted again

2011-01-31 Thread David Hutto
On Mon, Jan 31, 2011 at 8:11 AM, Elwin Estle wrote: > ...but I have an excuse.  I had the thing saved in a drafts folder and just > hit send without thinking about it. > > ...I'll just go super glue broken glass to my hands and sprinkle itching > powder all over my body.  Is that penance enough?

[Tutor] Ideas and good examples

2011-02-03 Thread David Goering
ve already learned a lot from leeching off the mailing list, so thanks for that. Greetings from Germany, David ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Ideas and good examples

2011-02-03 Thread David Goering
. Is it worth waiting or should I just go ahead with v2 ? Sorry if its a repeated question... I will sift through the Archives to find other ideas to similar questions. But anyway thanks so far, if someone still has new ideas or links they are always welcome :) -- David

Re: [Tutor] Converting From Unicode to ASCII!!

2011-02-07 Thread David Hutto
On Mon, Feb 7, 2011 at 10:15 PM, Nevins Duret wrote: > Hello all, > > > >     Don’t know if I’ll be bashed on this forum for doing this, > but I will assure you I have the best intentions and > > simply want to apply a real world problem and how to go about solving it > using python3.1

Re: [Tutor] Converting From Unicode to ASCII!!

2011-02-07 Thread David Hutto
Also, If you can install a second version, then you should be able to mount the other version you're locked out of, then recover your files, and reinstall. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.

Re: [Tutor] Converting From Unicode to ASCII!!

2011-02-07 Thread David Hutto
And I forgot, that you don't have to install another version, but just boot from the live disk, and mount the partition. But from looking, you should be able to recover with linux utilities. Look here: http://aplawrence.com/Linux/lostlinuxpassword.htmlhttp://aplawrence.com/Linux/lostlinuxpassword.

Re: [Tutor] Splitting a string

2011-02-08 Thread David Hutto
> To get a list, just ask for one: > list("abcd") > ['a', 'b', 'c', 'd'] > or., and this isn't to argue with anyone;), you could: >>> x = 'abcd' >>> y = [] >>> for letter in x: ... y.append(letter) ... >>> print y ['a', 'b', 'c', 'd'] which explains that the list is derived from the st

Re: [Tutor] Splitting a string

2011-02-08 Thread David Hutto
Don't use the try and except, use a if else. I'm not as good as an explainer as the pros, but I can make enough sense if you respond back with a useful set of examples you've tried. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscrip

Re: [Tutor] Splitting a string

2011-02-08 Thread David Hutto
On Tue, Feb 8, 2011 at 8:36 AM, Christian Witts wrote: > On 08/02/2011 15:04, tee chwee liong wrote: >> >> hi all, >> >> thanks for the advice. i modified my code to be: >> >> c=('01101') >> i=-1 >> try: >>    while 1: >>        i=c.index('0',i+1) >>        print "Lane fail",i >> except ValueError

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
for some reason, if you're on linux, I wanna say use python's subprocess, and man pppd. also look into proc and a thread in the archives I did a while back. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
On Sat, Feb 12, 2011 at 1:20 AM, Corey Richardson wrote: > On 02/12/2011 01:10 AM, David Hutto wrote: >> for some reason, if you're on linux, I wanna say use python's >> subprocess, and man pppd. also look into proc and a thread in the >> archives I did a

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
> The point is to specifically transmit the data as sound, and then turn > the sound back into the gzipped file. If I were doing this for anything > other than my own entertainment and education, I'd do it some way that > made sense :-) > Do you mean just a wav file, and then send it to someone? _

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
On Sat, Feb 12, 2011 at 1:24 AM, David Hutto wrote: >> The point is to specifically transmit the data as sound, and then turn >> the sound back into the gzipped file. If I were doing this for anything >> other than my own entertainment and education, I'd do it some

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
On Sat, Feb 12, 2011 at 1:32 AM, Corey Richardson wrote: > On 02/12/2011 01:26 AM, David Hutto wrote: >> On Sat, Feb 12, 2011 at 1:24 AM, David Hutto wrote: >>>> The point is to specifically transmit the data as sound, and then turn >>>> the sound back into the g

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
>> I have any file, gzip it, turn it to a sound file, you have a sound file, then gzip it. and then gunzip it on >> the other end. which requires an unzip utility on the other end, and then an app to play the sound files format. Using tones to specify bit patterns, I'll work that out >> after

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
This is how i zip the file: david@david-HP-Pavilion-dv9700-Notebook-PC:~$ sudo gzip /usr/lib/openoffice/basis-link/share/gallery/sounds/apert.wav > /home/david/examp.gz[sudo] password for david: david@david-HP-Pavilion-dv9700-Notebook-PC:~$ Then they: david@david-HP-Pavilion-dv9700-Notebook

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
and a simple makefile, as I've recently understood, or a file that executes command lines, can do that. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
There doesn't even have to be a source file, or .o and.h and.c, it just executes the command lines in it. So just a makefile in a directory and typing make at the command line executes those commands. So you can do a whole reorientation of a system with just command line s in a makefile.

Re: [Tutor] Python + Sound

2011-02-11 Thread David Hutto
> Pardon me while I chortle :) > > Like I said, start here: http://www.google.com/search?client=ubuntu&channel=fs&q=the+modern+telephone&ie=utf-8&oe=utf-8 Steven forgot a little in his elaboration,that he isn't an expert in this: -- According to theoretical physics, the division of spatial int

Re: [Tutor] Python + Sound

2011-02-12 Thread David Hutto
On Sat, Feb 12, 2011 at 4:43 AM, Alan Gauld wrote: > > "David Hutto" wrote > >> and what is sound, electromagnetically transmitted, then turned into >> ones and zeroes. > > Just to be picky sound is mechanical waves not electromagnetic. > The ear is prima

Re: [Tutor] licensing python work?

2011-02-23 Thread David Hutto
Read the licenses, and see which one fits your needs, or just put your own conditions at the top of each file. They can use it under your stated terms. http://www.google.com/search?client=ubuntu&channel=fs&q=open+source+licensing&ie=utf-8&oe=utf-8 On Wed, Feb 23, 2011 at 10:05 PM, Wayne Werner wr

Re: [Tutor] licensing python work?

2011-02-23 Thread David Hutto
Remember to check the licenses of what your wrapper utilizes. According to theoretical physics, the division of spatial intervals as the universe evolves gives rise to the fact that in another timeline, your interdimensional counterpart received helpful advice from me...so be eternally pleased for

Re: [Tutor] licensing python work?

2011-02-23 Thread David Hutto
And in the end it is called open source, for a reason, so if you're not worried, just throw your name at the top, and don't even use a license, unless you want your name to be kept, in which case you might want to include"whether copied in whole, or part". We all scavenge for examples, until we ca

Re: [Tutor] licensing python work?

2011-02-23 Thread David Hutto
That's why I said to check the licenses from what you work upon(that gives more insight into what license you should use, and how you use it). More and more it's just docs, and functions for me, but initially, all of your "great" beginner projects, utilize what you find, and tutorials online are us

Re: [Tutor] Bitwise operation

2011-02-28 Thread David Hutto
On Mon, Feb 28, 2011 at 4:43 AM, Martin A. Brown wrote: > >  : i'm confused with & and AND. for eg: >  : >>> 1110 & 0110 >  : 64 >  : >>> 1110 and 0110 >  : 72 >  : >  : i'm expecting if 1110 and with 0110 will get 0110 or 6. >  : pls advise. > > Above, python thinks you are representing one numbe

Re: [Tutor] Socket and Changing IP's

2011-02-28 Thread David Hutto
On Mon, Feb 28, 2011 at 7:02 PM, Jacob Bender wrote: > On 2/28/2011 6:57 PM, Wayne Werner wrote: > > On Mon, Feb 28, 2011 at 5:49 PM, Jacob Bender > wrote: >> >> Tutors, >> >>    I was looking into network programming, and I came across a problem. >> Socket programs need an IP address to function

Re: [Tutor] Help!

2011-03-03 Thread David Hutto
On Thu, Mar 3, 2011 at 4:56 PM, Knacktus wrote: > Am 03.03.2011 22:28, schrieb Andrew Bouchot: >> >> okay so this is my comp sci lab >> * >> >> Problem: >> >> *ProductionTime.py It takes exactly 2 minutes and 7 second to produce an >> item. Unfortunately, after 143 items are produced, the fabricat

<    3   4   5   6   7   8   9   10   11   12   >