Search Results

Search found 15925 results on 637 pages for 'os walk'.

Page 139/637 | < Previous Page | 135 136 137 138 139 140 141 142 143 144 145 146  | Next Page >

  • Why can't I install psycopg2? (Python 2.6.4, PostgreSQL 8.4, OS X 10.6)

    - by cojadate
    After running python setup.py install I get the following: Warning: Unable to find 'pg_config' filebuilding 'psycopg2._psycopg' extension gcc-4.0 -arch ppc -arch i386 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 - DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.2.1 (dt dec ext pq3)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DHAVE_PQPROTOCOL3=1 -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I. -c psycopg/psycopgmodule.c -o build/temp.macosx-10.3-fat-2.6/psycopg/psycopgmodule.o unable to execute gcc-4.0: No such file or directory error: command 'gcc-4.0' failed with exit status 1 There's probably something screamingly obvious there to anyone who knows the first thing about back-end web programming, but unfortunately it's all gobbledegook to me. The psycopg2 documentation was not helpful.

    Read the article

  • How to change a Linux user password from python

    - by Vaulor
    I'm having problems with changing a Linux user's password from python. I've tried so many things, but I couldn't manage to solve the issue, here is the sample of things I've already tried: sudo_password is the password for sudo, sudo_command is the command I want the system to run, user is get from a List and is the user who I want to change the password for, and newpass is the pass I want to assign to 'user' user = list.get(ANCHOR) sudo_command = 'passwd' f = open("passwordusu.tmp", "w") f.write("%s\n%s" % (newpass, newpass)) f.close() A=os.system('echo -e %s|sudo -S %s < %s %s' % (sudo_password, sudo_command,'passwordusu.tmp', user)) print A windowpass.destroy() 'A' is the return value for the execution of os.system, in this case 256. I tried also A=os.system('echo %s|sudo -S %s < %s %s' % (sudo_password, sudo_command,'passwordusu.tmp', user)) but it returns the same error code. I tried several other ways with 'passwd' command, but whithout succes. With 'chpasswd' command I 've tried this: user = list.get(ANCHOR) sudo_command = 'chpasswd' f = open("passwordusu.tmp", "w") f.write("%s:%s" % (user, newpass)) f.close() A=os.system('echo %s|sudo -S %s < %s %s' % (sudo_password, sudo_command,'passwordusu.tmp', user)) print A windowpass.destroy() also with: A=os.system('echo %s|sudo -S %s:%s|%s' % (sudo_password, user, newpass, sudo_command)) @;which returns 32512 A=os.system("echo %s | sudo -S %s < \"%s\"" % (sudo_password, sudo_command, "passwordusu.tmp")) @;which returns 256 I tried 'mkpasswd' and 'usermod' too like this: user = list.get(ANCHOR) sudo_command = 'mkpasswd -m sha-512' os.system("echo %s | sudo -S %s %s > passwd.tmp" % (sudo_password,sudo_command, newpass)) sudo_command="usermod -p" f = open('passwd.tmp', 'r') for line in f.readlines(): newpassencryp=line f.close() A=os.system("echo %s | sudo -S %s %s %s" % (sudo_password, sudo_command, newpassencryp, user)) @;which returns 32512 but, if you go to https://www.mkpasswd.net , hash the 'newpass' and substitute for 'newpassencryp', it returns 0 which theoretically means it has gone right, but so far it doesn't changes the password. I've searched on internet and stackoverflow for this issue or similar and tried what solutions exposed, but again,without success. I would really apreciate any help, and of course, if you need more info i'll be glad to supply it! Thanks in advance.

    Read the article

  • Mac OS X Status Bar Application - Hiding it from Cmd/Alt menu?

    - by Moddy
    I'm trying to whip up a simple little Status Bar Application in Obj-C/Cocoa. So I have done it pragmatically - declaring an NSStatusItem, adding it to the NSStatusBar and then giving it a NSMenu object. A bit like this... NSStatusBar *bar = [NSStatusBar systemStatusBar]; theItem = [bar statusItemWithLength:NSVariableStatusItemLength]; [theItem retain]; [theItem setTitle: NSLocalizedString(@"Tablet",@"")]; [theItem setHighlightMode:YES]; [theItem setMenu:theMenu]; (Example taken from "Status Bar Programming Topics", Apple Documentation) Now ideally, I'd like this application to run and not be accessible from the CMD/ALT window changing "menu" (for lack of a better word), I've seen applications do it before and would like that really. The idea is I just want it to be accessible from every window, whilst not having its own NSMenu on the status bar, and whilst not being able to have it as the active application ( - so its not able to take over the whole Status Bar, and its not able to be seen through CMD/ALT) Additionally, I was wondering if the StatusBarItem supports the ability to drag-n-drop an item onto it? I'm not sure if thats a limitation of the NSStatusBar though. I've read up on deamons and agents, but that seems far too low level/over kill for such a simplistic app! Cheers in advance!

    Read the article

  • iPhone OS SDK: Possible to download SDK 3.0 w/o Xcode?

    - by Cirrostratus
    I recently downloaded the iPhone SDK 4 along with Xcode and neglected to install 3.0 and 3.1. I've since deleted the install package. I of course can re-download the whole package, but for future reference, I wonder if you are able to download individual SDK versions separately and independent of Xcode, like you would with almost any open source package.

    Read the article

  • Mixing libraries with and without RTTI with GCC on Mac OS X?

    - by Steve the Plant
    I've been banging my head on an issue and before I continue injuring myself some more, I'd like to confirm: Is it possible to have a GCC project that uses libraries that are compiled with and without RTTI? So, for example, I have project A (compiled without RTTI) that uses library B (compiled with RTTI) and library C (compiled without RTTI). In theory, is all that supposed to compile and link with no problems?

    Read the article

  • How to package Qt Framework on Mac OS X?

    - by Chris Kaminski
    I'm developing an application for the Mac, and I'm wicked new at this - what would be the best way to distribute the Qt Framework so that I'm not impacting an already existing framework, and so that my App.app picks up the libraries. I'm also using boost, so I'm curious how a simple bundle works with libraries.

    Read the article

  • CSS renders Input in firefox mac diffrent then firefox PC. can i detect OS via javascript? or maybe

    - by adardesign
    I have a input[type="text"] the that has padding applied to it behaves differently in firefox PC then on a mac. Any hacks that can target firefox PC? These styles are what its seen on firefox PC firebug .searchContainer input { border-color:#7C7C7C #C3C3C3 #DDDDDD; border-style:solid; border-width:1px; color:#555555; float:left; height:12px; padding:3px; } These styles are what its seen on firefox Mac firebug .searchContainer input { border-color:#7C7C7C #C3C3C3 #DDDDDD; border-style:solid; border-width:1px; color:#555555; float:left; height:12px; padding:3px; } No other styles are applied to these inputs. Here is a snapshot of FF PC http://tinyurl.com/2wdxmq5 Here is a snapshot of FF mac http://tinyurl.com/2u7f2nl any suggestions?

    Read the article

  • How do I create a nice-looking DMG for Mac OS X using command-line tools?

    - by Ludvig A Norin
    I need to create a nice installer for a Mac application. I want it to be a disk image (DMG), with a predefined size, layout and background image. I need to do this programmatically in a script, to be integrated in an existing build system (more of a pack system really, since it only create installers. The builds are done separately). I already have the DMG creation done using "hdiutil", what I haven't found out yet is how to make an icon layout and specify a background bitmap.

    Read the article

  • Is there a way to iterate over all open windows in Mac OS X?

    - by Alex
    When you unplug an external monitor with a higher resolution that your macbook from your laptop, the windows mostly retain their width, but their size gets clipped to the (smaller) height of the macbook screen. When you plug the monitor back in, their size remains frustratingly small. My question is: is there any way that I can iterate over all open windows, save their size, and restore them once the monitor gets plugged in again?

    Read the article

  • Which encoding (code page) is used for file names in ZIP archive under Mac OS x 10.6

    - by bao
    I have a zip library SharpZipLib which intended to work with ZIP archives using C#. It has parameter ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage which specifies encoding of file names in zip archive. I know that in Windows and in OSX different encodings are used to store file names. 1) Which encodings (code pages) are used in both? 2) How to determine programmatically which encoding is used? When I open in Win7 zip file packed under MacOS X, I see files with bad names (originally - cyrillic) and folder called __MACOSX, so I can say zip was prepared on Mac box. Any other way? What about other UNIX like systems?

    Read the article

  • Problems using (building?) native gem extensions on OS X

    - by goodmike
    I am having trouble with some of my rubygems, in particular those that use native extensions. I am on a MacBookPro, with Snow Leopard. I have XCode 3.2.1 installed, with gcc 4.2.1. Ruby 1.8.6, because I'm lazy and a scaredy cat and don't want to upgrade yet. Ruby is running in 32-bit mode. I built this ruby from scratch when my MBP ran OSX 10.4. When I require one of the affected gems in irb, I get a Load Error for the gem extension's bundle file. For example, here's nokogigi dissing me: > require 'rubygems' = true > require 'nokogiri' LoadError: Failed to load /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.4.1/lib/nokogiri/nokogiri.bundle This is also happening with the Postgres pg and MongoDB mongo gems. My first thought was that the extensions must not be building right. But gem install wasn't throwing any errors. So I reinstalled with the verbose flag, hoping to see some helpful warnings. I've put the output in a Pastie, and the only warning I see is a consistent one about "passing argument n of ‘foo’ with different width due to prototype." I suspect that this might be an issue from upgrading to Snow Leopard, but I'm a little surprised to experience it now, since I've updated my XCode. Could it stem from running Ruby in 1.8.6? I'm embarrassed that I don't know quite enough about my Mac and OSX to know where to look next, so any guidance, even just a pointer to some document I couldn't find via Google, would be most welcome. Michael

    Read the article

  • How can I detect if an iPhone OS device has a proximity sensor?

    - by Batgar
    The docs related to proximity sensing state that if the proximity sensing APIs are used on a device without a proximity sensor (i.e. iPod touch, iPad) they will just return as if the proximity sensor has fired. Aside from checking the [[UIDevice currentDevice].model] string and parsing for "iPhone", "iPod touch", or "iPad" is there a slicker way to determine if a proximity sensor is on a given device?

    Read the article

  • What's the correct way to stop a background process on Mac OS X?

    - by mcsheffrey
    I have an application with 2 components: a desktop application that users interact with, and a background process that can be enabled from the desktop application. Once the background process is enabled, it will run as a user launch agent independently of the desktop app. However, what I'm wondering is what to do when the user disables the background process. At this point I want to stop the background process but I'm not sure what the best approach is. The 3 options that I see are: Use the 'kill' command. Direct, but not reliable and just seems somewhat "wrong". Use an NSMachPort to send an exit request from the desktop app to the background process. This is the best approach I've thought of but I've run into an implementation problem (I'll be posting this in a separate query) and I'd like to be sure that the approach is right before going much further. Something else??? Thank you in advance for any help/insight that you can offer.

    Read the article

  • Ruby implementation of conversion between Latitude/Longitude and OS National Grid Reference point?

    - by Harry Wood
    For converting between Latitude/Longitude and UK's Ordnance Survey National Grid eastings and northings, this seems to be the most popular explanation and reference implementation in JavaScript: http://www.movable-type.co.uk/scripts/latlong-gridref.html The web is littered with other implementations in different languages. Making the conversion via PostGIS queries is another alternative. ...but did anyone implement this maths in ruby? OSGridToLatLong is the direction I'm looking for just at this moment, but I would have thought a library for converting in both directions must surely be available in a gem somewhere. I'm just not searching for the right thing.

    Read the article

  • Can Android OS be programmed to interface with a external device via the mini-USB port?

    - by user322865
    Basic example, if I bought a chipset with a light socket and bulb soldered to the chipset; then put a USB cable with the mini-USB plug on the end to get plugged into the android phone. Can I write a Java application to turn on/off the light, get the status of the light(on/off) and maybe power a super-small led/bulb with power from the phone itself? Any insight at all would be greatly appreciated. Thank you

    Read the article

< Previous Page | 135 136 137 138 139 140 141 142 143 144 145 146  | Next Page >