Python without tk

Would it be possible to split the python package into one that does not require tk (and therefore X) to be installed?  I'm a big fan of python and use it for server scripts and don't like running X on servers.
I believe all it would require is a "--without-tk" to the configure script in the PKGBUILD to produce a tk-less python package.  At least that's what I do via abs.
Thanks in advance,
farphel

Xentac wrote:The difference between perl/perltk and python/pythontk is that perltk is actually a seperate module, pythontk is distributed with the base python tarball.
You're right about perl/perltk.  However, I think the python/pythontk is a bit of a grey area.  Python ships with Tk support (a module called Tkinter), but the only way it is built is if the host system already has Tcl/Tk installed.  If Tk is not installed and you compile python from source, you do not get Tkinter (or IDLE).  If python is built without Tkinter, it does not in any way affect python, its performance, or its usability.  That's why I feel that having the python package require Tk is a mistake.
Xentac wrote:One of the package design decisions that's been around since before I started is that no packages would be artificially split.  That is, nothing the upstream developers meant should be together should be split into seperate pieces.  If the upstream developers split it, then we'd have two packages, otherwise we leave it as one.
Thanks for the clarification, Xentac.  This sheds some insight onto why python requires Tk.
Xentac wrote:Splitting packages also makes for a maintenance nightmare.
Well, your point is valid for packages with many compile options, or possible dependencies on other software.  In this case, I don't think it would be that bad to have to monitor upstream python release and rebuild an additional pythontk package.  However, your point is well taken.  Afterall, the reason why I'd rather see the python package split up is so that I (as an end-user) do not have to deal with it but would rather have an Arch package maintainer deal with it.  I know that sounds lazy, but oneof the reasons I love Arch so much is that the package maintainers do such an excellent job keeping up with new versions and providing solid packages.  I'd like to continue relying on them! 
Xentac wrote:Arch's design goals is to be simple and cut out all the crap.
That's one of my peeves with this too.  I consider Tk extra "crap".  If I were to write a GUI using python, I would rather use pyGTK or pyQT (both of which are also platform independent).  Of course this is a personal opinion.
Xentac wrote:I'm not voting either way here.  I'm just clearing what I see as some misconceptions up.  Please continue the arguing.
I'm guessing it will be difficult to rely on community opinion to drive this decision.  How many professional python programmers are using Arch?  Do they write GUIs using Tkinter?  Would all of those people care to weigh in on the discussion?  And yes, I basically program in python exclusively for my day job.  I'm not saying that that entitles me to a better opinion.  It's just that when it comes time to deploy my python applications on a sserver, I want my server to be as lean as possible.  If I have to install X just to use a scripting language, then I feel that there is something wrong with the way it is being packaged.  I don't like installing extra software cruft on my servers - it's just more software to monitor for local/remote exploits.
Anyway, I've stated my case and what I think is a good solution.  There are workarounds for me such as the -d flag for pacman or rebuilding my package via abs (which I'm currently doing).  I just feel that my point is valid and would love to see it adopted.
Cheers,
farphel

Similar Messages

  • How to use Gnuplot library in Python without X11?

    Hello,
    I need generate graphs in Python2 with Gnuplot. I have installed gnuplot-py and gnuplot packages.
    In Python console I execute
    import Gnuplot
    Gnuplot.Gnuplot(debug=0, persist = 0)
    After the second command the ouput is:
    >>> import Gnuplot
    >>> Gnuplot.Gnuplot(debug=0, persist = 0)
    <Gnuplot._Gnuplot.Gnuplot instance at 0x28d2830>
    >>>
    gnuplot: unable to open display ''
    gnuplot: X11 aborted.
    I can see in htop 'gnuplot' and 'gnuplot_x11' processes exists until I close the python console.
    While installing gnuplot package I've noticed the package has X11 dependencies. My machine is headless; can I compile Gnuplot without X11 support? Or is there anything I do wrong?
    Thanks

    This would not be done in TestStand. You would create the code in LabVIEW (or .NET, CVI, C++) and TestStand would call the that code.
    See here for an example in LabVIEW:
    https://decibel.ni.com/content/docs/DOC-13287
    CTA, CLA, MTFBWY

  • How to use Berkeley DB in an application without installing

    I'm using Berkeley DB in a python project, and I am wondering if I can make the libraries available to python without specifically installing berkeley DB.
    How can you embed Berkeley DB in an application generally?
    Has anyone done this with python and bsddb3?
    Thank you
    Sachi.

    The python BDB libraries are maintained independently of Oracle.  You will probably have more success asking this question on the BDB python mailing list at https://mailman.jcea.es/listinfo/pybsddb
    Lauren Foutz

  • {"success":false,"msg":"package file parameter missing"} while trying to upload a package via python

    Hello,
    I try to write a command line script for administrating CQ5 via command line not using curl or wget. When I try to upload a package I get the following error message: {"success":false,"msg":"package file parameter missing"} So what parameter (sure "file") is missing or how do I have to "put it in"?
    To be more precise:
    When using curl, everything works fine, so I looked at the header and body curl sends and rebuilt both via python - without success. And curl does not send a "file" parameter by the way, or I didn't see it.
    Best regards,
    Rene

    For RMA Line. I am assuming you have already created a 'RETURN' type transaction Type, and tied that to the AR transaction type. if yes, then just follow the COPY UTILITY to copy the original line into a RMA line using the Copy Utility as below. Let me know if that was helpful.
    debug_message('Start Copying order..');
    l_copy_rec.api_version_number := 1;
    l_copy_rec.init_msg_list := 'T';
    l_copy_rec.COMMIT := 'T';
    l_copy_rec.Copy_Order := 'T';
    l_copy_rec.hdr_count := 1;
    l_copy_rec.append_to_header_id:= NULL;
    l_copy_rec.hdr_info := 'T';
    l_copy_rec.hdr_type := l_refund_order_type_id;
    l_copy_rec.hdr_descflex := 'T'; -- changed to 'T'; Dipanjan; 03/06/2012
    l_copy_rec.hdr_credit_card_details := 'F';
    l_copy_rec.hdr_scredits := 'T';
    l_copy_rec.hdr_attchmnts := 'T';
    l_copy_rec.hdr_holds := 'F';
    l_copy_rec.manual_order_number:= NULL;
    l_copy_rec.all_lines := 'F';
    l_copy_rec.line_count := l_line_ids.count;
    l_copy_rec.line_type :=&l_refund_line_type_id; -- replace with the 'Return' type transaction type Id
    l_copy_rec.incl_cancelled := 'T';
    l_copy_rec.line_price_mode := 1;
    --l_copy_rec.line_price_date := NULL;
    -- l_copy_rec.line_discount_id := NULL;
    l_copy_rec.line_descflex := 'T';
    l_copy_rec.line_scredits := 'F';
    l_copy_rec.line_attchmnts := 'T';
    l_copy_rec.line_payments := 'T';
    l_copy_rec.return_reason_code := 'WRONG ITEM';
    l_copy_rec.default_null_values:= 'F';
    l_copy_rec.copy_complete_config := 'T';
    l_header_id(1).id1 := &l_orig_header_id;--- replace with original header Id
    Oe_order_copy_util.copy_order( p_copy_rec => l_copy_rec
    ,p_hdr_id_tbl => l_header_id
    ,p_line_id_tbl => l_line_ids
    ,x_header_id => l_query_header_id
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data);
    debug_message('End Copying order..');

  • Python as Bash Replacement: coreutils?

    Hello,
    I want to start replacing my Bash scripts with Python ones, partly due to Python's performance being much better. However, all the modules I found whose goal is to aid replacing shell-scripting with Python, interface with the GNU coreutils through `subprocess`. As we all know, forking the process to call external programs is why shell scripts are that much slower.
    I was wondering if there's a Python module/library that replaces the behaviours of the coreutils, so that I don't have to write them myself, e.g. a `tail` behaviour written in Python. Or any other modules/libs that would aid in shell-scripting with Python without `subprocess`.
    Last edited by NewWorld (2014-03-22 07:38:36)

    lykwydchykyn wrote:Well, "os" covers a lot of ground, but you probably knew that already.  I'm not sure how you'd expect python implementations of coreutils to be faster than the C versions that BASH is calling.
    I have done research which concludes that shell scripts are a lot slower than Python. See this graph from this blog post, and this graph from this blog post.
    This answer on SO gives an explanation for shell scripts being slower:
    shell scripts are inherently slow, especially when they use a lot of external commands like yours. Biggest reason for this is because spawning external process is rather slow, and you do it a lot of times.
    If you are really after high performance processing of your data, you should write Perl or Python script which would do what you need without ever spawning any external process: no dos2unix, no grep, no cut or anything like that.
    @progandy, thanks a lot for the link. This module is also available for Python 2.7, which is what I'll be writing in.
    tomk wrote:
    NewWorld wrote:It's alpha and it's buggy
    Maybe you could help make it beta and less buggy?
    As I mentioned in the original post, I don't want to be writing  these tools myself; I'm already prone to RSI pain and that's just not how I want to spend my free time just to be able to write shell-scripts easier from within Python.

  • How to make Applescript open AI then open file then run ExtendScript then close?

    Here's the sample Applescript code I came up with using the scripting guide/reference for CS6 and also doing some online searches:
    tell application "Adobe Illustrator"
        activate
        delay 10
        set pfilepath to "/Users/username/Documents/Temp/someFile.ai"
        set pfile to POSIX file pfilepath
        open pfile as alias without options
        delay 10
        do javascript "#include '/Users/username/Documents/Temp/someScript.jsx'"
        delay 1
        quit
    end tell
    I just want to open the app (sample here for AI but also nice to do same for Photoshop), open a file, then run ExtendScript file against it, then close after processing. With this sample script, all that works is the app launches. No file opened, no script ran, app doesn't close at end. I see no errors pop up nor anything show up in command prompt.
    The sample ExtendScript just triggers an alert popup message for testing
    Also to note, the Applescript snippet is executed from Python but I believe where/how it's executed shouldn't matter (except maybe where the error messages might show up). Although in worse case, I'll debug/run through the AppleScript editor.
    Any tips on what's wrong here? Or does it look technically correct?

    No, I don't have specific documentation, but you can put together such for Python from bits & pieces here & there. And yes, I made it cross-platform to anticipate Adobe users on both Mac & PC, for which there currently are, though for what we're doing skews towards Windows for now.
    For the COM API, follow the VBScript reference and code samples. Just convert the method calls to Python COM. There will be slight syntax differences sometimes (e.g. add "()" to method call for VBScritp subroutines that don't need them, etc.). The scripting guide link below should have code samples for VBScript.
    http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2014/Illustrator% 20Scripting%20Reference%20-%20…
    http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2014/Illustrator% 20Scripting%20Guide.pdf
    For example of Python COM, you can search online, or look at AutoItDriverServer/server.py at master · daluu/AutoItDriverServer · GitHub, which may be bit much/complex for you? For Python COM, you either need ActivePython or regular Python plus Python for Windows Extensions (e.g. pywin32).
    For Applescript and Python, this post might be useful: osx - Calling AppleScript from Python without using osascript or appscript? - Stack Overflow
    for the rest of the the cross-platform support, it's just generic python to parse command line arguments, etc. You may want to query what platform the script is running under using some standard Python modules (os, system). An example can be found in AutoPyDriverServer/server.py at master · daluu/AutoPyDriverServer · GitHub
    Hope that helps.

  • TSAPI Error -17808: Wrong Number of Positional Parameters

    I am trying to determine some more details as to why I am receiving this error. The error is generated whenever I try to access any method from the TSAPI.
    I am passing the sequence context into a COM Automation Server, and if I attempt to call a method, then this error is generated. Accessing properties seems to work fine.
    Can someone provide more details regarding this error. I have searched through the documentation and the discussion forum but have not found anything explaining this.
    Thanks in advance for any help.
    Jeff
    Attachments:
    screenshot.bmp ‏1155 KB

    Scott,
    Unfortunately it's a litte bit more involved than that.
    I am trying to use test code written in a scripting language called Python.
    Python has good support for COM on win32, and is able to implement COM Servers and Clients.
    However, the one thing that Python doesn't do is use or generate a type library.
    So, using your suggestion to a question I posted a day or two ago regarding accessing a COM Server that has no type library, I wrote a simple VB DLL wrapper around the COM Server that's implmented in Python.
    On the surface, this seemed to work out ok. The next problem I encountered however was when I tried to call methods off of the sequence context.
    I pass a reference to the sequence context all the way down to my Python COM Se
    rver, and then try to call methods on that server.
    Any method call results in Error -17808. It is very likely that this is a problem in Python, however, I was looking for some more details on this particular error to try and work towards a resolution.
    At this point, I am about to fall back on writing a C++ ATL COM Server that wraps up the Python Interpreter and call my scripts that way. I was hoping that I could get the Python Server to work though, because it would give full access to the sequence context from Python, without having to write all the code to expose the context to Python via the C++ DLL.
    So, there's the story. I could give you some code if your interested, I don't know if you're familar with Python at all. I've looked to the Python community for some help on this as well, but haven't made any progress on that front.
    The only other piece of data that seems odd is that any access to a property, for example, SequenceContext.Id, seems to work fine.
    Howeve
    r, the following line of code produces the error:
    #Python Code accessing Sequence Context.
    context.SetValNumeric("Locals.MyParm", 0, 10.0)
    Jeff

  • IDL to JAVA - problem with enum, const assignment

    Hi,
    I have a problem with compile IDL to JAVA.
    I want to compile foo.idl to java by command:
    idlj foo.idl foo.idl:
        enum color {
          blue,
          red,
          green,
          yelow
        const color DEFAULT_COLOR = blue;But I get errors:
    foo.idl (line 8):  The type of  is enumeration, but it should be primitive or string.
    const color DEFAULT_COLOR = blue;
    foo.idl (line 8):  Identifiers in constant expressions must be constants, not blue.
    const color DEFAULT_COLOR = blue;I don't think that IDL file (foo.idl) is wrong, because I compile this file to c and python without errors.
    Can you help me?

    Let's take this one step at a time.
    1. You have successfully configured ABAP/Java communication using template installer? See note 917590.
    2. Did you assign the portal user appropriate portal roles?
    3. Can you start a web query from 7.0 query designer?

  • Building gdal with OCI support- seems to work manually, not in makepkg

    I'm attempting to rebuild the gdal package under x86_64 with Oracle Spatial support at the latest version (1.9.2) (the version in community is at 1.9.0 right now and does not include Oracle support).
    gdal uses the standard autoconf/automake toolchain for its build process, and allows users to specify which external libraries they want to link in the configure script.  To enable Oracle Spatial support in gdal, one would pass the --with-oci option to configure.  This works fine for me and detects the contents of my oracle-instantclient-basic and oracle-instantclient-sdk packages (aur packages containing the necessary Oracle libs and headers) when I do it manually, i.e.:
    ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 \
    --with-geotiff --with-mysql --with-python --without-libtool --with-curl \
    --with-hdf5 --with-perl --with-geos --with-png \
    --with-oci
    However, when the exact same line runs inside of the build() function of a makepkg run, the configure script fails to detect the OCI libraries.  I know that the configure script is supposed to work by reading the ORACLE_HOME environment variable to find the necessary Oracle libraries and headers, and I've double-checked that this environment variable is being set properly inside of the makepkg run with a couple of echo statements before the configure line is run. 
    Is there something else that I could be missing about the environment variables or build context inside of makepkg that could be causing this?  I've already looked through /etc/makepkg.conf and couldn't find anything that would seem to make a difference, but I'll readily admit that I don't have a ton of knowledge about the autotools library detection process other than the fact that I've built a few packages with the toolchain.
    Any help/ideas would be greatly appreciated.  Here's the PKGBUILD I'm using if you want to try it for yourself (based off of gdal 1.9.0-1 in community): https://gist.github.com/3920468

    I'm attempting to rebuild the gdal package under x86_64 with Oracle Spatial support at the latest version (1.9.2) (the version in community is at 1.9.0 right now and does not include Oracle support).
    gdal uses the standard autoconf/automake toolchain for its build process, and allows users to specify which external libraries they want to link in the configure script.  To enable Oracle Spatial support in gdal, one would pass the --with-oci option to configure.  This works fine for me and detects the contents of my oracle-instantclient-basic and oracle-instantclient-sdk packages (aur packages containing the necessary Oracle libs and headers) when I do it manually, i.e.:
    ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 \
    --with-geotiff --with-mysql --with-python --without-libtool --with-curl \
    --with-hdf5 --with-perl --with-geos --with-png \
    --with-oci
    However, when the exact same line runs inside of the build() function of a makepkg run, the configure script fails to detect the OCI libraries.  I know that the configure script is supposed to work by reading the ORACLE_HOME environment variable to find the necessary Oracle libraries and headers, and I've double-checked that this environment variable is being set properly inside of the makepkg run with a couple of echo statements before the configure line is run. 
    Is there something else that I could be missing about the environment variables or build context inside of makepkg that could be causing this?  I've already looked through /etc/makepkg.conf and couldn't find anything that would seem to make a difference, but I'll readily admit that I don't have a ton of knowledge about the autotools library detection process other than the fact that I've built a few packages with the toolchain.
    Any help/ideas would be greatly appreciated.  Here's the PKGBUILD I'm using if you want to try it for yourself (based off of gdal 1.9.0-1 in community): https://gist.github.com/3920468

  • Assertion failure from ccfe in Solaris Studio 12.4 beta July refresh

    I have found a way to get an assertion failure from the ccfe program that comes with the Solaris Studio 12.4 beta July refresh.  The error that gets printed is:
    >> Assertion:   (../lnk/funcsym.cc, line 1679)
        while processing text_woarchive.pre.cpp at line 0.
    The problem occurs whilst compiling Boost 1.54.  The original file in the distribution that causes it is libs/serialization/src/text_woarchive.cpp.
    This problem can be reproduced by getting the pre-processed code I've put on http://pastebin.com/E9vxi2z7 and pasting it into a file called text_woarchive.pre.cpp.  Then run:
    CC -std=c++11 -mt -m64 -c -o text_woarchive.o text_woarchive.pre.cpp
    and you get the assertion failure.
    Running:
    CC '-#' -std=c++11 -mt -m64 -c -o text_woarchive.o text_woarchive.pre.cpp
    shows that the assertion is coming from ccfe.
    In case you go back to the original Boost source code I should tell you that prior to generating the pre-processed source I changed:
    #ifdef __SUNPRO_CC
    to:
    #if 0
    in boost/archive/detail/register_archive.hpp.  I did this because there was an error in the __SUNPRO_CC section and I wondered if that workaround code was no longer required with the more modern C++ compiler.  Therefore, I cannot guarantee that the pre-processed source is 100% valid C++ code.  However, even if it's not it would be nice to get a clear error message out of ccfe rather than an assertion failure.
    In case it's relevant, I'm working on Oracle Solaris 10 1/13 s10x_u11wos_24a X86.

    You mentioned in the other answer that you are testing with Boost 1.55.  Are you testing this in C++11 mode?
    Today I downloaded Boost 1.55 and did the following:
    In both tools/build/v2/engine/build.sh and tools/build/v2/tools/sun.jam globally replace SUNWspro with SolarisStudio12.4-beta_jul14-solaris-x86
    In tools/build/v2/tools/sun.jam replace:
    feature.extend stdlib : sun-stlport ;
    feature.compose <stdlib>sun-stlport
        : <cxxflags>-library=stlport4 <linkflags>-library=stlport4
    with:
    feature.extend stdlib : sun-stlport ;
    feature.compose <stdlib>sun-stlport
        : <cxxflags>-std=c++11 <linkflags>-std=c++11
    Note: This is just the quick way I found to con the Boost build system into using C++11 instead of STLport.  The feature in the jam file still has stlport in its name, but that's only a name and the code is being built in C++11 mode.
    In boost/math/special_functions/detail/lanczos_sse2.hpp change line 15 from:
    #if defined(__GNUC__) || defined(__PGI)
    to:
    #if defined(__GNUC__) || defined(__PGI) || defined(__SUNPRO_CC)
    Run:
    ./bootstrap.sh --without-libraries=context --without-libraries=coroutine --without-libraries=graph_parallel --without-libraries=log --without-libraries=mpi --without-libraries=python --without-libraries=test --without-icu
    Run:
    ./b2 -j4 --layout=versioned --disable-icu address-model=64 threading=multi optimization=speed inlining=full
    At this point the vast majority of the code builds, but does not link.
    There are 3 problems:
    The compilation problem with tuple that you've already fixed
    A linker problem with finding std::string related symbols - maybe also related to the gcc header upgrade and now fixed?
    Numerous compilation problems caused by boost/archive/detail/register_archive.hpp
    For this last one the code in the #ifdef __SUNPRO_CC section of boost/archive/detail/register_archive.hpp does appear to be invalid, and leads to the errors:
    "./boost/archive/detail/register_archive.hpp", line 45: Error: The function "adjust_counter" must have a prototype.
    "./boost/archive/detail/register_archive.hpp", line 46: Error: Expression must have a constant value.
    "./boost/archive/detail/register_archive.hpp", line 47: Error: Expression must have a constant value.
    "./boost/archive/detail/register_archive.hpp", line 48: Error: An integer constant expression is required within the array subscript operator.
    Even with Boost 1.55, attempts to fix this lead to the same ccfe assertion.  Trying to use the #else part of the code as I described in the original post does, as does moving the line:
    char adjust_counter(counter<0>);
    so that it comes before the place where adjust_counter is used also then leads to the same assertion:
    >> Assertion:   (../lnk/funcsym.cc, line 1679)
    It's as though any change to boost/archive/detail/register_archive.hpp that fixes the basic code ordering issue lets ccfe get far enough to cause the assertion.
    If there is somebody in your team looking at whether Boost 1.55 compiles with Solaris Studio 12.4 in C++11 mode then hopefully they can relate to what I'm seeing here.  One key point is that they'll have had to edit the jam files to use C++11 mode.
    The other thing is that any insights the person who has been trying to build Boost 1.55 has would be very useful.  I know you don't want to get into officially supporting it, but maybe a blog post with any unofficial hints and tips on getting Boost to build in C++11 mode could be a way to share knowledge.

  • Iphone in recovery and NEED PICTURES

    any way, any possibility of retrieving pictures from an iphone 4 in recovery mode?  the phone is not recognized in iphoto.  there are a few complicated step by steps listed when i google it - do these work (considering i have someone who knows what they're doing following the instructions)?

    SaotomeRanchan wrote:
    Chris CA, where on earth did you get the idea that I went to a 12-hour event and took 6,000 photos? Perhaps you're refering to the comment about people who keep 6,000 photos on their phone without ever backing them up? I went to a FOUR hour event and took somewhere between 100 and 200 photos.
    As it is, I gave up because I was not getting any helpful advice from these discussion boards. I clicked restore, and I got an error 4013, so apparently this iPhone is an ex iPhone.
    Don't paraphrase Monty Python without a license from the BBC, please.
    Also:
    iOS: Restore errors 4005, 4013, and 4014
    Symptoms
    When you try to update or restore your iPhone, iPad, or iPod touch, iTunes may display one of these messages:
    The iPhone [device name] could not be restored. An unknown error occurred (4005).
    The iPhone [device name] could not be restored. An unknown error occurred (4013).
    The iPhone [device name] could not be restored. An unknown error occurred (4014).
    This may happen if the device unexpectedly disconnects during the update or restore or iTunes couldn't tell the device to go to the restore state. 
    Resolution
    Try these steps to resolve the issue:
    Install the latest version of iTunes.
    Restart your computer.
    Make sure your computer is up to date. If an update requires a restart, check for updates again after you restart.
    Learn more about updating OS X.
    Learn more about updating Windows.
    Restore using another USB cable.
    Restore your device on another computer.
    If you continue to see error 4005, 4013, or 4014 when you restore your device, contact Apple for support.
    Learn more about other update and restore errors.

  • Using Azure Python API to create VM without exception, but the VM is not launched....

    This is the scenarios:
    I have created a custom Linux VM image and I have successfully launch a VM using the Python API on region US-WESt.  
    My goal is to create a custom Linux VM on a VNET.
    This is what I have done:
    1. Knowing that using Python API to create Virtual Network (VNET) is not supported yet, I manually created a VNET using Console.
    2. Using Python API to create hosted service (cloud service) on the same location as the VNET I created.
    3. Using Python API to launch the VM on the VNET.
    4. without any exception nor error, the VM is just not created...
    The Python APIs I used:
    #create a VM
    name = 'myCloudN'
    location = 'West US'
    sms.create_hosted_service(service_name=name,
        label=name,
        location=location)
    image_name = 'cloudN-Azure-20150205-os-2015-02-05'
    media_link = 'https://xxxxxxxxxxxxxxxxxxxxxx.windows.net/vhds/cloudN-Azure-20150205-os-2015-02-05.vhd'
    linux_config = LinuxConfigurationSet('cloudN-1', 'ubuntu', 'ubuntu1!', True)
    os_hd = OSVirtualHardDisk(image_name, media_link)
    vnet_name = 'test1'
    sms.create_virtual_machine_deployment(
        service_name=name,
        deployment_name=name,
        deployment_slot='production',
        label=name,
        role_name=name,
        system_config=linux_config,
        os_virtual_hard_disk=os_hd,
        virtual_network_name=vnet_name,
        role_size='Small')
    <azure.servicemanagement.AsynchronousOperationResult object at 0x90669ec>   <=====I got this
    try:
       props = sms.get_deployment_by_name(name, name)
       print vars(props)
    except Exception as pe:
       print "Error on get_deployment: %s" %str(pe)
    Error on get_deployment: Not found (Not Found)  <======== Cannot find my VM
    Did I miss anything or the Python API is not ready for this yet....
    Please help.
    Big thanks in advance...

    I did create the cloud service.   In my original post, the first thing I do is to create the cloud service.
    The API I used to create cloud service was "create_hosted_service".
    #create a VM
    name = 'myCloudN'
    location = 'West US'
    sms.create_hosted_service(service_name=name,
        label=name,
        location=location)
    Please help.

  • Use VirtualBench API without LabVIEW. Example: Python, DLLs, etc.

    Hello,
    I would like to know if there is a way to use the VirtualBench API without LabVIEW?
    Like using python or something.
    Thank you
    Solved!
    Go to Solution.

    We just released version 1.1 of VirtualBench that adds a C API and a bunch of other features, see http://forums.ni.com/t5/VirtualBench/Announcing-free-firmware-update-version-1-1-adds-SPI-and-I2C/td....  With that you could use VirtualBench in your programming language of choice if you write the appropriate bindings.
    Zach Hindes
    NI R&D

  • How do i call these functions without an error? Python

    Hi, I'm confused on how to call these functions I'm continuously getting error can you please help me.
    I am also unsure on how parameters work and don't know what I need to write in them, i'm a bit of noob so will need you to explain thoroughly thank you
    I am trying to get a dice roll and then the player chooses which counter to move, the program will then automatically minus the movement from the counters position
    counter = ()
    postiony_red1 = 605
    postiony_red2 = 605
    def dice_roll():
        import random
        dice = random.randint(1, 4)
        print("You rolled a", dice)
        if dice == 1 :
            print("You can step forward", dice, "move")
        elif dice == 2 or dice == 3:
            print("You can move", dice, "steps forward")
        else:
            print("You can move 1 space back")
        input("Press return")
        return dice
    def move(dice):
        if dice == 1:
            move = -60
        elif dice == 2:
            move = -120
        elif dice == 3:
            move = -180
        elif dice == 4:
            move = 60
        print("move")
        return move
    def ask_player():
        while counter != ("counter 1") or ("counter 2"):
            counter = input("Do you wish to move counter 1 or counter 2?")
            return counter
    def counter_postion():
        if counter == ("counter 1"):
            move += postiony_red1
            print("total move is", move)
        elif counter == ("counter 2"):
            move += postiony_red2
            print("total move is", move)
    dice_roll()

    This forum section here is about Small Basic programing language!
    I dunno Python, but the few droplets I've heard about is that Python is very strict about global variables!
    And that every time we need to assign values to them, we gotta declare it w/
    global keyword inside each function that needs it:
    def ask_player():
    global counter
    while counter != "counter 1" or "counter 2":
    counter = input("Do you wish to move counter 1 or counter 2?")
    return counter
    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

  • Unable to open Terminal.app without automaticaly launching Python

    Hello everyone,
    Recently, I developped a very small application in Python/Tkinter for my father under my Linux laptop.
    I tried to execute the application on my father's computer (under MacOS X) by simply double-clicking the "application.py" file on the desktop.
    The script launched relatively well with it GUI and a terminal Window for python's "stdout" and "stderr". I identified a small bug with UTF-8 string and corrected it.
    Later, I wanted to open a standard Terminal window, but for every window I tried to open, the command to launch my script ("usr/bin/pythonw" "path/to/my/script") was parsed and my script was automaticaly launched.
    I tried to reboot, to see if it was a simple environment variable that was corrupted.
    But nothing, every time I launch Terminal.app, it launches my script with it.
    Someone here has got an idea to locate the origin of that strange behavior of Terminal.app ?
    I didn't found any .bashrc in my father home directory ... so I'm not sure of what file is executed by Terminal.app at launch.
    Thank you for any help

    Hi Jeremy,
    open ~/Library/Preferences/com.Apple.Terminal.plist and locate the line "ExecutionString" it will probably contain the path and name of your Python application. Delete it to prevent Terminal from lauching your app.
    Hope this will help you
    Regards,
    Didier

Maybe you are looking for

  • Provisioning a user in MSAD from OIM

    Hi all, I am trying to provision a user from OIM to MSAD through direct provisioning. After performing the steps for provisioning, i get the status of create user as rejected and the task is asssigned to xelsysadm for approval though it is direct pov

  • Different QoS values in the same WLAN

    Hi, Now, with all the unified communications, voice, video and data are in the same device, and I try to give priority to voice and some applications, but in the WLC I can not find the way to mark all that kind of packets. Is it possible to do that?

  • ? How do I delete large blocks of empty space with Adobe Acrobat Pro?

    How do I delete large blocks of empty space with Adobe Acrobat Pro?

  • Problem in deadline monitoring of batches

    Dear experts, Deadline monitoring of batches (transaction QA07) is not working. I tried running this but it did not post stock of a batch whou2019s expiry date was in next 2 days in blocked stock. I had specified the material no, plant, initial run i

  • OLE Access and JSP

    I have stored an Excel page in Microsoft Access and defined its attribute to be OLE object. My table is called practice and my database is called dissertation. I want to display the Excel file in a table in a JSP page. Please help....