Git question -- handling python vs python2 [SOLVED]

I'm working on a python project and trying to figure out how best to handle the #!/usr/bin/env python2 line. I do most of my development on my arch laptop/server, but also need it to run on a hosted server which is still on python 2.6. So I need one version to read '#!/usr/bin/env python2' and the other to read '#!/usr/bin/env python'. Otherwise, the code is the same.
Would this be a case to run parallel git branches...although as I'm thinking about I'm not sure how merging the two would work without overwriting what I'm trying to save? Or is there another obvious way to handle this? Hopefully I explained the issue clearly enough.
Thanks!
Scott
Last edited by firecat53 (2010-10-22 21:20:17)

Ah, Doh! So easy. I have a ~/bin directory on the hosted server that I added to my $PATH, and created the python2 symlink to python in there. That does it.
Thanks!
Scott

Similar Messages

  • [SOLVED] Is python vs. python2 print syntax causing failures to build?

    I've been trying to build pidgin so I can include webcam (aud/vid) support as well as support for the sametime protocol. I've tried pidgin-git, pidgin-mtn and most recently pidgin-gnome and haven't been able to install any of them.
    I've been pursuing pidgin-gnome the most since pidgin-git is way out of date and pidgin-mtn just won't budge for me.
    What I'm running into are continual failings due to print statements in one particular file: src/pkgname/libpurple/dbus-analyze-functions.py. In my extremely novice knowledge of python, I know that between 2 and 3, the print syntax changed a bit. I have the tutorial Dive into Python on my computer and it's in the python2 syntax so I recall that even when trying do the cursory "Hello World" I had to fiddle with the syntax. Specifically, I believe python 3+ requires anything after 'print' to be in parentheses.
    What this means is that every time that dbus-analyze-functions.py file fails, I track down the error and put it's print argument in parentheses. Then it fails at the next one.
    What is the protocol for things like this? The PKGBUILD has python in the depends... so are we just too far ahead in Arch and therefore don't have compatability with some of these applications? Not sure how to build pidgin via any of the aur packages at this point.
    Thanks for suggestions. Most likely, I'm missing something silly after all!
    Edit: great suggestion from ngoonee below -- I was relying on AUR for something I could have gotten from ABS all along. ABS had the correct precautions for handling python vs. python2 (saw clearly in the PKGBUILD the line '--with-python=/usr/bin/python2'.
    Last edited by jwhendy (2011-03-15 16:47:40)

    @ngoonee: Hmmm. I should look into ABS. I was thinking that "stock" packages were only available as binary and thus I've only either a) installed binaries via pacman or b) built some version from AUR when the repos didn't have them or when I needed special features.
    Why aren't you using http://aur.archlinux.org/packages.php?ID=44209 anyway?
    Because the WIKI doesn't say a lick about libpurple-meanwhile. It says to compile from source, removing '--disable-meanwhile' and installing the meanwhile package. Fill me in if there's a better way and I'll make sure the wiki gets updated to say the same.
    Last edited by jwhendy (2011-03-15 13:20:39)

  • Compton-git question [Solved]

    Hi
    After doing a little bit of research and installing compton-git and removing xcompmgr  i added
    compton -f
    to .xinitrc and i concur it works and is way better than xcompmgr (with xcompmgr tilda,tmux would stay on top no matter if it was set not too) anyways my question is i do like the shadow,shade option in xcompmgr , can someone let me know the switches to use in .xinitrc so compton will start with these shadow,shade features ?
    Regards
    [EDIT] for future travellers ,  the command in .xinitrc wouldnt cut it i ended up adding
    compton -cC -I 0.7 -O 2.7 -D 390 -m 0.7 -G -b -i 0.9 -e 0.9 -fF &
    and
    sleep 2s &
        (give the  composition 2 seconds to kick in)
    to .config/openbox/autostart and all was well.
    Last edited by cirrus (2012-09-21 19:46:19)

    nTia89 wrote:
    today I discover a new software, thank you!
    anyway, possible switches are listed here:
    https://github.com/chjj/compton
    Thank you too , that was just what i needed.

  • Exaile - missing gnome-python-extras problem [SOLVED]

    Hi,
    Until last week i was able to fetch lyrics with exaile, but something broke it, and now exaile is complaining about missing gnome-python-extras. I have installed both libgtkhtml and gnome-python-extras:
    $ pacman -Qs gnome-python-extras libgtkhtml exaile
    local/gnome-python-extras 2.14.3-1
        Gnome Python interfaces for libraries not part of the core platform
    local/libgtkhtml 2.11.1-1
        An HTML library for GTK
    local/exaile 0.2.11-1
        Exaile is a media player aiming to be similar to KDE's AmaroK, but for GTK+
    Reinstall didn't help. Any ideas?
    Last edited by lman (2008-02-23 20:44:35)

    Hi,
    thanks for the tip. It kinda solved the problem.
    I can see now the lyrics and the other tabs, but there is just a button that says, that 'open browser' and a link next to it. And when I try to open the information tab again exaile dies. I suppose that's another bug.
    So now I'm trying to build the whole xulrunner from abs as I'm writing. I'm not really familiar with bug reporting, but if it still isn't working, I will report it.
    Anyway, here is the bug report from bug buddy: http://lmanweb.extra.hu/gecko-bugreport.txt
    EDIT: After installing xulrunner from abs exaile won't die, but it still don't load the pages within the tabs, and the wiki plugin still doesn't work
    EDIT2: OK, i reported it: bug ID 9660
    Last edited by lman (2008-02-23 18:54:20)

  • "My Questions" still lists my question "unresolved" AFTER it got "solved"

    2-12-06
    I marked the reply as having "solved" my question, but the
    "My Questions" reminder still lists my question as "unresolved".
    Perhaps because I sent a reply to the person that replied to my
    question?
    BillJones1 (Appleworks forum/"Boolean search"/2-12-06)
    Thanks
    eMac G4 (build 7W98) 125 GHz, 256 MB, 37 GB   Mac OS X (10.3.9)   dialup 56KB modem

    Hi, Bill -
    In addition to marking the specific reply as "Solved", at the top of the thread (above your initial post asking the question) should be a box (the one I just checked on is pale-blue). In that box is a choice to mark the qustion as "answered". Click that. In the new screen is a place to add an additional comment (you do not need to add one) and a Mark as Answered button - click that button.
    That will clear the question from the list in the sidebar, although it may take some time (and perhaps a log out and back in) in order to have it actually disappear from the display.

  • Time Machine questions: Handling backups for multiple Macs to one FW drive

    I am reviewing the Time Machine thread and seeing a lot of helpful information, but I would like to ask something I haven't quite found yet.
    We have 2 Leopard Macs, a MacBook Pro and an intel iMac... with plans to upgrade another MBP from Tiger to Leopard at some point.
    In planning for Time Machine, we set up a 1 TB drive, attached it via FW 800 to the iMac, partitioned it GUID for Intel, and made 3 partitions, one for each planned Mac we want to back up to it.
    I started Time Machine on the iMac first and the first backup of about 100 gb took maybe 4 hours.
    Then we tried to start the Time Machine backup for the MBP over the network (wireless). It was understandably much slower and quit with some error last evening, so I took advantage of the pause to move the notebook to a wired ethernet connection. It got even slower so this morning I directly connected it FW 800, erased what had been backed up, and started over. So far, so good. 6GB out of 100 in 10 minutes or so. The idea being, if we can get the first backup completed faster over wired connection, maybe doing the incrementals over wireless network will be okay. Sounds like some folks are doing that successfully. I am hoping that works out.
    Questions: Was it necessary to partition my 1TB drive into a partition for each Mac's Time Machine backup? I did make each partition bigger than the hard drive it is designated for.
    To get the MBP to mount the external FW drive on its desktop, I had to disconnect the drive from the iMac. Is there any way I can connect the FW drive to both the MBP and the iMac (the drive has two FW 800 out connections, so it is physically possible)? I'm thinking (from reading posts of others with notebooks) that one strategy is to connect your notebook to your Time Machine drive at night and let it back up, but it'd be great if I could leave the iMac connected while doing so. Is there a way the volumes on the drive can mount on both desktops?
    When I try wireless again, I'm seeing mixed posts regarding whether the MBP will need a password to log in to the remote volume each time, or only the first time when the Time Machine backup is established... if I could get clarification on that, it would be helpful.
    Thanks!
    thanks

    What do you see on your notebook when you click on your TimeMachine icon in the Dock?
    My notebook is mounting the backup drive on an hourly basis, running a backup, and looking like it is doing something... but when I then look at TimeMachine, I can't see the backups. (On my iMac with the drive directly attached, I see a progression of windows showing all the hourly backups the last 24 hours, etc.) I just called Apple to ask why this is so, and they told me they couldn't help me because wireless Time Machine backups aren't supported.
    I know backups to a hard drive attached to an Airport Express Base Station are not supported. But when they say "You can designate just about any HFS+ formatted FireWire or USB drive connected to a Mac as a Time Machine backup drive. +Time Machine can also back up to another Mac running Leopard with Personal File Sharing, Leopard Server, or Xsan storage devices+"... well, how can you DO that?

  • Question: Handling of Kernelpatches under ABAP and JAVA

    Hi everyone,
    we download the current Kernelpatches (including the disp+work level 200, the SAPJ2EE and many other packages) from the SAPNET and manually copied the files to the following directories:
    ABAP:
    /sapmnt/<SID>/exe
    /usr/sap/<SID>/DVEBMGS00/exe
    JAVA:
    /usr/sap/<SID>/SCS01/exe
    The systems are running fine so far and after logging in to the ABAP stack it shows the current kernel level 200 ...
    However if we run the JSPM it still shows us the old kernel level 180 ...
    What's wrong here ?
    How can we bring the JAVA Stack to a current level ?
    What's the exact package needed here and where do we get it ?
    And one more thing:
    We found a strange and older dispwork we couldn't execute using "dispwork -V" under
    /sapmnt/<SID>/exe/uc/rs6000_64
    What exactly is it good for ?
    Do we have to update this one too ?
    What would be the correct packages here ?
    Regards
    Thomas
    Remark: We're running DB2 under AIX ...
    Edited by: Thomas Schmitt on Mar 27, 2009 1:51 PM

    I do not think that you get a good answer on this question in this forum. Your questions are on the general kernel and this is the DB6 component - so a question on the db6 dbsl will be answered fine.
    Can you post this question into a different forum ?
    Malte

  • Question about 'cin' & 'cout' (C++) (SOLVED)

    Probably a stupid question with a simple answer but here goes;
    when i compile the following code
    #include <iostream>
    #include <string>
    int main(int argc, char* argv[])
    string buffer;
    while (1 == 1)
    cout<<" ## ";
    cin>>buffer;
    it compiles fine, when run it does the following
    prints " ##  " minus quotes
    then pauses for input
    however the strange thing is that if i enter a string with a space in, quotes or no, it repeats the 'cout' statement, see below for output
    ##  this is a string
    then pauses for input, as it should, i ask you why it does this as i don't call it "expected behaviour", not with that code anyway.
    EDIT: fixed some typos
    EDIT_2: boxed of output&code, thx ewaller
    Last edited by Iknow (2011-06-25 23:39:13)

    Nah, there is a loop, right?
    You type "this is a string".
    cin reads "this" and gets out.
    while(1 == 1) is tested and gets in (of course).
    cout prints " ## ". (*)
    cin reads "is" and gets out.
    etc.
    (*) The thing why it gets "mixed" (I mean you type the whole string and then ## * 4 appears) is probably because terminal is flushing (and thus refreshing) stdout on Enter hit only.

  • Konqueror - inode/directory, but cannot handle this file type [solved]

    After upgrading kde 4.3, konqueror error: ...inode/directory, but cannot handle this file type. I tried this link but didn't work:
    https://lists.ubuntu.com/archives/kubun … 40719.html
    EDIT:
    Requires dolphin

    " I recompile ctag with option --disable-external-sort and everything is ok ! "
    http://tech.groups.yahoo.com/group/vim/message/89321
    Last edited by robsonpeixoto (2010-11-17 18:51:57)

  • Arch-0.7.2-ftp.iso can't handle the new kernel [SOLVED]

    hallo arch mates is there any problem when installer a fresh install from ftp with the new kernel some of my friends need to edit grup after install is it a error or is the arch-0.7.2-ftp.iso not build to handle the new kernel ??
    Over And Out  :?:

    Mh? I don't see a problem using 0.7.2 ftp install cd. Also not when editing grub file.
    But if you get problems you might try this one http://bbs.archlinux.org/viewtopic.php?t=25236
    cheers,
    deTTo

  • Hardware Question – Handling large files in Photoshop

    I'm working with some big TIFF files (~1GB) for large-scale hi-res printing (60" x 90", 10718 x 14451), and my system is lagging hard like never before (Retina MacBook Pro 2012 2.6GHz i7 /8 GB RAM/ 512GB HD).
    So far I've tried:
    1) converting to .psd and .psb
    2) changing the scratch disk to an external Thunderbolt SSD
    3) allocating all available memory to the program within photoshop preferences
    4) closing all other applications
    In general I'm being told that I don't have enough RAM. So what are the minimum recommended system requirements to handle this file size more comfortably? Newest Retina Pro with 16GB RAM? Or switch to iMac w/ 32? Mac Pro?
    Thanks so much!

    Hi Yash,
    Check this blogs for the strcuture you are mentioning:
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    Regards,
    ---Satish

  • Embarrasing question about local domain. [SOLVED]

    OK,
    Every time I set a box up I name it blackbox, tanbox, lap1 etc. But when I get to the local domain I use "kitchen" . So All the computers in the house have "kitchen" as the local domain. My question is should it be kitchen.net, .org, .com or does it matter? Do I need to specify .net, .com etc or can I just leave it as blackbox.kitchen. [edit] Or do you guys just leave localdomain as ....localdomain ?
    Is that clear?
    Thanks,
    McRae
    ps I've tried to google this and search the forums but I cannot find an answer to this.

    No , *never* use in your LAN the ID (or domain name) of a registered public domain or a fictitious name it is a matter of time before it creates you trouble.
    This explanation of using NAT will give you an idea of what I mean:
    The effect is to hide multiple hosts behind a single public IP address. Notice it is the action of sending a packet from the LAN to a host on the Internet that creates a return translation entry. Until a host on the LAN initiates contact, it is invisible to the public Internet. It has no public IP address and traffic addressed to the gateway machine is not forwarded to the LAN since there is no reverse translation entry.
    Now ... if the LAN has someone else public ID, there would be a conflict would it not? and where do the packet goes ... only God knows.
    Hope this helps.
    R

  • Lcked my apple id trying to find my security question answers how can i solve rhis problem?

    How can i unlock my apple id account and how am i going to reset my security questions cause i cant find my answers and i do not have apple care here in greece to contact them...

    1. See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities.
    2. Here are two different but direct methods:
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contacting Apple for support
            and service.
    3. For other queries about Apple ID see Frequently asked questions about Apple ID.
    4. Rescue email address and how to reset Apple ID security questions

  • I have a question to someone who can solve it : ) (about swf loader in mobile flex)

    hi
    i'm in a annoying trouble : )
    so i want someone helps me : )
    as u watched
    i'm making a program in flex 4.5 for mobile
    while making it i used swfloader
    sadly when i debug swfloader in my computer, it's working well
    but in my mobile which is galaxy s, it's not working well
    it's just restarting again and again
    do u have any idea to solve this problem??
    plz help me : )
    thanks to read

    don't worry about the mis-posting.
    I am not sure exactly what you mean by " ... a profile I don't know how to delete." Is there some PART of momluvstv that need removing? Or is this a different AppleID persona?
    If "Product Info" is it - click "Edit" or "Delete" next to where the line item is
    ÇÇÇ

  • Firefox File handling in KDE problem [SOLVED]

    Recently I've noticed that Firefox doesn't give me a default app to open a file anymore. I mean, if I click on a PDF file, it used to open a dialog offering me to open it with kpdf (default). Now that same dialog just offers me to browse for the application I want to open the file with, so I have to manually browse to /opt/kde/bin/kpdf each and every time ! And the same with other file types. Does anybody else experience this?
    You can test it clicking on this link:
    http://www.irs.gov/pub/irs-pdf/fw4.pdf
    Any help appreciated.
    Thanks.
    EDIT: I think this is related to this bug, since my /etc/mailcap and /etc/mime.types are empty except for java entry:
    http://bugs.archlinux.org/task/6801
    EDIT2: No, it doesn't have anything to do with that bug. It should work without /etc/mailcap.
    Last edited by Bogart (2007-05-22 22:34:50)

    Ok, I found the problem.
    In order to have Firefox offering you the default application to open a certain file, you need to install libgnome !
    I removed bluefish some days ago with its dependencies and since then it stopped working.
    libgnome depends on gnome-mime-data, gconf, gnome-vfs and libbonobo, but none of these are enough to make Firefox work correctly. It really needs libgnome.
    Not sure if it would be a good idea to put these dependencies on Firefox. Probably not. Each one should decide if it's worth or not. Maybe some info would be useful, though.

Maybe you are looking for

  • Problems with clipping mask, Photoshop CS6

    I have been working with a clipping mask around a complex item. This included a large clipping mask around the edge of the item, along with sections inside this path that were also 'cut out'. I am not sure how, but I seem to have done something which

  • My item was cancelled and my paid is not back

    Hi, I buy a product with my credit card and it was cancelled by BBY, my problem is that the payment was done twice!! My credit card has 2 charges for the same order, and no money back! Help me please with my situation. Regards.

  • Timer in the database

    Hello, I have a question about the timer in the database. I have a job that has a priority of 1. That job needs to run from time to time.( that is to run once and then sleep for a while.) The sleeping time is provided by another job. I am using DBMS_

  • PAC file support for Proxy Servers

    When will AIR support PAC files for proxy servers? In our network, we can't point to a PAC file because the AIR app simply ignores it, and we experience comms issues because of it. The workaround is to configure the network settings to point directly

  • JTextArea as a command line in an application

    I need to have a 'command line' area in an application I develop. I have the following JTextArea in my JFrame: JTextArea CommandArea = new JTextArea("� ");I want to make only the text behind the prompt "� " editable. If the user tries to type a comma