Re: [Tutor] Package which can extract data from pdf

2019-08-14 Thread William Ray Wing via Tutor
> On Aug 14, 2019, at 2:16 PM, Mats Wichmann wrote: > >> On 8/14/19 10:10 AM, Nupur Jha wrote: >> Hi All, >> >> I have many pdf invoices with different formats. I want to extract the line >> items from these pdf files using python coding. >> Treat this as a two part problem: part one is extra

Re: [Tutor] data structures general query

2019-06-26 Thread William Ray Wing via Tutor
> On Jun 26, 2019, at 6:40 AM, mhysnm1...@gmail.com wrote: > > All, > > > > General computer science question for data structures. > > When would you use the below structures and why? If you can provide a real > life example on when they would be used in a program This would be great. I > am

Re: [Tutor] How to Scrape Text from PDFs

2019-06-17 Thread William Ray Wing via Tutor
> On Jun 17, 2019, at 1:30 AM, Cem Vardar wrote: > > Hello, > > I have been working on assignment that was described to me as “fairly > trivial” for a couple of days now. I have some PDF files that have links for > some websites and I need to extract these links from these files by using >

Re: [Tutor] Questions

2019-04-08 Thread William Ray Wing via Tutor
filings of individual > companies by putting in a ticker (preferably in excel, but an be done > elsewhere). Trying to figure out how to even start setting this up. > > Thank you! > > On Sun, Apr 7, 2019 at 8:57 PM William Ray Wing <mailto:w...@mac.com>> wrote: >

Re: [Tutor] Fwd: Can tempfile.NamedTemporaryFile(delete=False) be used to create *permanent* uniquely named files?

2018-10-22 Thread William Ray Wing via Tutor
> On Oct 22, 2018, at 8:30 PM, boB Stepp wrote: > > On Mon, Oct 22, 2018 at 11:57 AM Mats Wichmann wrote: >> >> On 10/22/18 8:24 AM, boB Stepp wrote: >>> Forwarding to the Tutor list. Herr Maier offers a good idea that >>> would take away much of a remaining issue -- the name "Temporary". I

Re: [Tutor] Python 3.6.5 for MAC

2018-04-23 Thread William Ray Wing
> On Apr 23, 2018, at 6:29 AM, Giorgio De Angelis > wrote: > > Hello guys, > > I have a problem with my MacBook Pro ’13, version 10.13.4, because when I try > to open the shell it says that it couldn’t make any connection because it > wasn’t able to make a subprocess. Can you help me? > So

Re: [Tutor] Beginner Level Projects

2018-04-19 Thread William Ray Wing
> On Apr 18, 2018, at 9:34 PM, Joshua Nghe wrote: > > Hi, > > This is Joshua N from Campus Middle School in CO. Our science class is > collectively participating in a project that consumes 20% of our classtime > every week. For my project, I chose to learn Python, and create something > from

Re: [Tutor] Problem python script

2017-12-19 Thread William Ray Wing
Sent from my iPhone > On Dec 19, 2017, at 3:47 AM, Antoan Hristov wrote: > > Hello, > > I am using a script which extracts data from internet every Monday, but > sometimes I have a problem that the script is not finishing properly. In > terminal I stop it with Ctrl-C and the message it gives

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread William Ray Wing
> On Nov 20, 2017, at 9:55 AM, Stephen P. Molnar wrote: > > > On 11/20/2017 09:34 AM, William Ray Wing wrote: [byte] >> As an experiment, I took the code and moved it to my laptop (MacOS, running >> 10.12.6 where there is a complete Anaconda installation that cont

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread William Ray Wing
> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar wrote: > > > On 11/19/2017 03:10 PM, William Ray Wing wrote: >>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar >>> wrote: >>> >>> I have written a short Python 3 script to plot three curve

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread William Ray Wing
> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar wrote: > > > On 11/19/2017 03:10 PM, William Ray Wing wrote: >>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar >>> wrote: >>> >>> I have written a short Python 3 script to plot three curve

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread William Ray Wing
> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar > wrote: > > I have written a short Python 3 script to plot three curves (one plot) of > data from a FORTRAN program. Initially the code worked and produced the plot > which is attached. I have also attached the code and the input data, >

Re: [Tutor] coding help with maxwell-boltzmann distribution

2017-10-12 Thread William Ray Wing
> On Oct 12, 2017, at 4:22 PM, Cameron McKay wrote: > > Hello, > > I've never used python trying to plot a graph. Thus I am having > difficulties trying to plot the maxwell-boltzmann distribution. right now > i've defined the y-axis given the probability, but the difficult part is > trying to

Re: [Tutor] 10+ Different Python Script?

2016-07-13 Thread William Ray Wing
> On Jul 13, 2016, at 8:03 AM, Crusier wrote: > > Dear All, > > I am currently using: > Python 3.5 > Window 7 > > > I have a python script which is used for downloading Real Time Stocks. > Currently, there is over a 1000 stocks in the Portfolio. > > If I download the market info during marke

Re: [Tutor] Study Tips

2016-06-01 Thread William Ray Wing
> On May 30, 2016, at 1:45 AM, Steve Lett wrote: > > Hi folks, > Just started learning python. I've been having a really hard time in > getting started, and still am! I have a slight learning difficulty, > including a stroke in Jan.2010. You wouldnt know even if u were here > looking at me! Prai

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

2016-03-11 Thread William Ray Wing
> On Mar 11, 2016, at 10:31 PM, boB Stepp wrote: > > I must be bored tonight. I have to confess that when copying and > pasting from the interpreter into a plain text email, I often find it > cluttered to confusing by all the ">>>..." that can result from nested > quoting. So I poked around on

Re: [Tutor] Hi

2015-04-11 Thread William Ray Wing
> On Apr 11, 2015, at 8:32 AM, Vick wrote: > [byte] > However I recently talked to a guy online and he told me the following, > which actually intrigued and surprised me: > > "The vast majority of numerical codes in science, including positional > astronomy, are written in Fortran and C/C++.

Re: [Tutor] usage difference between tabs and spaces

2014-09-09 Thread William Ray Wing
On Sep 9, 2014, at 8:27 AM, Mirage Web Studio wrote: > > Hello, > > I am not an advanced programmer, but am very good with keyboard and find > using tabs for syntax and formatting very helpful. But in this list and > other python documentation i have repeatedly seen people recommending > use of

Re: [Tutor] debug and execute python code in Mac

2014-08-28 Thread William Ray Wing
On Aug 27, 2014, at 8:08 PM, Sebastian Silva wrote: > I stumbled today upon this IDE for the mac http://plotdevice.io/ > > From the looks of it, it seems like a nice tool for teaching/learning Python. > Too bad it's mac only. If you try it, do share your experience. I don't use > non-free oper

Re: [Tutor] how do I set variables in Python 3.4

2014-07-11 Thread William Ray Wing
On Jul 11, 2014, at 1:50 AM, Danielle Salaz wrote: > I'm a noob to Python and cannot figure out how to complete one of my > assignments. > Welcome to Python - I’d hope you’ve been monitoring this Tutor list for at least a few days - > I am supposed to use operand1=2 and operand2=7 > To com

Re: [Tutor] What are your favourite unofficial resources

2014-06-29 Thread William Ray Wing
Probably obvious (meaning you will get them both 50+ times), but I like both Stackoverflow.com and Doug Hellmann’s site. Thanks, Bill On Jun 29, 2014, at 6:41 PM, Alan Gauld wrote: > I'm looking for tips for an appendix to a book that > I'm working on. > > What are the best unofficial (ie not

Re: [Tutor] which is faster

2014-06-10 Thread William Ray Wing
On Jun 10, 2014, at 2:42 AM, diliup gabadamudalige wrote: > Hi All, > > This is a Pygame related question and if not answered it's ok and I apologise > for asking. But if someone can answer it is much appreciated. > > In Pygame Which is faster? > > 1. filling the screen with a colour > or

Re: [Tutor] Help with Guess the number script

2014-03-11 Thread William Ray Wing
On Mar 11, 2014, at 8:06 PM, Scott W Dunning wrote: [mega byte] >> > Yeah, I had no idea that my messages were coming through in HTML, nor what it > looked like until someone sent me a section showing me what it looked like, I > can see how that would be frustrating. > > I’m using the mail

Re: [Tutor] same python script now running much slower

2013-12-30 Thread William Ray Wing
On Dec 30, 2013, at 7:54 PM, "Protas, Meredith" wrote: > Thanks for all of your comments! I am working with human genome information > which is in the form of many very short DNA sequence reads. I am using a > script that sorts through all of these sequences and picks out ones that > contain

Re: [Tutor] same python script now running much slower

2013-12-30 Thread William Ray Wing
On Dec 30, 2013, at 1:37 PM, "Protas, Meredith" wrote: > Hi, > > I'm very new to python so I'm sorry about such a basic question. > > I am using a python script generated by another person. I have used this > script multiple times before and it takes around 24 hours to run. Recently, > I ha

Re: [Tutor] Quantum computing

2013-12-14 Thread William Ray Wing
On Dec 14, 2013, at 1:22 PM, Mark Lawrence wrote: > On 14/12/2013 17:14, Alan Gauld wrote: >> On 14/12/13 15:37, Mark Lawrence wrote: >>> >>> I believe that quantum computing is way OT for the Python tutor mailing >>> list. >> >> Yeah, you are probably right. Although there are precedents where

Re: [Tutor] Subprocess communications query

2013-12-11 Thread William Ray Wing
On Dec 10, 2013, at 2:28 PM, Reuben wrote: > Hi, > > There exists two Linux machines A and B. Machine B contains python script > which needs to be run e.g. Test.py > > In order to run that script, machine A needs to telnet into machine B and > then execute "python Test.py" > > How can this b

Re: [Tutor] Load Entire File into memory

2013-11-05 Thread William Ray Wing
On Nov 5, 2013, at 11:12 AM, Alan Gauld wrote: > On 05/11/13 02:02, Danny Yoo wrote: > >> To visualize the sheer scale of the problem, see: >> >> http://i.imgur.com/X1Hi1.gif >> >> which would normally be funny, except that it's not quite a joke. :P > > I think I'm missing something. All I s

Re: [Tutor] Load Entire File into memory

2013-11-04 Thread William Ray Wing
On Nov 4, 2013, at 8:30 AM, Amal Thomas wrote: > Yes I have found that after loading to RAM and then reading lines by lines > saves a huge amount of time since my text files are very huge. > [huge snip] > -- > AMAL THOMAS > Fourth Year Undergraduate Student > Department of Biotechnology > II

Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread William Ray Wing
On Aug 26, 2013, at 5:28 AM, Chris Down wrote: > On 2013-08-26 01:23, Alan Gauld wrote: >> While this is technically within the remit of this list, since its >> about a standard library module, I suspect you might be better >> off asking on the main tutor list. It's at a deeper level of >> skill/

Re: [Tutor] (no subject)

2013-03-24 Thread William Ray Wing
On Mar 24, 2013, at 8:13 PM, Mandi Seger wrote: > Hello, everyone, > > I am looking for suggestions on a beginner's book for learning Python. I have > a nursing background with basic science and math education. I have no > programming experience in any computer language. > > I am currently en

Re: [Tutor] python on ipad

2013-03-10 Thread William Ray Wing
On Mar 10, 2013, at 6:18 PM, Sven wrote: > On 10 March 2013 21:42, Benjamin Fishbein wrote: > Hello. I wrote some python programs for my small business that I run on my > computer...macbook air. I'm planning to backpack around Mexico and perhaps > south america. I'll still be working though. B

Re: [Tutor] LCM revisited + OOP

2012-11-27 Thread Ray Jones
On 11/27/2012 07:27 PM, Steven D'Aprano wrote: > For something as simple as Least Common Multiple? Using a function is > much more sensible than writing a class. > > OOP is for when you have a single data type that needs *state* and > *behaviour*. A LCM function only has behaviour, and so a func

[Tutor] LCM revisited + OOP

2012-11-27 Thread Ray Jones
Part I I am a good way through MIT's Introduction to Computer Science and Programming as offered through edX. I'm not certain I'm going to pass the course this first time through, the major hangup being the understanding of OOP. Part II When the LCM thread came through, I wrote some quick code do

Re: [Tutor] urllib2.urlopen()

2012-10-14 Thread Ray Jones
On 10/14/2012 02:26 AM, eryksun wrote: > e.hdrs['connection'] 'close' > e.hdrs.getheaders('connection') ['close'] I have often used help() to find my way around imported libraries. I didn't realize it would a

Re: [Tutor] urllib2.urlopen()

2012-10-14 Thread Ray Jones
On 10/13/2012 11:55 PM, Brian van den Broek wrote: > On 14 October 2012 02:15, Ray Jones wrote: >> On 10/13/2012 07:50 PM, Steven D'Aprano wrote: > > >>> If you can do `print e.info()`, then you can also do `info = e.info()` >>> and inspect the info programm

Re: [Tutor] urllib2.urlopen()

2012-10-13 Thread Ray Jones
On 10/13/2012 07:50 PM, Steven D'Aprano wrote: > On 14/10/12 12:45, Ray Jones wrote: >> On 10/13/2012 05:09 PM, Brian van den Broek wrote: >>> On 13 October 2012 19:44, Ray Jones wrote: >>>> I am attempting to capture url headers and have my script make >>

Re: [Tutor] urllib2.urlopen()

2012-10-13 Thread Ray Jones
On 10/13/2012 05:09 PM, Brian van den Broek wrote: > On 13 October 2012 19:44, Ray Jones wrote: >> I am attempting to capture url headers and have my script make decisions >> based on the content of those headers. >> >> Here is what I am using in the relative port

[Tutor] urllib2.urlopen()

2012-10-13 Thread Ray Jones
ror, I can print e.info() and get all the relevant header information. But I don't want to print. I want the information from the instance available to use in my script. How do I accomplish that? Ray ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] How to run this block of code dozens of times

2012-09-17 Thread Ray Jones
On 09/17/2012 02:46 AM, eryksun wrote: > On Sun, Sep 16, 2012 at 11:17 PM, Steven D'Aprano wrote: >> Other uses are: >> >> * a single leading underscore usually means "private, don't touch" >> >> * double leading and trailing underscore names have special meaning >> to Python, e.g.: > There's al

Re: [Tutor] 2.7.3 documentation gripe (feel free to ignore)

2012-09-14 Thread Ray Jones
On 09/14/2012 02:32 AM, Steven D'Aprano wrote: > On 14/09/12 17:29, Ray Jones wrote: >> >> 6.5. The del >> <http://docs.python.org/reference/simple_stmts.html#del> statement > [...] >> They call this DOCUMENTATION??? "it's similar to s

Re: [Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Ray Jones
Thanks for the responses. I knew it had to be something stupid ;)). Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Ray Jones
On 09/14/2012 02:07 AM, Steven D'Aprano wrote: > On 14/09/12 18:43, Ray Jones wrote: > >> Between the two arrows, 'source' inexplicably switches from >> to. Why? > > source.remove('') does not do what you think it does. Checking the > Fine Man

[Tutor] (2.7.3) Inexplicable change of type

2012-09-14 Thread Ray Jones
ent call last): File "/tmp/pytmp.py", line 18, in out = split_string('Hi! I am your Assistant Instructor, Peter.', '! ,.') File "/tmp/pytmp.py", line 13, in split_string while '' in source: TypeError: argument of type 'NoneType' i

[Tutor] 2.7.3 documentation gripe (feel free to ignore)

2012-09-14 Thread Ray Jones
s defined. Rather than spelling it out in full details, here are some hints. === They call this DOCUMENTATION??? "it's similar to such and such - you figure it outhere are the hints"! Bah! I hope their code is better than the documentati

[Tutor] Seeing response from authorization page with urllib2

2012-09-11 Thread Ray Jones
't seem to work. How can I get that information from the server? Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] urllib2.urlopen(....., timeout=)

2012-09-07 Thread Ray Jones
On 09/07/2012 08:32 AM, Dave Angel wrote: > On 09/07/2012 11:16 AM, Ray Jones wrote: >> 2.7.3 >> According to the docs, urlopen has a timeout capability. But it says >> that the timeout = '' >> >> I've tried integers as the timeout value, I've t

Re: [Tutor] urllib2.urlopen(....., timeout=)

2012-09-07 Thread Ray Jones
On 09/07/2012 08:33 AM, Steven D'Aprano wrote: > On 08/09/12 01:16, Ray Jones wrote: >> 2.7.3 >> According to the docs, urlopen has a timeout capability. But it says >> that the timeout = '' > > Which docs are those? According to these docs: > > http

[Tutor] urllib2.urlopen(....., timeout=)

2012-09-07 Thread Ray Jones
ng the urlopen to timeout if the target system isn't responding for some reason? What kind of objects is it expecting? Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 05:34 PM, Steven D'Aprano wrote: > On 07/09/12 01:33, Ray Jones wrote: > >> Our homework "monitor" complains if we use code that hasn't been >> discussed in session yet. > > The good old "teaching by enforced ignorance" method. &g

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 05:31 PM, Steven D'Aprano wrote: > On 06/09/12 23:56, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would lik

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 10:05 AM, Alan Gauld wrote: > On 06/09/12 14:56, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to ha

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 08:29 AM, Walter Prins wrote: > Hi Ray, > > On 6 September 2012 15:59, Ray Jones wrote: >> Basically it's as simple as ensuring that an array consists of integers, >> and that those integers fall within a certain range. Rather than using >> multipl

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:48 AM, Dave Angel wrote: >>> On 09/06/2012 09:56 AM, Ray Jones wrote: >>>> I have a multiple 'if' expression that I need to drastically reduce in >>>> size, both for readability and to keep errors from creeping in. >>>> &g

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:35 AM, Jerry Hill wrote: > On Thu, Sep 6, 2012 at 10:15 AM, Ray Jones wrote: >> Well, of all the. a REAL programming language. I mean, even >> Bash ;;)) >> >> Anyway, it was a shot. Thanks. > There's almost certainly a way to

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:33 AM, Peter Otten wrote: > Ray Jones wrote: > >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to have the variable

Re: [Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
On 09/06/2012 07:15 AM, Dave Angel wrote: > On 09/06/2012 09:56 AM, Ray Jones wrote: >> I have a multiple 'if' expression that I need to drastically reduce in >> size, both for readability and to keep errors from creeping in. >> >> For example, I would like to

[Tutor] Making big 'uns into little 'uns

2012-09-06 Thread Ray Jones
would use 'grid.', I could replace it with 'test' How would I accomplish that? Thanks. Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Hey.need help on time

2012-09-06 Thread Ray Jones
On 09/06/2012 02:08 AM, eryksun wrote: > On Thu, Sep 6, 2012 at 4:25 AM, Ray Jones wrote: >> Why the additional step of calling time.tzset()? Once os.environ['TZ'] >> is set, I've found that time.localtime() responds to the new TZ without >> anything extra. Is

Re: [Tutor] Help

2012-09-06 Thread Ray Jones
== "Hand it over" or answer2 > > == "hand it over": > >print "Bandit: Good Job.. Go on now" > >ammo=ammo-15 > > I'll take a stab at it. You are using attempting to modify a global variable within a procedure. Procedure variables are separate from global variables. Global variables must be passed into a procedure using something on the order of 'part1(ammo)', and then returned back from the procedure with a 'return ' Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Hey.need help on time

2012-09-06 Thread Ray Jones
t; os.environ['TZ'] = 'US/Eastern' > Now just call time.tzset(), and it should work. Why the additional step of calling time.tzset()? Once os.environ['TZ'] is set, I've found that time.localtime() responds to the new TZ witho

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 08:18 AM, eryksun wrote: > On Wed, Sep 5, 2012 at 10:51 AM, Ray Jones wrote: >> subprocess.call(['dolphin', '/my_home/testdir/\u044c\u043e\u0432']) >> >> Dolphin's error message: 'The file or folder >> /my_home/testdir/\

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 07:51 AM, Ray Jones wrote: > subprocess.call(['dolphin', '/my_home/testdir/\u044c\u043e\u0432']) > > Dolphin's error message: 'The file or folder > /my_home/testdir/\u044c\u043e\u0432 does not exist' > > But if I copy the charac

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 07:31 AM, eryksun wrote: > On Wed, Sep 5, 2012 at 5:42 AM, Ray Jones wrote: >> I have directory names that contain Russian characters, Romanian >> characters, French characters, et al. When I search for a file using >> glob.glob(), I end up with stuff like \x9

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 04:52 AM, Peter Otten wrote: > Ray Jones wrote: > >> >> But doesn't that entail knowing in advance which encoding you will be >> working with? How would you automate the process while reading existing >> files? > If you don't *know* the enc

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 03:33 AM, Peter Otten wrote: > Ray Jones wrote: > >> I have directory names that contain Russian characters, Romanian >> characters, French characters, et al. When I search for a file using >> glob.glob(), I end up with stuff like \x93\x8c\xd1 in place of t

Re: [Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
On 09/05/2012 02:57 AM, Walter Prins wrote: > Hi Ray, > > On 5 September 2012 10:42, Ray Jones wrote: >> Can someone point me to a page that will clarify the concepts, not just >> try to show me the Python implementation of what I already don't >> understand? ;) &

[Tutor] Unicode? UTF-8? UTF-16? WTF-8? ;)

2012-09-05 Thread Ray Jones
ady don't understand? ;) Thanks Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Running a script in the background (offshoot - sorry, OP)

2012-09-02 Thread Ray Jones
On 09/02/2012 06:03 PM, Steven D'Aprano wrote: > On Sun, Sep 02, 2012 at 03:14:53PM -0700, Ray Jones wrote: >> This is only tangentially related to the thread. Someone mentioned that >> so long as a script didn't require user input or output to the user, it >> could

Re: [Tutor] Running a script in the background

2012-09-02 Thread Ray Jones
On 09/02/2012 03:30 PM, Alan Gauld wrote: > On 02/09/12 23:14, Ray Jones wrote: >> could run silently in the background. But is there a way for a Python >> (2.7.3) script to determine whether it was called by the user or called >> by something like cron or kalarm? That way

Re: [Tutor] Running a script in the background

2012-09-02 Thread Ray Jones
thing like cron or kalarm? That way user inputs could be used when called by a user, but defaults could be used if run by a bot. Or is this more of a Linux question? Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription op

Re: [Tutor] 2.7.3 generator objects

2012-09-02 Thread Ray Jones
After a few times re-reading, I'm beginning to get a glimmer > Also, here is the PEP for simple generators: > http://www.python.org/dev/peps/pep-0255/ but this is complete Greek! ;) But didn't I read somewhere that you can reset an iterator to go through th

Re: [Tutor] 2.7.3 generator objects

2012-09-01 Thread Ray Jones
On 09/01/2012 11:39 PM, Alan Gauld wrote: > On 02/09/12 06:44, Ray Jones wrote: >> I was playing with os.walk today. I can use os.walk in a for loop (does >> that make it an iterator or just an irritable? ^_^), but if I assign >> os.walk to 'test' (test = os.w

[Tutor] 2.7.3 generator objects

2012-09-01 Thread Ray Jones
upposed to work in a generator function using 'yield', but I'm at a loss at how that all works. I suppose I should just stick with using the os.walk in the for loop, but I'd like to make sense of the whole thing. Please someone explain this to me? Thanks. Ray __

Re: [Tutor] Using a calling program to change Python script arguments

2012-08-31 Thread Ray Jones
th list a run time. So far it appears to work in testing modenext we'll see what happens in real life! Thanks. Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Using a calling program to change Python script arguments

2012-08-31 Thread Ray Jones
On 08/31/2012 02:19 PM, Alan Gauld wrote: > On 31/08/12 18:05, Ray Jones wrote: > >> script and have it parse. Is there another method for one Python script >> to call/import/execute a Python script and integrate the name space so >> that the variables in each of the

[Tutor] Using a calling program to change Python script arguments

2012-08-31 Thread Ray Jones
all. So how high is this pie-in-the-sky dream of mine? Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] running more than one python program at the same time

2012-08-28 Thread Ray Jones
ere's a way to do this? > Or do I need to buy a second computer? > Thanks, > Ben Can you make each script executable and run them without idle? Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: htt

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 01:35 PM, Emile van Sebille wrote: > On 8/28/2012 1:17 PM Ray Jones said... >> On 08/28/2012 01:11 PM, eryksun wrote: >>> On Tue, Aug 28, 2012 at 4:00 PM, Ray Jones wrote: >>>> Oops. No, I see that /usr/local/lib/python2.7/dist-packages is >>&

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 01:11 PM, eryksun wrote: > On Tue, Aug 28, 2012 at 4:00 PM, Ray Jones wrote: >> Oops. No, I see that /usr/local/lib/python2.7/dist-packages is included >> in the sys.path. Now what? > Good, but does sys.path contain > /usr/local/lib/python2.7/dist-packages/pytz-

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 01:11 PM, eryksun wrote: > On Tue, Aug 28, 2012 at 4:00 PM, Ray Jones wrote: >> Oops. No, I see that /usr/local/lib/python2.7/dist-packages is included >> in the sys.path. Now what? > Good, but does sys.path contain > /usr/local/lib/python2.7/dist-packages/pyt

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:52 PM, eryksun wrote: > On Tue, Aug 28, 2012 at 2:39 PM, Ray Jones wrote: >>> Do you have multiple python installations on your machine? Do you run >>> easy_install in one and ipython in another? >> Perhaps. But the module is not accessible from the &#

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:35 PM, Steven D'Aprano wrote: > On 29/08/12 03:41, Ray Jones wrote: >> I'm working on another Python replacement for a Bash script, and I ran >> into a need for enhanced time zone functions. Following directions I >> found on a web site, I did the

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:44 PM, Peter Otten wrote: > Ray Jones wrote: > >> On 08/28/2012 11:06 AM, Peter Otten wrote: >>> Ray Jones wrote: >>> >>>> I'm working on another Python replacement for a Bash script, and I ran >>>> into a need for enhance

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 12:35 PM, Steven D'Aprano wrote: > On 29/08/12 03:41, Ray Jones wrote: >> I'm working on another Python replacement for a Bash script, and I ran >> into a need for enhanced time zone functions. Following directions I >> found on a web site, I did the

Re: [Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
On 08/28/2012 11:06 AM, Peter Otten wrote: > Ray Jones wrote: > >> I'm working on another Python replacement for a Bash script, and I ran >> into a need for enhanced time zone functions. Following directions I >> found on a web site, I did the following: >&g

[Tutor] Installing modules with easy_install

2012-08-28 Thread Ray Jones
mportError Traceback (most recent call last) /home/ray/ in () ImportError: No module named pytz In [2]: import pytz-2012d File "", line 1 import pytz-2012d ^ SyntaxError: inval

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-27 Thread Ray Jones
e the non-working call was misnamed a 'mjpeg' mux. ) Thanks for your help - I have a greater understanding of what's going on. When I'm 80, I might be able to claim guruship like you! ;) Ray ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-27 Thread Ray Jones
On 08/26/2012 07:12 AM, eryksun wrote: > On Sun, Aug 26, 2012 at 7:55 AM, Ray Jones wrote: >> [0x8d42554] stream_out_standard stream out error: no mux specified or >> found by extension >> [0x8d42134] main stream output error: stream chain failed for >> `standard{mux

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Ray Jones
On 08/26/2012 05:57 AM, Don Jennings wrote: > > On Aug 26, 2012, at 12:25 AM, tutor-requ...@python.org > <mailto:tutor-requ...@python.org> wrote: > >> Message: 2 >> Date: Sat, 25 Aug 2012 17:46:08 -0700 >> From: Ray Jones mailto:crawlz...@gmail.com>

Re: [Tutor] 2.7.3 Popen argument issues

2012-08-26 Thread Ray Jones
7; before the `#duplicate' . I think --sout adds a default combination if it doesn't find a proper argument. Unfortunately, I know a bit less about vlc command line arguments than I do about Python's generation of those arguments ;) I had or

[Tutor] 2.7.3 Popen argument issues

2012-08-25 Thread Ray Jones
Is there a method by which I can get an exact representation of command line arguments passed by Popen as seen by the called program? The argument error I receive shows me an argument that looks exactly like the argument that I use with Bash (it should - I copied and pasted it) - but the Bash versi

Re: [Tutor] 2.7.3 'CalledProcessError' error....why?

2012-08-24 Thread Ray Jones
On 08/24/2012 04:14 PM, Emile van Sebille wrote: > On 8/24/2012 3:36 PM Ray Jones said... >> My code: >> >>try: >> subprocess.check_call(['ping', '-w1', ip]) >>except CalledProcessError: >> print 'System'

[Tutor] 2.7.3 'CalledProcessError' error....why?

2012-08-24 Thread Ray Jones
My code: try: subprocess.check_call(['ping', '-w1', ip]) except CalledProcessError: print 'System', ip, 'is not responding. Exiting' sys.exit(4) else: return None The result: Traceback (most recent call last): File "./testing.py", line 222, in main() File "./testin

Re: [Tutor] Python working with Bash....arrrggggh!

2012-08-24 Thread Ray Jones
On 08/24/2012 12:02 AM, Steven D'Aprano wrote: > On 24/08/12 16:27, Ray Jones wrote: > >> I am forever confused, however, on which methods can be found where. I >> just spent quarter of an hour searching in sys,* os.*, and shutil.*. for >> a 'kill' command

Re: [Tutor] Python working with Bash....arrrggggh!

2012-08-23 Thread Ray Jones
On 08/23/2012 10:37 PM, eryksun wrote: > On Thu, Aug 23, 2012 at 11:55 PM, Ray Jones wrote: > >> For example, if I wish to test if a file exists, I might do >> >> test = Popen('[ -f file-i-want-to-test-for ]') >> >> But the moment I invoke Bash for

Re: [Tutor] Python working with Bash....arrrggggh!

2012-08-23 Thread Ray Jones
at seems much cleaner to me than testing to see if 'os.listdir' contains a specific file. Thanks. I am forever confused, however, on which methods can be found where. I just spent quarter of an hour searching in sys,* os.*, and shutil.*. for a 'kill' command that I knew I'

[Tutor] Python working with Bash....arrrggggh!

2012-08-23 Thread Ray Jones
he file, I have to test the opposite: 'if not test:' because Python sees the zero as False. Does it become second nature to work with these conflicts? Or do you find it more expedient bypass the OS shell and work almost exclusively with Python? Ray _

Re: [Tutor] What are all those letters after terminal commands?

2012-08-23 Thread William Ray Wing
On Aug 23, 2012, at 9:18 AM, Cecilia Chavana-Bryant wrote: > Hola, > > I'm going through the 'Command line crash course' by Zed Shaw, thanks to the > people that recommended this book, its quite a good course, I can see what > the author was going for with the title but if it wasn't for your

Re: [Tutor] subprocess.Popen help...thanks

2012-08-22 Thread Ray Jones
Thanks to all who responded. I'm deeply into some of the links provided, and my understanding has greatly increased. Ray On 08/22/2012 12:59 AM, Andreas Perstinger wrote: > On 22.08.2012 03:39, Ray Jones wrote: >> Does anyone know of a link to a really good tutorial that would h

  1   2   >