How do *you* use Python in non-GUI work?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Salerno

    How do *you* use Python in non-GUI work?

    Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)

    Thanks.
  • Mensanator

    #2
    Re: How do *you* use Python in non-GUI work?

    On May 18, 5:20�pm, John Salerno <johnj...@NOSPA Mgmail.comwrote :
    Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)
    >
    Thanks.
    Odd, I've been using Python since ver 2.2 and I've
    NEVER needed a GUI. I do things like (looking at the
    last 6 months of my Python directory):

    - how to scrape movie receipt data from IMDB
    and insert them into an MS-Access database

    - how to scrape .jpgs from a web page (simple
    file transfer, no display needed)

    - how to do a Cartesian Product in SQLlite3

    - how to creat a polynomial from a sequence of
    numbers using Newton's Forward Differences method

    - how to calculate the date of Easter

    - how to construct arbitrary length cycles in the
    Collatz Conjecture

    - how to find the Ultimate Cycle (also in Collatz
    Conjecture)

    - efficient cycle detection comparing Brent's and
    Sedgewick's cycle detection algorithms

    - finding the cycles of 3n+C systems

    - partioning W marbles into D ordered bins with
    the constraint that each bin contain a minimum of 1

    - partioning W marbles into D ordered bins with
    the constraint that each bin contain a minimum of 1
    and that no bin exceeds M

    - a Python Cartesian Product that in addition to
    Permutaions with Replacement, also gives the subsets
    Permutations without Replacement, Combinations with
    Replacement and Combinations without Replacement

    - demonstrating the fallacy of Peter Scorer's "proof"
    of the Collatz Conjecture

    - demonstrating the fallacy of Alan Tyte's "proof" of
    the Collatz Conjecture

    - demonstrating the fallacy of Ken Conrow's "proof" of
    the Collatz Conjecture

    - how to identify which members of the infinite solutions
    to a given Sequnce Vector of a 3n+C system are located
    on the trivial graph component

    - developing a novel factoring algorithm based on the
    Collatz Conjecture

    I see no need for GUI in any of these applications.


    Comment

    • Daniel Fetchinson

      #3
      Re: How do *you* use Python in non-GUI work?

      Hey all. Just thought I'd ask a general question for my own interest. Every
      time I think of something I might do in Python, it usually involves creating
      a GUI interface, so I was wondering what kind of work you all do with Python
      that does *not* involve any GUI work. This could be any little scripts you
      write for your own benefit, or what you do at work, if you feel like talking
      about that! :)
      web apps
      manage/format/write cv
      convert jpg to gif
      start/stop/manage parallel runs on a PC cluster
      etc :)

      Actually, I've never written anything with a GUI (unless you count web apps).

      Cheers,
      Daniel
      --
      Psss, psss, put it down! - http://www.cafepress.com/putitdown

      Comment

      • sturlamolden

        #4
        Re: How do *you* use Python in non-GUI work?

        On May 19, 12:20 am, John Salerno <johnj...@NOSPA Mgmail.comwrote :
        Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)

        Back in the 'old days' of Unix, programs tended not to be small, could
        only do one thing, and did it well. They had no gui, and all
        interaction came from command line options. The programs were invoked
        from the command line, and input and output were piped from one
        program to another (input on stdin, output on stdout).

        Today, it is expected that programs should have a GUI. The majority do
        not even know how to use a program that does not have one. As a
        result, programs have become poorer at interacting with other, and
        become bloated and grown monolithic. Today's programs are monolithic
        beasts spanning tens or hundreds of megabytes, where the bulk of the
        code duplicates functionality found in every other program.

        I prefer that a program has no GUI if it does not need user
        interaction beyond what can be easily accomplished from the command
        line. Sometimes I think gui becomes overwhelming, and obfuscates the
        real functionality in the program. When I write program's for others
        people, a GUI is usually expected. But when I get requests for adding
        new functionality to such a program, it tends to be for unimportant
        GUI stuff rather than real functionality to the program.

        To answer your question: I only add GUIs when I have to. But because
        it seems that people are becoming computer illiterate, incapable of
        using a keyboard, and only comfortable with a certain point-and-click
        input device, it tends to be most of the time now.






        Comment

        • John Salerno

          #5
          Re: How do *you* use Python in non-GUI work?

          On Sun, 18 May 2008 16:17:55 -0700 (PDT)
          Mensanator <mensanator@aol .comwrote:

          I see no need for GUI in any of these applications.
          Yeah, I try to find little projects to write in Python that don't involve a GUI. It's quicker, for one thing, and I also find that there is much more of a focus on the actual problem rather than wasting time trying to get a button positioned just right. :)

          Even back when I was using Windows 3.1 and 95, I enjoyed doing stuff in DOS because it made me feel like I was actually getting work done. :)

          Comment

          • timh

            #6
            Re: How do *you* use Python in non-GUI work?

            On May 19, 6:20 am, John Salerno <johnj...@NOSPA Mgmail.comwrote :
            Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)
            >
            Thanks.
            Hi

            I work fulltime developing in python and have done so for more than 5
            years now, and I would say 99.8% of the time I have not
            built anything with a GUI (Unless you consider a web page as a GUI ;-)

            Much of my work is web based (zope backend stuff), test frameworks for
            windows build environments that need to compare the output of 1000's
            of images from rendering pipelines. Lots of data integration and
            manipulation utilities as part of processing pipelines. All sorts of
            stuff that just doesn't use
            a GUI.

            T

            Comment

            • Irmen de Jong

              #7
              Re: How do *you* use Python in non-GUI work?


              John Salerno wrote:
              Hey all. Just thought I'd ask a general question for my own interest. Every time I
              think of something I might do in Python, it usually involves creating a GUI
              interface, so I was wondering what kind of work you all do with Python that does
              *not* involve any GUI work. This could be any little scripts you write for your own
              benefit, or what you do at work, if you feel like talking about that! :)
              >
              Thanks.
              - web server/blog/wiki. This doesn't have a gui if you don't consider HTML pages a gui
              - various scripts to help me during software deployment and testing
              (for instance log file analyzers, automated web clients)
              - network communications library that tries hard to just get out of your way ;-)
              - file processing scripts to do more sophisticated stuff than basic search/replace
              - most recent script is a little tool that downloads the latest version of some
              World-Of-Warcraft addon, extracts it to the game folder after deleting the old one
              first, and then copies a backup to a network drive. I just doubleclick the .py file and
              it dumps the results in a console window that closes after a few seconds. Who needs a
              gui for that?

              Also, I often find myself opening a Python prompt to just execute simple tasks that I
              see other people needing big tools or even online services for:
              - base-64 encoding/decoding
              - md5/sha hashing
              - simple string or regular expression operations
              - simple math
              - unicode decoding/encoding
              - etc etc.


              --irmen de jong

              Comment

              • Brian

                #8
                Re: How do *you* use Python in non-GUI work?

                John Salerno wrote:
                Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)
                >
                Thanks.
                here is some non-text stuff that I have done within the
                last two or three years

                1. controlling and parsing thousands of label files
                several times per day, that are used by the factory to
                drive the printers that make product safety labels -
                code was easily approved by UL and CSA.
                2. real-time control of platform in EMC lab for
                radiated emissions testing.
                3. hi-speed data acquisition of 3 to 20 parameters
                during simulated abnormal operating conditions to
                demonstrate product compliance with product safety
                standards.
                4. monitoring of several server logs, also sends email
                to me if it finds something it does not like.
                5. parallel monitor/control systems for several
                greenhouses.

                Comment

                • Kam-Hung Soh

                  #9
                  Re: How do *you* use Python in non-GUI work?

                  On Mon, 19 May 2008 08:20:22 +1000, John Salerno
                  <johnjsal@NOSPA Mgmail.comwrote :
                  Hey all. Just thought I'd ask a general question for my own interest.
                  Every time I think of something I might do in Python, it usually
                  involves creating a GUI interface, so I was wondering what kind of work
                  you all do with Python that does *not* involve any GUI work. This could
                  be any little scripts you write for your own benefit, or what you do at
                  work, if you feel like talking about that! :)
                  >
                  Thanks.
                  --

                  >
                  - Enhancing existing products by scripting new features.
                  - Interface between databases, Excel and text files.
                  - Convert data between flat files and XML.
                  - Manage files for build processes.
                  - Automating processes (e.g. checkout, builds, FTP).

                  Wish I had some reasons to make a GUI application in Python.

                  --
                  Kam-Hung Soh <a href="http://kamhungsoh.com/blog">Software Salariman</a>

                  Comment

                  • subeen

                    #10
                    Re: How do *you* use Python in non-GUI work?

                    On May 19, 7:52 am, "Kam-Hung Soh" <kamhung....@gm ail.comwrote:
                    On Mon, 19 May 2008 08:20:22 +1000, John Salerno
                    >
                    <johnj...@NOSPA Mgmail.comwrote :
                    Hey all. Just thought I'd ask a general question for my own interest.
                    Every time I think of something I might do in Python, it usually
                    involves creating a GUI interface, so I was wondering what kind of work
                    you all do with Python that does *not* involve any GUI work. This could
                    be any little scripts you write for your own benefit, or what you do at
                    work, if you feel like talking about that! :)
                    >>
                    - Enhancing existing products by scripting new features.
                    - Interface between databases, Excel and text files.
                    - Convert data between flat files and XML.
                    - Manage files for build processes.
                    - Automating processes (e.g. checkout, builds, FTP).
                    >
                    Wish I had some reasons to make a GUI application in Python.
                    >
                    --
                    Kam-Hung Soh <a href="http://kamhungsoh.com/blog">Software Salariman</a>
                    I also haven't used GUI in python yet. I basically write web crawlers/
                    spiders in Python where GUI is not essential.

                    regards,
                    Subeen

                    Comment

                    • s0suk3@gmail.com

                      #11
                      Re: How do *you* use Python in non-GUI work?

                      On May 18, 7:25 pm, John Salerno <johnj...@NOSPA Mgmail.comwrote :
                      On Sun, 18 May 2008 16:17:55 -0700 (PDT)
                      >
                      Mensanator <mensana...@aol .comwrote:
                      I see no need for GUI in any of these applications.
                      >
                      Yeah, I try to find little projects to write in Python that don't involve a GUI. It's quicker, for one thing, and I also find that there is much more of a focus on the actual problem rather than wasting time trying to get a button positioned just right. :)
                      >
                      Even back when I was using Windows 3.1 and 95, I enjoyed doing stuff in DOS because it made me feel like I was actually getting work done. :)
                      I do mostly Internet protocol server/proxy-side applications. One of
                      the fun things about those kinds of programs is that you get away from
                      the whole "user interface design" concept, because you normally don't
                      have to do any kind of user interface (neither command-line-based, GUI-
                      based, web-based, nor anything), since you're not designing something
                      to serve an end user, but to work as a lonely daemon and serve some
                      kind of Internet service. So I think that'd be a good alternative for
                      you.

                      Every now and then, however, I do build some interface (mostly GUI),
                      such as a monitor, notification mechanism, etc. But I never feel like
                      I'm losing focus on the actual problem; maybe because I develop the
                      core program first and the think about a possible and optional
                      interface. Maybe a good suggestion is to put the GUI stuff on another
                      module or package, and make interface functions or methods to handle
                      the needed GUI controls, so that the GUI stuff shows up as little as
                      possible in the core part of the program.

                      Comment

                      • Bruno Desthuilliers

                        #12
                        Re: How do *you* use Python in non-GUI work?

                        John Salerno a écrit :
                        Hey all. Just thought I'd ask a general question for my own interest.
                        Every time I think of something I might do in Python, it usually
                        involves creating a GUI interface, so I was wondering what kind of
                        work you all do with Python that does *not* involve any GUI work.
                        This could be any little scripts you write for your own benefit, or
                        what you do at work, if you feel like talking about that! :)
                        web apps, command line utilities, and of course libraries.

                        Comment

                        • janislaw

                          #13
                          Re: How do *you* use Python in non-GUI work?

                          On May 19, 12:20 am, John Salerno <johnj...@NOSPA Mgmail.comwrote :
                          Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)
                          >
                          Thanks.
                          - Programs creating C and VHDL source files
                          - Scipy scripts generating charts

                          Jan Wicijowski

                          Comment

                          • Ken Starks

                            #14
                            Re: How do *you* use Python in non-GUI work?

                            John Salerno wrote:
                            Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)
                            >
                            Thanks.
                            The vast majority of my Python work is Non-GUI.

                            As an example, this weekend, I wrote a script to help
                            in making a 'Lyrics' track in an audacity file, which
                            is (more-or-less) an XML variety.

                            In audacity, I created 'markers' in the file (as
                            the song played) at the start of each line. The result
                            was 'blank' markers at the correct times:

                            <labeltrack name="Lyrics" numlabels="25">

                            <label t="18.5012103 4" t1="18.50121034 " title=""/>

                            <label t="24.3484439 0" t1="24.34844390 " title=""/>

                            <!-- Etc -->

                            </labeltrackl>


                            My Python script took a text file, and inserted the words, as well
                            as a title for the whole song.


                            <labeltrack name="Lyrics" numlabels="26">
                            <label t="0.25" t1="0.25" title="Katie Melua. 'Nine million
                            bicycles in Beijing' "/>
                            <label t="18.5012103 4" t1="18.50121034 " title="There are nine
                            million bicycles in Beijing,"/>
                            <label t="24.3484439 0" t1="24.34844390 " title="That&apo s;s a fact,"/>
                            <label t="27.1243622 7" t1="27.12436227 " title="It&apos; s a thing we
                            can&apos;t deny,"/>


                            <!-- Etc -->

                            </labeltrackl>


                            (The script used FourSuite)

                            You can do this in FourSuite itself, but it can be error-prone if
                            you miss out one.

                            I can this in 'Scite' a text editor which puts your input in one window,
                            and the output in another. Scite is a text editor that comes free with
                            Ruby, by the way.

                            Comment

                            • Dan Upton

                              #15
                              Re: How do *you* use Python in non-GUI work?

                              On Sun, May 18, 2008 at 6:20 PM, John Salerno <johnjsal@nospa mgmail.comwrote :
                              Hey all. Just thought I'd ask a general question for my own interest. Every time I think of something I might do in Python, it usually involves creating a GUI interface, so I was wondering what kind of work you all do with Python that does *not* involve any GUI work. This could be any little scripts you write for your own benefit, or what you do at work, if you feel like talking about that! :)
                              >
                              Thanks.
                              --

                              >
                              I write a lot of job control and process monitoring scripts in Linux.
                              Stuff that forks and execs processes, and then monitors procfs and
                              sysfs to collect periodic data. I actually wouldn't mind doing a GUI
                              for it, but pretty much all of the data display I need from it I can
                              do by taking the data files and running them through gnuplot. (That,
                              and I'm too lazy to figure out how to rewrite my telemetry plotter
                              from Java to Python.)

                              I guess I also write some data conversion programs, mostly the sort of
                              thing where I have a bunch of data that I didn't think far enough in
                              advance how I needed to be able to display it, so I just write
                              something to convert it to where I need it. Incidentally, I used to
                              do that all in Java too, until other people in my research group
                              started making fun of me for it and also for not really knowing a
                              scripting language.

                              Comment

                              Working...