Re: how raspi-idle3 configure?
Egon Mueller online.de> writes: > > Where can read a beginner so simple things about handling the python 3 > idle3? I don't think about python programming, only about better > handling the ide. > This link might be of some help... https://hkn.eecs.berkeley.edu/~DYOO/python/idle_intro/index.html HTH, Monte -- https://mail.python.org/mailman/listinfo/python-list
Re: Who uses IDLE -- please answer if you ever do, know, or teach
On 08/07/2015 04:29 AM, tjohnson wrote: On 8/6/2015 7:31 PM, Terry Reedy wrote: What 1 or 2 features would you most like to see? Practically, I'd say a line number margin and right edge indicator. Theoretically, a tabbed editor and dockable interpreter pane. YES!!! and yes to the above. Some built-in support for style/syntax checking i.e. PEP8, pylint would be very nice (in my mind) for helping new users understand where some of the problems are in their code. Maybe not enabled by default, but available in the options for those who want it. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: Creating a Virtual Environment
Generally when using Anaconda, they recommend you use their tool (conda) which works very well. It kind of incorporates the functions of pip and virtualenv together. If you already have the path to the anaconda python prepended to your path, the source...activate command shouldn't really be doing anything unless you specifically created an environment (using conda) named 'anaconda' - but it would stowed under ~/anaconda3/envs/'... Have you looked at the conda docs yet? http://conda.pydata.org/docs/index.html How to go from something local in an isolated virtual environment (whether created with virtualenv or conda) to something you can distribute is a separate question, which I can't really help much. -- https://mail.python.org/mailman/listinfo/python-list
Re: installing libraries like numpy scipy matplotlib
On 07/04/2015 07:58 AM, Jens Thoms Toerring wrote: PIYUSH KUMAR wrote: I have never used linux in my life.. only windows based computing.. So I have problems in installing third party libraries in python. It depends. One question is if there's already a ready-for-use package for the third party library you want to install. If that is the case then the next question is which distro you're using I could be wrong, but I think the point was that he's not using Linux, while the majority of instructions for getting and using various scientific libraries for Python assume that the user *is* using Linux. One option would be to run Linux from a VM... but another would be to use a 'packaged' version of Python such as Anaconda * or Enthought ** - they come ready to go with all the more popular scientific packages installed. They go to some lengths to address issues of package compatibility and dependencies - something that can be more of a pain on Windows than on Linux. * http://continuum.io/downloads ** https://www.enthought.com/products/epd/ -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: New to Python - block grouping (spaces)
On 04/16/2015 11:08 AM, alister wrote: On Thu, 16 Apr 2015 08:01:45 -0700, Blake McBride wrote: As a side note, I bought a few books on Python from Amazon for use on my Kindle. At least one of the books has the formatting for the Kindle messed up rendering the meaning of the program useless. Case in point. Blake A poor quality book You can write bad books for any language I do sympathise as this is something you cannot easily tell before purchase (although there as so many good guides available on line I don't think there is much benefit in buying a book) Some publishers are worse about this than others. Packt (www.packtpub.com) has some decent material, but absolutely incompetent when it comes to formatting python code in a Kindle .mobi file. I don't think I've ever seen *any* errata published for any of their books. I long since decided that anything I see from Packt that I want to read... I might find it on Amazon, but I go to Packt's site and purchase the PDF. They have a harder time screwing that up, apparently. O'Reilly, on the other hand, gets it right. Period. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: New to Python - block grouping (spaces)
On 04/16/2015 07:52 AM, Blake McBride wrote: Thanks for all the responses. I especially like the Pike pointer. To be clear: 1. I don't think languages should depend on invisible elements to determine logic. 2. Having been an employer, it is difficult to force programmers to use any particular editor or style. Different editors handle tabs and spaces differently. This is all a bloody nightmare with Python. 3. Languages that use braces (or the like) can be run through a program beautifier to correct the indentation. You are just screwed in Python. So, Python may be a cute language for you to use as an individual, but it is unwieldy in a real development environment. 4. Language beautifiers used on bracey languages removes all arguments in favor of an off-side language. Blake McBride While I certainly don't have your background or depth of experience... do you really think that over the last 20 odd years that Python has been around that #2 and #3 have not been hammered out? Honestly, this is starting to smell more and more like a troll... -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: anaconda bug?
On 03/17/2015 09:51 AM, George Trojan wrote: On 03/16/2015 11:47 PM, memilanuk wrote: Might be just you... monte@machin-shin:~$ python Python 3.4.3 |Continuum Analytics, Inc.| (default, Mar 6 2015, 12:03:53) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> tkinter.Tk() >>> Just for the heck of it I created a new venv (using conda create -n test) and tried it again. Same thing. How are you creating your venv? Monte Hmm. I tried on the different system (Fedora 20), with Python 3.4.2. Same results: dilbert@gtrojan> python Python 3.4.2 |Continuum Analytics, Inc.| (default, Oct 21 2014, 17:16:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> tkinter.Tk() >>> dilbert@gtrojan> which pyvenv /usr/local/miniconda3/bin/pyvenv dilbert@gtrojan> pyvenv --system-site-packages ~/test dilbert@gtrojan> source ~/test/bin/activate (test) dilbert@gtrojan> python Python 3.4.2 |Continuum Analytics, Inc.| (default, Oct 21 2014, 17:16:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> tkinter.Tk() Traceback (most recent call last): File "", line 1, in File "/usr/local/miniconda3/lib/python3.4/tkinter/__init__.py", line 1851, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: Can't find a usable init.tcl in the following directories: /opt/anaconda1anaconda2anaconda3/lib/tcl8.5 /home/gtrojan/test/lib/tcl8.5 /home/gtrojan/lib/tcl8.5 /home/gtrojan/test/library /home/gtrojan/library /home/gtrojan/tcl8.5.15/library /home/tcl8.5.15/library This probably means that Tcl wasn't installed properly. >>> I suspect faulty logic: pyvenv does not copy/links the tcl/tk libraries to the newly created directory. When I run python directly, the second directory to search is /usr/local/miniconda3/lib/tcl8.5, where conda puts its tcl version. In virtual environment, the path is replaced and tkinter fails. So the other fix would be to manually create symlinks after running pyvenv, or modify Continuum Analytics pyvenv to do that. There is no issue with pyvenv when Python is built from the source, the first directory in the path is where tcl is found by configure and that does not change in virtual environment. I found another similar bug report here: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/Q9xvJT8khTs Looks this has not been fixed. Well, it might be worth poking them and seeing if you get any response. What happens if you create a venv using conda? Is there some particular reason you're using Anaconda but not using its tools for managing virtualenvs? I get it that pyenv should work, but it might be useful to isolate it further to tell if its just pyenv, or something else. I don't have any experience with pyenv myself, sorry. HTH, Monte -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: anaconda bug?
Might be just you... monte@machin-shin:~$ python Python 3.4.3 |Continuum Analytics, Inc.| (default, Mar 6 2015, 12:03:53) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> tkinter.Tk() >>> Just for the heck of it I created a new venv (using conda create -n test) and tried it again. Same thing. How are you creating your venv? Monte -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Picking apart a text line
So... okay. I've got a bunch of PDFs of tournament reports that I want to sift thru for information. Ended up using 'pdftotext -layout file.pdf file.txt' to extract the text from the PDF. Still have a few little glitches to iron out there, but I'm getting decent enough results for the moment to move on. I've got my script to where it opens the file, ignores the header lines at the top, then goes through the rest of the file line by line, skipping lines if they don't match (don't need the separator lines) and adding them to a list if they do (and stripping whitespace off the right side along the way). So far, so good. # rstatPDF2csv.py import sys import re def convert(file): lines = [] data = open(file) # Skip first n lines of headers for i in range(9): data.__next__() # Read remaining lines one at a time for line in data: # If the line begins with a capital letter... if re.match(r'^[A-Z]', line): # Strip any trailing whitespace and then add to the list lines.append(line.rstrip()) return lines if __name__ == '__main__': print(convert(sys.argv[1])) What I'm ending up with is a list full of strings that look something like this: ['JOHN DOEC T HM 445-20*MW* 199-11*MW* 194-5 1HM 393-16*MW* 198-9 1HM198-11*MW*396-20*MW* 789-36*MW* 1234-56 *MW*', Basically... a certain number of characters allotted for competitor name, then four or five 1-2 char columns for things like classification, age group, special categories, etc., then a score ('445-20'), then up to 4 char for award (if any), then another score, another award, etc. etc. etc. Right now (in the PDF) the scores are batched by one criterion, then sorted within those groups. Makes life easier for the person giving out awards at the end of the tournament, not so much for someone trying to see how their individual score ranks against the whole field, not just their group or sub-group. I want to be able to pull all the scores out and then re-sort based on score - mainly the final aggregate score, but potentially also on stage or daily scores. Eventually I'd like to be able to calculate standardized z-scores so as to be able to compare scores from one event/location against another. So back to the lines of text I have stored as strings in a list. I think I want to convert that to a list of lists, i.e. split each line up, store that info in another list and ditch the whitespace. Or would I be better off using dicts? Originally I was thinking of how to process each line and split it them up based on what information was where - some sort of nested for/if mess. Now I'm starting to think that the lines of text are pretty uniform in structure i.e. the same field is always in the same location, and that list slicing might be the way to go, if a bit tedious to set up initially...? Any thoughts or suggestions from people who've gone down this particular path would be greatly appreciated. I think I have a general idea/direction, but I'm open to other ideas if the path I'm on is just blatantly wrong. Thanks, Monte -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: 'Lite' Databases (Re: sqlite3 and dates)
On 02/18/2015 09:16 PM, Ben Finney wrote: memilanuk writes: In the past I've been waffling back and forth between a desktop client/server setup, or a web-based interface with everything on one computer. At this point I'm leaning toward the latter. So, it's been many exchanges back and forth, and you still aren't telling us what specific needs you have that SQLite can't provide. At this point I'm just going to have to wait until you can lay out the specifics. Okay, let me put it like this: if I set up a web interface using Flask for the front-end, and SQLite as the backend DB, running from a PC/laptop, with anywhere from 1 to 10 people doing data entry from other devices (laptops, desktops, tablets, etc.) at roughly the same time, is SQLite going to be 'concurrent' enough? -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: 'Lite' Databases (Re: sqlite3 and dates)
On 02/18/2015 08:36 PM, Ben Finney wrote: memilanuk writes: They would need to be able to set up the application (and whatever database) on their laptop or PC, wherever that may be, and spend their time administering the event, not the database engine. So, the database will only be accessed by exactly one application, on exactly the same machine and storage as the application? If so, you don't need concurrency. Otherwise, your database needs concurrency; and the person installing the database will need to make a lot of decisions about the specific network environment and devices to be allowed to access the database. But is this what you mean by your requirements not being met by SQLite? In the past I've been waffling back and forth between a desktop client/server setup, or a web-based interface with everything on one computer. At this point I'm leaning toward the latter. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: 'Lite' Databases (Re: sqlite3 and dates)
On 02/18/2015 08:09 PM, Ben Finney wrote: I have a hard time picturing that few people stressing a modern computer system enough to where SQLite couldn't keep up (thinking web-based interface using Flask or something similar). In the latter case, one of the over-arching priorities is that it be easily distributable, as in that people with relatively little knowledge of a database be able to set it up and run it. Set it up where? Are you hoping that a network-accessible service can be set up without knowledge of the specific concurrent authenticated networked access is needed in each installation? They would need to be able to set up the application (and whatever database) on their laptop or PC, wherever that may be, and spend their time administering the event, not the database engine. Once its set, it shouldn't need any tending, or they are going to be SOL as I wouldn't be able to help them. It may be that Flask + SQLite will be enough; otherwise I foresee a disproportional amount of *my* time will be spent documenting and explaining how to set up and maintain a RDBMS on Windows, on a Mac, etc. Starting to wonder if a pre-configured VM appliance running in Virtualbox might be simpler for the end user to set up and run. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: 'Lite' Databases (Re: sqlite3 and dates)
On 02/18/2015 04:03 PM, Ben Finney wrote: Is there anything *good* that sits in between the two extremes of SQLite and PostgreSQL? What do you need a RDBMS to do, and what do you not need? The answers to those questions vary hugely between different people (and most people probably don't think too deeply about them). They will determine what “good” means for your case. Is there nothing that amounts to a 'PostgreSQLite'? PostgreSQL itself fits that mould quite well; it is quite capable of serving a small footprint while still offering full concurrency. I don't know of a free-software concurrent RDBMS which can be considered lighter than that. (No, MySQL doesn't count; its concurrency is *unreliable* and it commonly loses data silently. Don't use MySQL.) But perhaps you don't need concurrency? Only you can tell us. At this point... I don't think concurrency is going to be a major requirement for what I have in mind. For one project, only a few people will be writing to the DB, and only by a stroke of luck would it be at the same time, and it would be very unlikely that they would be modifying the same record at the same time due to physical constraints. For the other... there may be anywhere from 1-10 (maybe more, but doubtful) entering data (creating new records for competitors, or entering existing competitors in a tournament). I have a hard time picturing that few people stressing a modern computer system enough to where SQLite couldn't keep up (thinking web-based interface using Flask or something similar). In the latter case, one of the over-arching priorities is that it be easily distributable, as in that people with relatively little knowledge of a database be able to set it up and run it. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
'Lite' Databases (Re: sqlite3 and dates)
On 02/18/2015 02:52 PM, Ethan Furman wrote: Chris also wrote: But SQLite3 is *not* great if you look on it as a database engine comparable with DB2, PostgreSQL, and even MySQL. Sure, the LITE in SQLite means you don't get some things. There is still a huge amount of software that doesn't need concurrency and can benefit from it. Having installed Postgres I can say there is definitely a cost to install it, use it, maintain it, etc... especially if you aren't steeped in it and have to look things up every time you have to make a change (how do I add a user again?). I think the general advice should be: if you are writing a single-user application that happens to need SQL services, check out SQLite; if you are writing a multi-user or concurrent SQL application, check out Postgres. Okay... this might be a question with a blindingly obvious answer, but I haven't seen any recommendations otherwise so I'll ask anyway ;) Is there anything *good* that sits in between the two extremes of SQLite and PostgreSQL? I've tinkered with MySQL years ago (in conjunction with PHP) and was a little unhappy with some of the things it either didn't implement fully (foreign keys) or silently ignored (check constraints). PostgreSQL, to me, is orders of magnitude harder to set up and maintain, though. And then there is SQLite, which does 99% of what I want it to do other than network use. I see other DB names such as DB2, Oracle, MS SQL Server, etc. out there but the only other 'free' one seems to be Firebird? Is that really the only other contender? Is there nothing that amounts to a 'PostgreSQLite'? -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: Begginer Question , what i need for web app and site
On 01/09/2015 05:53 AM, meiry...@gmail.com wrote: Hello all coming from java and c++ now going with python what setup do i need to run full python stack for web application . what i need is web framework and back-end . what usually be in the java world tomcat and servlets or jsp and pure java backend for processing data . what will be the Equivalent in python world ? Thanks! http://www.fullstackpython.com/ -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: Question on lambdas
On 12/08/2014 09:30 PM, Ben Finney wrote: memilanuk writes: ... lambda: update_label2('A', 100) would this work the same? (I don't know what you mean here by “the same”; the same as what?) The above creates a new function, which expects no parameters (because there are no parameters before its ‘:’). The function, when called, will return the value of the expression ‘update_label2('A', 100)’. It looks as though it'd be passing the same two parameters to the same function... Yes, it looks that way, and that's what it does. The parameters are fixed in the expression and will be the same each time the new function is called. lambda: 'A', 100: update_label2() This is a syntax error. Have you tried experimenting with these? Carefully read the reference material on the ‘lambda’ syntax, and create some functions and experiment with them. Fair enough. What I was trying to do when I got into all this was something like this: import tkinter as tk root = tk.Tk() root.wm_title('Radio Buttons') label1 = tk.Label(root) label1.config(text='Please select an option below.') label1.pack() def update_label2(option, value): selection = "current selection is: \n\n" + str(option) + ": " + str(value) label2.config(text=selection) var = tk.IntVar() var.set(100) R1 = tk.Radiobutton(root, text='A', value=100, variable=var, command=lambda: update_label2('A', 100)) R1.pack(anchor='center') R2 = tk.Radiobutton(root, text='B', value=80, variable=var, command=lambda option='B', value=80: update_label2()) R2.pack(anchor='center') R3 = tk.Radiobutton(root, text='C', value=60, variable=var, command=lambda: update_label2('C', 60)) R3.pack(anchor='center') label2 = tk.Label(root) label2.config(text='Current selection is: \n \nA: 100') label2.pack() root.mainloop() So to me, the purpose of 'lambda' in this case is to call a function when a particular widget - in this case a radio button - is clicked. Thats why I wondered if 'lambda: update_label2('A', 100)' - where I'm using lambda to call another function, with the parameters inside the parentheses, was equivalent to 'lambda 'A', 100: update_label2()' where I would be using lambda to 'feed' the parameters to the function. I see what you mean about the syntax error = it should be 'lambda option='A', value=100:update_label2()' but even then it doesn't really work as the update_label2 function complains about not being given any values at all. File "/home/monte/Dropbox/Code/python/sandbox/reddit.py", line 31, in command=lambda option='B', value=80: update_label2()) TypeError: update_label2() missing 2 required positional arguments: 'option' and 'value' -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: Question on lambdas
On 12/08/2014 03:58 PM, Ben Finney wrote: memilanuk writes: What I'm having trouble finding a concrete answer to is the difference between: lambda: some_expr This creates a new function which expects zero parameters. The function, when called, will return the value of ‘some_expr’. lambda x: some_expr This creates a new function which expects one positional parameter named ‘x’. The function, when called, will return the value of ‘some_expr’. so in the first example in my original post: ... lambda: update_label2('A', 100) would this work the same? It looks as though it'd be passing the same two parameters to the same function... lambda: 'A', 100: update_label2() Also, in my second example: class MyText(Text): def __init__(self, master, **kw): apply(Text.__init__, (self, master), kw) self.bind("", lambda e: "break") (from the page @ http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm, if anyone cares) I'm kind of missing what 'e' is and where its defined and what it's supposed to be passing to "break"...? The whole bind method for classes and instances is a wee bit above my pay grade right about now; but I happened to stumble upon this example when I went looking for more info on lambda :/ lambda x=some_value: some_expr This creates a new function which expects one parameter named ‘x’, which parameter has a default value of ‘some_value’. The function, when called, will return the value of ‘some_expr’. I was reading in 'Programming Python 4th ed' by Lutz and he talks about something to do with default values vs. enclosing scopes... that something like: lambda x=x: some_expr when evaluated inside a function loop to create buttons, etc., causes 'x' to be evaluated as the default value at the function creation time, vs. when the function is actually called. Do I have that more or less correct? TIA, Monte -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Question on lambdas
So... I was browsing some questions on reddit, and one of them involved tkinter and lambdas. Managed to help the person out, but in the process ended up with more questions of my own :/ My basic confusion revolves around this: in one instance I see things like the following: R1 = tk.Radiobutton(root, text='A', value=100, variable=var, command=lambda: update_label2('A', 100)) and in another example I see things like this: class MyText(Text): def __init__(self, master, **kw): apply(Text.__init__, (self, master), kw) self.bind("", lambda e: "break") What I'm having trouble finding a concrete answer to is the difference between: lambda: some_func lambda e: some_func lambda e=e: some_func Any help would be greatly appreciated. TIA, Monte -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Programing for the Absoulte Beginner
On 08/02/2014 10:20 PM, Steve Hayes wrote: there are no books available on Python 3 (I don't regard downloadable PDFs > or other onlines stuff as "books"). That's a very broad... and very *wrong* statement. -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: "Full stack python" should be linked on python.org
On 07/26/2014 01:20 PM, Tymoteusz Jankowski wrote: Hi! Anyone shares my opinion that www.fullstackpython.com <http://www.fullstackpython.com> should be referenced here <https://www.python.org/about/apps> or at least here <https://wiki.python.org/moin/WebProgramming> ? What do you think? It's great source for python web newbies (and not only). I'd say 'yes'... definitely a good resource as it continues to be fleshed out. One can only hope it stays updated and relatively 'fresh' over time. Just out of curiosity... does anyone else see the irony of a site all about 'full stack python' being built using a static-site generator like pelican? Arguably the right tool for the job, but still, it made me smile ;) -- Shiny! Let's be bad guys. Reach me @ memilanuk (at) gmail dot com -- https://mail.python.org/mailman/listinfo/python-list
Re: Best place to find sample data
On 07/26/2014 09:57 AM, Irmen de Jong wrote: On 26-7-2014 15:41, Nicholas Cannon wrote: Hey I need some sample data to test out and do stuff with. Also I am having strange errors with idle when i load a .txt file read it and then print it, idle crashes well kind of freezes. Not sure what is wrong here. Also I am having troubles with Numpy and its loadtxt function: ValueError: cannot set an array element with a sequence So all i need is a good site to download some data from and maybe some fixes for these problems. First hit when googling for 'testdata generator site': http://www.generatedata.com/ The search produces various other useful looking sites. Another option, driven by python... https://github.com/joke2k/faker -- https://mail.python.org/mailman/listinfo/python-list
Re: I want to do something with data
On 07/23/2014 03:20 PM, Nicholas Cannon wrote: Hey i am interested in using data in my programs. I know every program uses data but i want to do like large data processing and pick results out of a data like querying database. I dont really know what this is called though. Is it data analytics? im not sure but I would like to do this stuff. What would i need to learn because i know the basic file opening and stuff and also know how to open csv files aswell as grab data from the web. I dont know much else about handling data other than regular expressions which is handy when grabbing data from the web. I f any one could like guide me on what to learn that would be so good. Python for Data Analysis http://shop.oreilly.com/product/0636920023784.do Think Stats http://shop.oreilly.com/product/0636920020745.do Learning IPython for Interactive Computing and Data Visualization http://shop.oreilly.com/product/9781782169932.do -- https://mail.python.org/mailman/listinfo/python-list
Re: Network/multi-user program
On 07/21/2014 11:26 AM, Chris Angelico wrote: On Tue, Jul 22, 2014 at 4:16 AM, Monte Milanuk wrote: On 2014-07-21, Chris Angelico wrote: On Tue, Jul 22, 2014 at 2:07 AM, Monte Milanuk wrote: So I guess I'm asking for advice or simplified examples of how to go about connecting a client desktop app to a parent/master desktop app, so I can get some idea of how big of a task I'm looking at here, and whether that would be more or less difficult than trying to do the equivalent job using a web framework. Easier way: Don't have a "master desktop app", but instead have a master database. Since you're posting this to python-list, I'll assume you currently intend writing this in Python; you can make a really simple transition from single-user-single-desktop to a networked system, although of course you'll want to think in terms of multiple users from the start. So... if everybody is using the same application to access the same database, how would you prevent say, a data entry user from accidentally breaking something above their pay-grade? Set up some sort of role-based privilege system to limit them to write access for some portions and read-only for others? That would be one way, yes. The first question you'd need to ask is: How do you know who's data-entry and who's admins? As soon as you solve that (probably with some sort of login), you tie the access level to that. Given the small user base and the nature of the events, volunteer staff, everybody knowing everybody, etc. its pretty much a matter of the match admin saying "You, you and you - data entry" ;) If you need absolute security, you would have the user enter a login and password which would actually be the database credentials. Then you grant exact rights in the database manager, permitting ONLY what that user is allowed to do. It's then utterly impossible, even for someone who knows Python and SQL, to do damage. Intriguing... and probably the most technically correct way as far as role-based access. But also very unlikely that most of the end-users would be able to set up the DB correctly. Just sayin'... But more likely, what you really want is a cut-down UI that simplifies things: if the user is data-entry level, you take away all the admin-type options. It might be possible to fiddle around in internals and gain elevated access, but that's not an issue in many environments. That sounds very much like what I'm thinking of... maybe a token nod @ security with a passwd for 'admin' and 'data-entry' roles to keep idle passers-by from snooping or diddling with things they shouldn't. Even if it just greyed-out / disabled buttons, tabs, etc. based on role that would probably meet needs. In any case, these are issues you'd need to figure out regardless of the development model. Ultimately, you could treat the entire computer, network, database, etc as a black box, and just look at two entities: the human, and the UI s/he is using. All permissions issues can be explained at that level. Not really clear on what you're talking about on this part... Monte -- https://mail.python.org/mailman/listinfo/python-list
Re: OT: usenet reader software
On 07/18/2014 02:45 PM, Sturla Molden wrote: memilanuk wrote: Used leafnode way back when... correct me if I'm wrong, but if memory serves its a small news spool /server, not really a client/reader type application. Used to be popular back before slrnpull came about. Leafnode is an NNTP proxy server. It allows you to filter messages on headers, etc. Just run Leafnode and tell Thunderbird to use localhost as NNTP server. Whomever you plonk with Leafnode's killfilter will never be seen in Thunderbird. Ah... I see. Guess I never explored that facet of leafnode's functionality. Thanks, Monte -- https://mail.python.org/mailman/listinfo/python-list
Re: OT: usenet reader software
On 07/18/2014 01:46 PM, Sturla Molden wrote: Guess where I'm going with this is... is there anything out there worth trying - on Linux - that I'm missing? leafnode Used leafnode way back when... correct me if I'm wrong, but if memory serves its a small news spool /server, not really a client/reader type application. Used to be popular back before slrnpull came about. -- https://mail.python.org/mailman/listinfo/python-list
Re: OT: usenet reader software
On 07/18/2014 12:34 PM, Andrew Berg wrote: On 2014.07.18 14:10, memilanuk wrote: I'm on Ubuntu (14.04 LTS, if it matters) and I've been using Thunderbird for a lng time... I've tinkered with slrn off and on over the years, tried pan occasionally due to recommendations... but I keep ending up back @ Thunderbird. About the only thing it doesn't do that I really want is scoring/kill-files. Tools -> Message Filters... Yeah... never seems to work quite the same - or consistently. -- https://mail.python.org/mailman/listinfo/python-list
OT: usenet reader software
Given the ongoing hub-bub about Google Groups and some recent long threads where I *really* wanted to be able to mute/ignore certain individuals/subjects... I started looking into other choices for Usenet reader software again. I use news.gmane.org as a mail2news gateway for reading a lot of lists besides just this one, and gmane is about the most convenient way to do so without being bombarded by emails every day. I'm on Ubuntu (14.04 LTS, if it matters) and I've been using Thunderbird for a lng time... I've tinkered with slrn off and on over the years, tried pan occasionally due to recommendations... but I keep ending up back @ Thunderbird. About the only thing it doesn't do that I really want is scoring/kill-files. Slrn has those, and I do use vim on occasion so that worked well enough... but when people *do* post links or html it didn't handle that stuff gracefully like Thunderbird. Pan... locks up and crashes often enough to be annoying, and I can't get it to display 'Threads with Unread' (i.e. new unread posts *with* their associated threads for context) - just 'Unread' or 'everything'. Never messed with gnus... emacs was never really my thing. Guess where I'm going with this is... is there anything out there worth trying - on Linux - that I'm missing? -- https://mail.python.org/mailman/listinfo/python-list
Re: Shared web hosting where python is *not* a second class citizen
On 05/25/2014 10:29 AM, Tim Golden wrote: On 25/05/2014 18:25, memilanuk wrote: So I'm left wondering if there is someplace that people here would recommend (for this kind of plan or others) where python isn't a second class citizen. Really not interested (for my current uses) in a VPS. I just want some place where it doesn't feel like python support is some sort of bone thrown out there just to say that they 'support' python. Webfaction. Without a doubt Wow! Webfaction looks like it is *exactly* what I'm looking for. Thanks, Monte -- https://mail.python.org/mailman/listinfo/python-list
Shared web hosting where python is *not* a second class citizen
Right now we have a fairly basic shared hosting plan via bluehost.com, running WordPress for a club web site. I've looked at setting up python on this account, but the default is the version of python that comes with the OS (CentOS 5.x currently). There are some basic instructions on upgrading that at a user level to 2.7... but nothing for python3, and most of the python posts in their user forums go unanswered. Not exactly confidence inspiring! The irony is that one of my web searches included a review of shared hosting and listed BlueHost as the number one recommendation! So I'm left wondering if there is someplace that people here would recommend (for this kind of plan or others) where python isn't a second class citizen. Really not interested (for my current uses) in a VPS. I just want some place where it doesn't feel like python support is some sort of bone thrown out there just to say that they 'support' python. Monte -- https://mail.python.org/mailman/listinfo/python-list
Re: Python example source code
On 01/12/2014 06:37 AM, ngangsia akumbo wrote: where can i find example source code by topic? Any help please nullege.com is usually helpful... -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing Python 3.3.2 pip
On 11/17/2013 01:56 AM, Nikos wrote: python3.4 is gone at this stage. Now if i only could install pip for Python 3.3.2 Here is what i have tried: root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# which pip /usr/bin/pip root@secure [~]# yum install pip3 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.secrel.com.br * epel: mirror.imt-systems.com * extras: centos.secrel.com.br * remi: mirror5.layerjet.com * updates: mirrors.ucr.ac.cr Setting up Install Process No package pip3 available. Error: Nothing to do Where to find 'pip3' for Python 3.3.2? Maybe you could ask the exact same question one more time...? -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Practice Problems
On 11/03/2013 06:06 PM, yungwong@gmail.com wrote: Hi, who has some problems to practice using Python? Thx a lot! http://projecteuler.net/ is always a good bet -- https://mail.python.org/mailman/listinfo/python-list
Re: CRUD library
On 09/30/2013 03:14 AM, AdamKal wrote: Hi, Do you know any library or framework that unifies CRUD somehow. Sounds kind of like the DAL (Data Abstaction Layer/Language) from web2py, perhaps? I think I've heard of it being able to be used outside a regular web2py install... not sure, haven't tried it myself. HTH, Monte -- https://mail.python.org/mailman/listinfo/python-list
Re: better and user friendly IDE recommended?
On 09/12/2013 02:15 PM, Adrián Espinosa wrote: I suggest you to use IntelliJ IDEA. It has a plugin for Python and Django (web framework). It works flawlessly. If one were inclined to go that route, wouldn't PyCharm typically be a better choice? -- https://mail.python.org/mailman/listinfo/python-list
Re: Can someone suggest better resources for learning sqlite3? I wanted to use the Python library but I don't know sql.
On 08/03/2013 10:57 AM, Aseem Bansal wrote: > I was writing a Python script for getting the user stats of a > website(Specifically codereview.stackexchange). I wanted to store the > stats in a database. I found Python3's sqlite3 library. I found that > I needed sql commands for using it. > > I have tried sql.learncodethehardway but it isn't complete yet. I > tired looking on stackoverflow's sql tag also but nothing much > there. Can someone suggest me better resources for learning > sql/sqlite3? > https://www.youtube.com/watch?v=__eI1sbEfLw&feature=c4-overview-vl&list=PLAA9B7C174493EC68 The same author has some other videos on working with sqlite in general, sql, etc. that may also prove useful. -- http://mail.python.org/mailman/listinfo/python-list
Re: Using system python vs. updated/current version
On 07/31/2013 12:17 PM, Prasad, Ramit wrote: > You should be able to install both Python 2 and 3 in most modern > Linux distributions (at the same time). I would not change the system > Python version. I hadn't really planned on mucking with the system python... I recall from a long while back (on Mac OSX) as that being a Bad Thing ;) But that is kind of (one of) the question(s) here... I presume it is 'possible' to run a local version of python, installed in the user's home directory... just curious if its worth the hassle. > If you are not blocked from running Python 3 by some necessary > dependency then you should use it. Otherwise, use the most > recent Python version you can. Are there any significant flaws with v.3.3.0 that would necessitate upgrading to the most recent version (3.3.2?) The only 'dependency' I have as far as 2.7.x is concerned is that I've become rather accustomed to using spyder (IDE)... which at this point doesn't support python3 - definitely a bummer. > On a personal machine, I would install some things like pip/virtualenv > (/numpy maybe) to system packages directory but keep most packages in > a project specific directory (i.e. virtualenv). What about larger gui toolkits like PyQt? Some material I browsed (skimmed) indicated that it wasn't quite as simple to run straight from a virtualenv...? How much of a pain are virtualenvs when working from an IDE? -- http://mail.python.org/mailman/listinfo/python-list
Using system python vs. updated/current version
Hello there, What would be considered the correct/best way to run a current release of python locally vs. the installed system version? On openSUSE 12.3, the repos currently have 2.7.3 and 3.3.0. As far as I know, I'm not really hitting any limitations with the existing versions - my skills just aren't that far along - so its not a burning 'need' but I'm still curious/interested in the topic. Also... in some places in the 'Net I see references to installing everything 'locally' via pip, etc. in virtualenvs and not touching the system installed version of python... yet most linux distros seem to have many/most such packages available in their package repos, which seems like it'd be easier to install via the package manager and let it keep things updated. Could someone touch on what they feel the pros and cons would be either way? Thanks, Monte -- http://mail.python.org/mailman/listinfo/python-list
Re: Stack Overflow moderator “animuson”
On 07/10/2013 05:39 AM, Joshua Landau wrote: On 10 July 2013 13:35, Skip Montanaro wrote: Either that or it's funny only to other Australians. Or the Dutch. Or us Brits. Or the Yanks... Normally I kill-file threads like this pretty early on, but I have to admit - I'm enjoying watching y'all play with the troll this time ;) -- http://mail.python.org/mailman/listinfo/python-list
Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?
On 07/04/2013 06:23 AM, Aseem Bansal wrote: I want to start GUI development using Tkinter in Python 2.7.5. I have been searching all over google but couldn't find any IDE that has drag-and-drop feature for Python GUI development. For Tkinter, no luck. The general consensus always seems to be that Tkinter and/or apps written using it tend to be simple enough to not really need that much 'help'. Being a new(er) user I kind of disagree, as I think having to 'hand code' everything for the gui library included with Python detracts somewhat from its appeal to new users in that particular area. Qt Creator is available for PyQt, which may be a better pick for you depending on what you want to do. It does have a drag-n-drop interface that is very slick, but it generates a .ui file that still needs to be translated into a python module and imported into your main 'program' file - but it takes a *lot* of the tedium out of creating a user interface more complicated than a simple dialog window. HTH, Monte -- http://mail.python.org/mailman/listinfo/python-list
Re: usenet reading
On Friday, May 25, 2012 3:38:55 PM UTC-7, Jon Clements wrote: > Hi All, > > Normally use Google Groups but it's becoming absolutely frustrating - not > only has the interface changed to be frankly impractical, the posts are > somewhat random of what appears, is posted and whatnot. (Ironically posted > from GG) > > Is there a server out there where I can get my news groups? I use to be with > an ISP that hosted usenet servers, but alas, it's no longer around... > > Only really interested in Python groups and C++. > > Any advice appreciated, > > Jon. Have you tried news.gmane.org? They have a Mail2News gateway for many popular mailing lists, as well as some of the traditional usenet hierarchy - including this group. Here is a link to their page for this group, to give you an idea of what kind of reading options they provide. http://dir.gmane.org/gmane.comp.python.general Or you can point your usenet reader @ news.gmane.org and subscribe 'normally'. HTH, Monte -- http://mail.python.org/mailman/listinfo/python-list
Are there any instrumentation widgets for wxpython or tkinter?
PyQt4 has built-in widgets for things like digital counters & dials... kind of surprising there aren't more instrument related widgets out there... -- http://mail.python.org/mailman/listinfo/python-list
Re: stackoverflow and c.l.py
On 09/14/2011 05:47 AM, Chris Angelico wrote: The SNR here isn't bad either. Most of the spam gets filtered out, and even stuff like Ranting Rick posts can be of some amusement when it's a slow day... I subscribe to the list via Gmane, and if 'most of the spam' gets filtered out, I'd hate to see how much gets submitted as I still see 2-5 minimum blatant spam per day on here. Rick & Xang Li are two examples of what you *don't* see (or at least I don't) @ SO -- http://mail.python.org/mailman/listinfo/python-list
Re: stackoverflow and c.l.py
On 09/13/2011 09:12 PM, Stefan Behnel wrote: Matt Joiner, 14.09.2011 04:23: i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: http://stackoverflow.com[...] I wonder why people ask this kind of question on stackoverflow, and then come here asking people to go over there, read the question, and (potentially) provide an answer. IMHO, c.l.py is a much better place to ask Python(-related) questions than stackoverflow. It's also a much better place to search for an answer that is already available in the archives. Stefan Just an opinion from the unwashed masses... but I don't see the p0rn spam over on SO that I do on c.l.py, for one. I also seem to generally get better results from the search engine there, for two. Not saying one is necessarily better than the other, but just subscribing to the feed for the [python] tag on SO has a pretty good SNR... -- http://mail.python.org/mailman/listinfo/python-list
Re: Should a beginner do some coding excises? How can I find the sources?
On 09/12/2011 09:20 PM, sillyou su wrote: I'm reading "Learning Python"( Chinese version). Before I go through the whole book, I want to do some excises matching each charter. Any tips? Any better advice? For the code examples, have you tried looking up the home page for the book? Google for 'oreilly learning python' and find the correct edition that you have. If its the 4th ed (current), you should end up on a page like this: http://shop.oreilly.com/product/9780596158071.do Down in the right hand side-bar, there should be a menu 'Essential Links' and one of the options is 'Download code' or something along those lines. The link should take you to a zip file with all the code examples in the book. As far as practice exercises... maybe something like codingbat.com/python would be helpful. Its not related to the book at all, and doesn't go nearly as in depth... but its kind of neat to play with and see how your code works when someone else is grading it! (at least for me). HTH, Monte -- http://mail.python.org/mailman/listinfo/python-list
Re: Beginner needs advice
On 05/24/2011 03:17 PM, Lew Schwartz wrote: Here's my background: I'm a Windows based Visual FoxPro developer, and I want to start programming in Python. I'll be sticking to Windows (XP & 7) and my immediate needs are to manage & display large groups of jpg's, tiff's etc... so I need form based & graphics capable libraries (in addition to basic programming skills, of course). So Python 2 or 3? Add on packages/libraries? Tutorials? Thanks! -Lew If Visual Foxpro is your thing, maybe Dabo (www.dabodev.com) would be of interest to you. The developers are former Visual Foxpro programmers... -- http://mail.python.org/mailman/listinfo/python-list