Thank you all for the replies. I did not make myself clear.I don't want to access the database directly as that would be unsupported by Oracle.I mean Oracle forms which using in Oracle financials, and something that acts like a dumb clerk that takes information from a spreadsheet and puts it in the form.Similar to something that you use to put information into a website (I don't know how to do that either sadly).
On Friday, 23 March 2018, 16:00:13 GMT, <tutor-requ...@python.org> wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.python.org/mailman/listinfo/tutor or, via email, send a message with subject or body 'help' to tutor-requ...@python.org You can reach the person managing the list at tutor-ow...@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Tutor digest..." Today's Topics: 1. Matrix help (Connie Callaghan) 2. Re: Oracle forms (Peter Otten) 3. Re: Oracle forms (Mats Wichmann) 4. Re: Oracle forms (Alan Gauld) 5. Re: Matrix help (Peter Otten) 6. Re: Matrix help (Alan Gauld) 7. Matrix Multiplication user entries (Noor Alghanem) ---------------------------------------------------------------------- Message: 1 Date: Thu, 22 Mar 2018 11:35:05 +0000 From: Connie Callaghan <lfcfan2...@gmail.com> To: "tutor@python.org" <tutor@python.org> Subject: [Tutor] Matrix help Message-ID: <5ab394ed.177c1c0a.ac374.f...@mx.google.com> Content-Type: text/plain; charset="utf-8" Hi, I was just looking help for a matrix that I am building, it needs to look like this 1, 0, 0, ...,0 A,b,c,0,...,0 0,a,b,c,...,0 0,0,a,b,c,..0 0,0,0,a,b,c,...,0 0,0,0,0...0, 1 It has n rows and columns and the first and last line has to have 1s at the corners as shown, and a,b,c going diagonal and 0?s everywhere else, I am really struggling and it would be a great help to even be shown how to begin, Thanks Connie --- This email has been checked for viruses by AVG. http://www.avg.com ------------------------------ Message: 2 Date: Thu, 22 Mar 2018 18:35:17 +0100 From: Peter Otten <__pete...@web.de> To: tutor@python.org Subject: Re: [Tutor] Oracle forms Message-ID: <p90pcm$ra7$1...@blaine.gmane.org> Content-Type: text/plain; charset="ISO-8859-1" David Holland via Tutor wrote: > Is there anyway I can use Python to fill in an Oracle form rather than > typing it in myself.I.e take values from a .csv file and put them into an > Oracle form.Any ideas (I have googled it) what libraries to use? If I understand you correctly you want to enter data into a database, in bulk. For that you typically bypass any GUI, and connect to the database directly. With Python and Oracle that would look like http://www.oracle.com/technetwork/articles/dsl/python-091105.html As it is possible to do a lot of damage (provided you have the necessary credentials) I suggest that you discuss this with your IT department before you proceed. ------------------------------ Message: 3 Date: Thu, 22 Mar 2018 11:41:37 -0600 From: Mats Wichmann <m...@wichmann.us> To: tutor@python.org Subject: Re: [Tutor] Oracle forms Message-ID: <9c47487f-5664-2d7a-b99e-9ad0d581c...@wichmann.us> Content-Type: text/plain; charset=utf-8 On 03/22/2018 11:35 AM, Peter Otten wrote: > David Holland via Tutor wrote: > >> Is there anyway I can use Python to fill in an Oracle form rather than >> typing it in myself.I.e take values from a .csv file and put them into an >> Oracle form.Any ideas (I have googled it) what libraries to use? > > If I understand you correctly you want to enter data into a database, in > bulk. For that you typically bypass any GUI, and connect to the database > directly. With Python and Oracle that would look like > > http://www.oracle.com/technetwork/articles/dsl/python-091105.html > > As it is possible to do a lot of damage (provided you have the necessary > credentials) I suggest that you discuss this with your IT department before > you proceed. >From the Python viewpoint, no clue. Oracle Forms has its own API. Naturally, that requires a unique scripting language to use ("but it's easy to learn!"). Maybe if they were building it today they would use a known scripting language instead, who knows. And the API package has, I believe, add-on costs. It's Oracle, after all. ------------------------------ Message: 4 Date: Thu, 22 Mar 2018 18:08:53 +0000 From: Alan Gauld <alan.ga...@yahoo.co.uk> To: tutor@python.org Subject: Re: [Tutor] Oracle forms Message-ID: <p90rbg$el3$1...@blaine.gmane.org> Content-Type: text/plain; charset=utf-8 On 22/03/18 15:22, David Holland via Tutor wrote: > Is there anyway I can use Python to fill in an Oracle form What kind of Oracle form? There are at least 2 that I'm aware of. 1) The Oracle Forms thick client app framework which runs on a PC and connects to the database server. (I believe this is now obsolescent and no longer supported by Oracle?) 2) Web Forms built using the Oracle web server framework In either case it is usually better to access the database directly from Python rather than trying to write data into the GUI. The only case where the latter would be needed is if the Forms client implemented some kind of data processing prior to sending the data to the sever. If that is the case you can try the usual screen or web scraping options. But they are always messy and unreliable so should be a last resort. Check that there isn't an API you can use first. Also the OS and Python version may make a difference so let us know exactly what you need to do. Finally, there are literally dozens of other Oracle applications that all have forms interfaces (HR, CRM, ERM, Workflow, Middleware, Financials, Java, etc etc). So if it's not the database product you need to tell us that too. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ------------------------------ Message: 5 Date: Thu, 22 Mar 2018 19:11:11 +0100 From: Peter Otten <__pete...@web.de> To: tutor@python.org Subject: Re: [Tutor] Matrix help Message-ID: <p90rg1$nfi$1...@blaine.gmane.org> Content-Type: text/plain; charset="UTF-8" Connie Callaghan wrote: > Hi, > I was just looking help for a matrix that I am building, it needs to look > like this 1, 0, 0, ...,0 > A,b,c,0,...,0 > 0,a,b,c,...,0 > 0,0,a,b,c,..0 > 0,0,0,a,b,c,...,0 > 0,0,0,0...0, 1 > > It has n rows and columns and the first and last line has to have 1s at > the corners as shown, and a,b,c going diagonal and 0?s everywhere else, I > am really struggling and it would be a great help to even be shown how to > begin, Assuming you are not using numpy the easiest way is to start with a list of lists containing only zeros: >>> N = 5 >>> my_matrix = [[0] * N for row in range(N)] >>> my_matrix [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] This becomes a bit more readable with pprint: >>> from pprint import pprint >>> pprint(my_matrix) [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] You can then modify the matrix: >>> my_matrix[0][0] = my_matrix[-1][-1] = 1 >>> pprint(my_matrix) [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1]] For the other values use a for loop, like >>> for i in range(1, N): ... my_matrix[i][i-1] = 42 ... >>> pprint(my_matrix) [[1, 0, 0, 0, 0], [42, 0, 0, 0, 0], [0, 42, 0, 0, 0], [0, 0, 42, 0, 0], [0, 0, 0, 42, 1]] Oops, one more 42 than b-s in your example. Looks like you need to adjust the range() arguments. ------------------------------ Message: 6 Date: Thu, 22 Mar 2018 18:14:16 +0000 From: Alan Gauld <alan.ga...@yahoo.co.uk> To: tutor@python.org Subject: Re: [Tutor] Matrix help Message-ID: <p90rlj$3ck$1...@blaine.gmane.org> Content-Type: text/plain; charset=utf-8 On 22/03/18 11:35, Connie Callaghan wrote: > Hi, > I was just looking help for a matrix that I am building, it needs to look > like this > 1, 0, 0, ...,0 > A,b,c,0,...,0 > 0,a,b,c,...,0 > 0,0,a,b,c,..0 > 0,0,0,a,b,c,...,0 > 0,0,0,0...0, 1 What exactly are the a,b,c values? Are they variables or literal characters? Or something else? Also, how many cells do the ... represent? Do you know in advance? or are they dynamically calculated? If the latter then based on what? The first and last rows are completely different - no a,b,c values - how are they determined? ie How do you know you have reached the last row? We need a much more rigorous specification. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ------------------------------ Message: 7 Date: Thu, 22 Mar 2018 23:02:51 -0700 From: Noor Alghanem <nooralghan...@gmail.com> To: tutor@python.org Subject: [Tutor] Matrix Multiplication user entries Message-ID: <caepupg6agzd+45hrho+qirmudfbnugphfwje3yfu6nguchx...@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Hello, I am trying to write a program that is basically multiplying two matrices one of size 1x8 and the other one of size 8x4. The different thing that I am trying to figure out is that I want the program to ask the user to enter the values for the 1x8 matrix only which will be used in the multiplication process. How do I do that, please provide an example as I wasn't able to find one online that works. Also, if you can please include an example of matrix multiplication that is similar in idea to what I am trying to write. Thank you ------------------------------ Subject: Digest Footer _______________________________________________ Tutor maillist - Tutor@python.org https://mail.python.org/mailman/listinfo/tutor ------------------------------ End of Tutor Digest, Vol 169, Issue 17 ************************************** _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor