How much memory does Django consume compared to Rails?
I have deployed two Ruby on Rails sites on WebFaction, and Passenger Rack takes up around 60 MB of memory apiece. I was planning on replacing my Drupal web sites with Rails, but I'm now considering replacing these Drupal sites with Django. Given that the baseline memory consumption for a Rails site is around 60 MB, how would a Django site compare? -- http://mail.python.org/mailman/listinfo/python-list
Using Xpath to parse a Yahoo Finance page
I'm trying to extract the data on "total assets" from Yahoo Finance using Python 2.7 and lxml. Here is a special test script I set up to work on this issue: import urllib import lxml import lxml.html url_local1 = "http://www.smartmoney.com/quote/FAST/?story=financials&timewindow=1&opt=YB&isFinprint=1&framework.view=smi_emptyView"; result1 = urllib.urlopen(url_local1) element_html1 = result1.read() doc1 = lxml.html.document_fromstring (element_html1) list_row1 = doc1.xpath(u'.//th[div[text()="Total Assets"]]/following-sibling::td/text()') print list_row1 url_local2 = "http://finance.yahoo.com/q/bs?s=FAST"; result2 = urllib.urlopen(url_local2) element_html2 = result2.read() doc2 = lxml.html.document_fromstring (element_html2) list_row2 = doc2.xpath(u'.//td[strong[text()="Total Assets"]]/following-sibling::td/strong/text()') print list_row2 I'm able to get the row of data on total assets from the Smartmoney page, but I get just an empty list when I try to parse the Yahoo Finance page. -- http://mail.python.org/mailman/listinfo/python-list
Re: Using Xpath to parse a Yahoo Finance page
On Sunday, December 2, 2012 8:25:45 PM UTC-6, MRAB wrote: > > list_row2 = doc2.xpath(u'.//td[strong[contains(text(),"Total > > Assets")]]/following-sibling::td/strong/text()') > Thanks, MRAB. Your suggestion works! -- http://mail.python.org/mailman/listinfo/python-list
Remote server: running a Python script and making *.csv files publicly available
I have a Python 2.7 script that produces *.csv files. I'd like to run this Python script on a remote server and make the *.csv files publicly available to read. Can this be done on Heroku? I've gone through the tutorial, but it seems to be geared towards people who want to create a whole web site. If Heroku isn't the solution for me, what are the alternatives? I tried Google App Engine, but it requires Python 2.5 and won't work with 2.7. -- http://mail.python.org/mailman/listinfo/python-list
Running a Python app on a remote server and displaying the output files
I have a Python 2.7 script at https://github.com/jhsu802701/dopplervalueinvesting . When I run the screen.py script locally, the end result is a new screen-output sub-directory (within the root directory) and a results.csv file within it. What I'm trying to do is put this script on a remote server, run this screen.py script every night, and make the results.csv file publicly readable. I've tried to do this on Google App Engine, but I can't get it to work. The Google App Engine tutorial revolves around trying to dynamically create a web site, and I haven't been able to figure out how to make anything other than an index.html file in the root directory work. HOW DO I MAKE OTHER FILES PUBLICLY READABLE? Is Google App Engine the way to go, or am I barking up the wrong tree? I understand that another route is using WebFaction, a web hosting provider that offers a whole Linux system. (Running my app on my current web host, MDDHosting, is not an option because lxml is not available without a much more costly VPS.) In summary, my questions are: 1. How do I run my Python script in Google App Engine and make the output results.csv file publicly available? 2. If Google App Engine isn't the solution for me, should I use WebFaction? (I already tried Heroku, and it didn't work for me.) 3. What are my other options? I'm willing to pay for a solution, but only if I get web hosting as well. (I'm not willing to pay for MDDHosting for my dopplervalueinvesting.com web site AND another host for running my script.) -- http://mail.python.org/mailman/listinfo/python-list
OT: local technical community portals
For the Minneapolis/St. Paul area of Minnesota, there is a technical community portal at http://tech.mn/. You'll see that this portal has links to user groups, networking events, jobs, etc. No, I didn't start this thread to tout this site. MY QUESTION: What are the local technical community portals for other places, such as Chicago, Silicon Valley, Los Angeles, San Diego, Dallas, Atlanta, Boston, etc.? -- http://mail.python.org/mailman/listinfo/python-list
Slightly OT: What metro areas are best for a software development career?
I am looking for a position as a software development engineer. I'm currently learning to develop Android apps (http://www.jasonhsu.com/android-apps), and I use Python for implementing Doppler Value Investing (http://www.dopplervalueinvesting.com) and for developing Swift Linux (http://www.swiftlinux.org). NOTE: Thanks to those of you who answered the questions I asked as I developed Doppler Value Investing. I currently live in Minnesota about 50 miles west of Minneapolis, and I am considering moving. What are the best metro areas (Silicon Valley, Los Angeles, San Diego, Chicago, Twin Cities, Boston, NYC, DC, etc.) for a software development career, how would you rank them, and why? The Twin Cities metro area has a technical community portal called http://tech.mn . Are there analogous technical community portals for other metro areas? -- http://mail.python.org/mailman/listinfo/python-list
Commands for changing ownership of a file
I have a script that I execute as root, but I need to change the ownership of the files created in the script to that of my username. In GNU Bash, the command is something like "chown myusername:users". What's the equivalent Python command? I know that there is a command that uses numbers for the username and group, but is there a command that would allow me to use "myusername" and "users" instead of numbers? -- http://mail.python.org/mailman/listinfo/python-list
OT: looking for best solutions for tracking projects and skills
I realize this is off-topic, but I'm not sure what forum is best for asking about this. I figure that at least a few of you are involved in civic hacking groups. I recently joined a group that does civic hacking. (Adopt-A-Hydrant is an example of civic hacking.) We need a solution for tracking projects and the skills needed for the projects (such as Ruby on Rails, Python, Drupal, Javascript, etc.). I'd like to hear from those of you in similar groups that have a great system for tracking projects. Is there an in-house solution you use, or is there something else available? -- https://mail.python.org/mailman/listinfo/python-list
Why is Ruby on Rails more popular than Django?
I'm currently in the process of learning Ruby on Rails. I'm going through the Rails for Zombies tutorial, and I'm seeing the power of Rails. I still need to get a Ruby on Rails site up and running for the world to see. (My first serious RoR site will profile mutual funds from a value investor's point of view.) I have an existing web site and project called Doppler Value Investing (dopplervalueinvesting.com) that uses Drupal to display the web pages and Python web-scraping scripts to create *.csv and *.html files showing information on individual stocks. My site has a tacked-on feel to it, and I definitely want to change the setup. At a future time, I will rebuild my Doppler Value Investing web site in either Ruby on Rails or Django. The Ruby on Rails route will require rewriting my Python script in Ruby. The Django route will require learning Django. (I'm not sure which one will be easier.) My questions: 1. Why is Ruby on Rails much more popular than Django? 2. Why is there a much stronger demand for Ruby on Rails developers than Django/Python developers? 3. If Doppler Value Investing were your project instead of mine, would you recommend the Ruby on Rails route or the Django route? -- http://mail.python.org/mailman/listinfo/python-list
How do I use PyGTK to put text besides clickable buttons?
I've decided to use PyGTK instead of gtkdialog for providing configuration menus/dialog boxes in Swift Linux, the Linux distro I started. The problem with gtkdialog is that the i386 version is no longer available in the Debian repository. Since a picture is worth a thousand words, I'll give you a link to a screenshot of antiX Linux: http://antix.freeforums.org/download/file.php?id=23 How do I use PyGTK to create something similar to the logout dialog box in the above graphic? I've figured out how to create clickable buttons that each run a different script. What I haven't figured out is how to add text beside each button. -- http://mail.python.org/mailman/listinfo/python-list
Can I fully replace GNU Bash with Python?
This question concerns my process of creating Swift Linux from the base distro (antiX Linux in the past, Linux Mint Debian Edition now). (NOTE: The process I'm describing here is an oversimplification.) All of my development work takes place in the ~/develop directory. This is the directory where I enter the "git clone" command to download the repositories from GitHub. These repositories are 1- build, majorfunction1, majorfunction2, and so on. After I download these repositories, I have the directories ~/develop/1-build, ~/ develop/majorfunction1, ~/develop/majorfunction2, and so on. The ~/develop/1-build directory contains the scripts that build Swift Linux. Each major function needed to create Swift Linux (such as changing web browser configuration files, changing login manager configuration files, etc.) has its own majorfunction# repository. For developing the latest version of Swift Linux, I had the swift.sh script in the ~/develop/1-build directory call scripts in the majorfunction directories with commands like: sh ~/develop/majorfunction1/main.sh sh ~/develop/majorfunction2/main.sh and so on Please note that one can run any of these major functions independently OR as part of the ~/develop/1-build/swift.sh script. The ability to run any major function independently means I can focus on just one function that's not working as it should WITHOUT messing around with other functions. This ability will be especially important when I have an actual team working on Swift Linux. What I'd like to do is replace GNU Bash with Python. I know I can replace the main.sh scripts with main.py scripts. Then the commands in the swift.sh script would be: python ~/develop/majorfunction1/main.py python ~/develop/majorfunction2/main.py and so on Is there a way I can replace the ~/develop/1-build/swift.sh script with a ~/develop/1-build/swift.py script, yet still retain the ability to work on one major function WITHOUT requiring the other major functions and the 1-build directory to be present? -- http://mail.python.org/mailman/listinfo/python-list