- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
8 Posted Topics
Re: When you first connect to the database you assign the connection object to the variable "con", later when you try using cursor() you use the variable "conn" instead, is this just a typo or is that the actual code you used? | |
Hi Guys and Gals! I come to you today requesting assistance! Let me explain what I am trying to do first, and then I will show you my code. The purpose is to read a list of regular expressions in from a text file (one regex per line, only about … | |
Re: A new line is printed when you use "print" by itself. [code=python] # The below will actually display "Alpha\n" print "Alpha" # You can place a comma after the statement to not send the newline, but it will add a space # The below will display: "Alpha Beta Gamma" print … | |
Re: Hah, this thread nudged me in studying more on sorting (more complex data structures) with Python. So I took a swing at it. These are the ones I came up with: [code=python] data = {'1234': ['Matt', '2.5', 'CS'], '1000': ['John', '4.0', 'Music'], '1023': ['Aaron', '3.1', 'PreMed'], '1001': ['Paul', '3.9', 'Music'], … | |
Re: It isn't PyInitialize, it is Py_Initialize, searching for it on docs.python.org will return a few results, such as the ones below. I have also included a bit of explanation regarding this particular function, which comes directly from the documentation. [url=http://docs.python.org/c-api/intro.html#embedding-python]Python/C API Reference Manual - Embedding Python[/url] [url=http://docs.python.org/extending/embedding.html]Extending and Embedding the … | |
Re: You are trying to test a single value against a list that is nested inside of a dictionary which won't work. You will need to test for the existence of the key in the dictionary first, then perform any tests on the list that comes after it. [code=python] def has_data(data, … ![]() | |
Re: Are you wanting to try and grep "HOOK" on a line by itself, or specifically just the first match? There are all sorts of things that you could actually want to know, although I am not sure which you are wanting. What exactly is it that you are needing to … | |
Re: Ah, I hate general terms! :P Could you provide sample data and what your expected outcome is? I am assuming you want to take each cell's parameter and document any change (growth or decay). Simplistic example: X = 5 Y = 5 Z = 5 You want to take the … |
The End.