Search Results

Search found 19863 results on 795 pages for 'python subprocess module'.

Page 7/795 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • calling a different python interpreter from bash command line

    - by Dennis Daniels
    I have python 2.7 installed [user@localhost google_appengine]$ python Python 2.7 (r27:82500, Sep 16 2010, 18:03:06) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. I want to use the python 2.5.2 that is in this directory [user@localhost Downloads]$ ls |grep "Python-2*" Python-2.5.2 Python-2.5.2.tgz to run a python script in Khan Academy platform against a google app engine application sudo python sample_data.py -a ~/workspace/GAE/google_appengine/appcfg.py upload Currently, when running the last script 2.7 python complains a lot (Google App Engine runs on 2.5.2 mostly and 2.6 almost) I would like to do something like sudo python env set ~/Downloads/Python-2.5.2 sample_data.py -a ~/workspace/GAE/google_appengine/appcfg.py upload Is this possible? If yes, please point the way. If not, please suggest a way to call python2.5.2 WITHOUT having to uninstall python 2.7 many many thanks Dennis

    Read the article

  • CentOS (rel6) with default python 2.6, but seperate 3.3.5 installation

    - by Silvertiger
    I have a CentOS server (rel6) that had python installed (2.6), but I needed a few features in 3.3+. I installed 3.3 into a seperate folder and made a symbolic link to execute it: I installed setup tools: yum install python-setuptools I installed a needed module"pandas" easy_install pandas I executed my pyton script, which encountered an error that required i use a newer version I downloaded and installed Python 3.3.5 to it's own folder so as to not override my default python wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz tar xJf ./Python-3.3.5.tar.xz cd ./Python-3.3.5 ./configure --prefix=/opt/python make make install Made s symbolic link to allow me to execute this new python: ln -s /opt/python3.3/bin/python3.3 ~/bin/py The problem is that when I execute the python script with my new py alias, it does not have all the addons needed (explicitly MySQLdb) which the default install does. How do i go about installing the MySQLdb module, or any for that matter, to be reachable or useable for the new Python 3.3.5 installation? Or is there a way to make the current modules in 2.6 available to 3.3.5 as well?

    Read the article

  • Application Development: Python or Java (or PHP)

    - by luckysmack
    I'm looking to get into application development, such as Facebook or Android apps and games. I am doing this for fun and to learn. Once my skills are to par I would like to have some side income from the apps, but I'm not banking on living off that (just so you know where I'm coming from and know what my end goals are). Currently I know and am familiar with PHP and frameworks such as cakephp and yii. However, I have been wanting to learn another language to broaden my horizons and to become a better developer. So I have narrowed it down to 2 languages. Python, and Java (I can already hear people cringing at the difference in the languages I have chosen, but I have some reasons). Python: closer to PHP that Java. Cross platformability. Also great as a general scripting language and has many file system level benefits that PHP does not. Cleaner syntax, readability, blah blah and the list goed on. Python will work great for cross platform apps and can be run on many OS's and is supported by Facebook for app development. But there is no support on Android (for full fledged apps). Java: a much stronger typed language, very robust community and corporate backing. Knowing Java is also good for personal marketability for enterprises, if you're into that. The main benefit here is that Java can write apps natively for Android and the apps can be ported for web versions to play on Facebook. So while I have seen many developers prefer Java over the two, Java has this significant advantage, where I can market my apps in both markets and in the future build more potential income. But like I said it is for fun. While money isn't the goal, it would still be nice. PHP: I'm putting this here because I know it already, and I'm sure a case could be made for it. It obviously works great for Facebook but like Python does not do so well on android. While it's mostly the realm of 'application development' that appeals to me, I do find Android apps fairly interesting and something that has a ton of potential to. But then again Facebook has a ton more users and the apps can also potentially be more immersive (desktop vs. mobile). So this is why I'm kinda stuck on what route to choose. Python for Facebook and web apps, with likely faster development to production times, or Java which can be developed for any of the platforms to make apps. Side note: I'm not really trying to get into 3D development, mostly 2D. And I also want to make an app with real-time play (websockets, etc). Someone mentioned node, js to me for that but Python seems to be more globally versatile for my goals. So, to anyone that does Facebook or Android development in either language: what do you suggest? Any input is valuable and I do appreciate it. And sorry for being long winded. EDIT: as mentioned in one of the answers, my primary goal is gaming. Although I do have some plans for non gaming apps such as general web based and desktop based ones. But gaming is my main goal with the possibility of income. EDIT: Another consideration could be Jython. Writing Python code which is converted into Java bytecode. This would allow the ability to do Android apps using Python. I could be wrong though, I'm still looking into it. Update 1-26-11: I recently acquired a new job which required I learn .NET using C#. Im sure some of you are cringing already but I really like the whole system and how it all works together between desktop and web development. But, as I am still interested in Python very much, and after some research I have decided I will learn Python as well as the IronPython implementation for .NET. But (again: I know...) since .NET is mostly a Windows thing and not as cross-compatible as I like, I will be learning Mono which is a cross platform implementation of .NET where I can use what I learn at work using C# and what I want to learn, Python/IronPython. So while learning and writing C#/.NET @ work I will be learning Python - Mono - Iron Python for what I want to do personally. And the benefit of them all being very closely related will help me out a lot, I think. What do you guys think? I almost feel like that should be another question, but there's not much of a question. Either way, you guys gave very helpful input.

    Read the article

  • Python productivity VS Java Productivity

    - by toc777
    Over on SO I came across a question regarding which platform, Java or Python is best for developing on Google AppEngine. Many people were boasting of the increased productivity gained from using Python over Java. One thing I would say about the Python vs Java productivity argument, is Java has excellent IDE's to speed up development where as Python is really lacking in this area because of its dynamic nature. So even though I prefer to use Python as a language, I don't believe it gives quite the productivity boost compared to Java especially when using a new framework. Obviously if it were Java vs Python and the only editor you could use was VIM then Python would give you a huge productivity boost but when IDE's are brought into the equation its not as clear cut. I think Java's merits are often solely evaluated on a language level and often on out dated assumptions but Java has many benefits external to the language itself, e.g the JVM (often criticized but offers huge potential), excellent IDE's and tools, huge numbers of third party libraries, platforms etc.. Question, Does Python/related dynamic languages really give the huge productivity boosts often talked about? (with consideration given to using new frameworks and working with medium to large applications).

    Read the article

  • Python productivity VS Java Productivity

    - by toc777
    Over on SO I came across a question regarding which platform, Java or Python is best for developing on Google AppEngine. Many people were boasting of the increased productivity gained from using Python over Java. One thing I would say about the Python vs Java productivity argument, is Java has excellent IDE's to speed up development where as Python is really lacking in this area because of its dynamic nature. So even though I prefer to use Python as a language, I don't believe it gives quite the productivity boost compared to Java especially when using a new framework. Obviously if it were Java vs Python and the only editor you could use was VIM then Python would give you a huge productivity boost but when IDE's are brought into the equation its not as clear cut. I think Java's merits are often solely evaluated on a language level and often on out dated assumptions but Java has many benefits external to the language itself, e.g the JVM (often criticized but offers huge potential), excellent IDE's and tools, huge numbers of third party libraries, platforms etc.. Question, Does Python/related dynamic languages really give the huge productivity boosts often talked about? (with consideration given to using new frameworks and working with medium to large applications).

    Read the article

  • How to kill unkillable Python-processes running as root

    - by Andrei
    I am experiencing an annoying problem with sshuttle running it on 10.7.3, MBA with the latest firmware update -- after I stop it (ctrl+c twice), or loose connection, or close the lid, I cannot restore it until I restart the system. The restarting takes notably more time, than it would normally take. I have tried to flush ipfw rules - not helping. Could you advice me how to restore sshuttle connection (without restarting os)? The following processes remain running as root, which I do not know how to kill (tried sudo kill -9 <pid> with no luck): root 14464 python ./main.py python -v -v --firewall 12296 12296 root 14396 python ./main.py python -v -v --firewall 12297 12297 root 14306 python ./main.py python -v -v --firewall 12298 12298 root 3678 python ./main.py python -v -v --firewall 12299 12299 root 2263 python ./main.py python -v -v --firewall 12300 12300 The command I use to run proxy: ./sshuttle --dns -r [email protected] 10.0.0.0/8 -vv The last message I get trying to restore the connection: ... firewall manager: starting transproxy. s: Ready: 1 r=[4] w=[] x=[] s: < channel=0 cmd=PING len=7 s: > channel=0 cmd=PONG len=7 (fullness=554) s: mux wrote: 15/15 s: Waiting: 1 r=[4] w=[] x=[] (fullness=561/0) >> ipfw -q add 12300 check-state ip from any to any >> ipfw -q add 12300 skipto 12301 tcp from any to 127.0.0.0/8 >> ipfw -q add 12300 fwd 127.0.0.1,12300 tcp from any to 10.0.0.0/8 not ipttl 42 keep-state setup >> ipfw -q add 12300 divert 12300 udp from any to 10.0.1.1/32 53 not ipttl 42 >> ipfw -q add 12300 divert 12300 udp from any 12300 to any not ipttl 42 Update: $ ps -ax|grep python 1611 ?? 0:06.49 python ./main.py python -v -v --firewall 12300 12300 48844 ?? 0:00.05 python ./main.py python -v -v --firewall 12299 12299 49538 ttys000 0:00.00 grep python

    Read the article

  • Including additional DLL’s in an MSBuild script for Module Packaging

    - by Chris Hammond
    Late last year I created a blog post and video about a new version of the module development template that I released on Codeplex . This new template uses MSBuild scripts instead of NANT scripts to automate the packaging process for the modules built with the template. The MSBuild script works well out of the box, to package your module you simple change into RELEASE mode and then execute the build. If your project contains references to DLLs (in the website’s BIN folder) that you also need to package...(read more)

    Read the article

  • Embed python interpreter in a python application

    - by MatToufoutu
    Hi, i'm looking for a way to ship the python interpreter with my application (also written in python), so that it doesn't need to have python installed on the machine. I searched google and found a bunch of results about how to embed the python interpreter in applications written in various languages, but nothing for applications writtent in python itself... I don't need to "hide" my code or make a binary like cx_freeze does, i just don't want my users to have to install python to use my app, that's all. Thanks.

    Read the article

  • Wrapping a pure virtual method with multiple arguments with Boost.Python

    - by fallino
    Hello, I followed the "official" tutorial and others but still don't manage to expose this pure virtual method (getPeptide) : ms_mascotresults.hpp class ms_mascotresults { public: ms_mascotresults(ms_mascotresfile &resfile, const unsigned int flags, double minProbability, int maxHitsToReport, const char * unigeneIndexFile, const char * singleHit = 0); ... virtual ms_peptide getPeptide(const int q, const int p) const = 0; } ms_mascotresults.cpp #include <boost/python.hpp> using namespace boost::python; #include "msparser.hpp" // which includes "ms_mascotresults.hpp" using namespace matrix_science; #include <iostream> #include <sstream> struct ms_mascotresults_wrapper : ms_mascotresults, wrapper<ms_mascotresults> { ms_peptide getPeptide(const int q, const int p) { this->get_override("getPeptide")(q); this->get_override("getPeptide")(p); } }; BOOST_PYTHON_MODULE(ms_mascotresults) { class_<ms_mascotresults_wrapper, boost::noncopyable>("ms_mascotresults") .def("getPeptide", pure_virtual(&ms_mascotresults::getPeptide) ) ; } Here are the bjam's errors : /usr/local/boost_1_42_0/boost/python/object/value_holder.hpp:66: error: cannot declare field ‘boost::python::objects::value_holder<ms_mascotresults_wrapper>::m_held’ to be of abstract type ‘ms_mascotresults_wrapper’ ms_mascotresults.cpp:12: note: because the following virtual functions are pure within ‘ms_mascotresults_wrapper’: ... include/ms_mascotresults.hpp:334: note: virtual matrix_science::ms_peptide matrix_science::ms_mascotresults::getPeptide(int, int) const ms_mascotresults.cpp: In constructor ‘ms_mascotresults_wrapper::ms_mascotresults_wrapper()’: ms_mascotresults.cpp:12: error: no matching function for call to ‘matrix_science::ms_mascotresults::ms_mascotresults()’ include/ms_mascotresults.hpp:284: note: candidates are: matrix_science::ms_mascotresults::ms_mascotresults(matrix_science::ms_mascotresfile&, unsigned int, double, int, const char*, const char*) include/ms_mascotresults.hpp:109: note: matrix_science::ms_mascotresults::ms_mascotresults(const matrix_science::ms_mascotresults&) ... /usr/local/boost_1_42_0/boost/python/object/value_holder.hpp: In constructor ‘boost::python::objects::value_holder<Value>::value_holder(PyObject*) [with Value = ms_mascotresults_wrapper]’: /usr/local/boost_1_42_0/boost/python/object/value_holder.hpp:137: note: synthesized method ‘ms_mascotresults_wrapper::ms_mascotresults_wrapper()’ first required here /usr/local/boost_1_42_0/boost/python/object/value_holder.hpp:137: error: cannot allocate an object of abstract type ‘ms_mascotresults_wrapper’ ms_mascotresults.cpp:12: note: since type ‘ms_mascotresults_wrapper’ has pure virtual functions So I tried to change the constructor's signature by : BOOST_PYTHON_MODULE(ms_mascotresults) { //class_<ms_mascotresults_wrapper, boost::noncopyable>("ms_mascotresults") class_<ms_mascotresults_wrapper, boost::noncopyable>("ms_mascotresults", init<ms_mascotresfile &, const unsigned int, double, int, const char *,const char *>()) .def("getPeptide", pure_virtual(&ms_mascotresults::getPeptide) ) Giving these errors : /usr/local/boost_1_42_0/boost/python/object/value_holder.hpp:66: error: cannot declare field ‘boost::python::objects::value_holder<ms_mascotresults_wrapper>::m_held’ to be of abstract type ‘ms_mascotresults_wrapper’ ms_mascotresults.cpp:12: note: because the following virtual functions are pure within ‘ms_mascotresults_wrapper’: include/ms_mascotresults.hpp:334: note: virtual matrix_science::ms_peptide matrix_science::ms_mascotresults::getPeptide(int, int) const ... ms_mascotresults.cpp:24: instantiated from here /usr/local/boost_1_42_0/boost/python/object/value_holder.hpp:137: error: no matching function for call to ‘ms_mascotresults_wrapper::ms_mascotresults_wrapper(matrix_science::ms_mascotresfile&, const unsigned int&, const double&, const int&, const char* const&, const char* const&)’ ms_mascotresults.cpp:12: note: candidates are: ms_mascotresults_wrapper::ms_mascotresults_wrapper(const ms_mascotresults_wrapper&) ms_mascotresults.cpp:12: note: ms_mascotresults_wrapper::ms_mascotresults_wrapper() If I comment the virtual function getPeptide in the .hpp, it builds perfectly with this constructor : class_<ms_mascotresults>("ms_mascotresults", init<ms_mascotresfile &, const unsigned int, double, int, const char *,const char *>() ) So I'm a bit lost...

    Read the article

  • Introspection of win32com module / pythoncom module

    - by crystal
    Hi, what is the best way to see what all functions that can be performed using pythoncom module? Specifically, i was working with the win32com module to operate upon excel files. I was not able to find introspection for it as we do for the rest of the modules. Can anyone please suggest how can i retrieve this information?

    Read the article

  • Apache not booting, no error messages

    - by EricR
    Apache isn't booting on our production server (all of a sudden) and there are no error messages. Can anyone help me fix this or help me start debugging? init.d fails: /etc/init.d/httpd restart Stopping httpd: [FAILED] Starting httpd: [FAILED] Configtest Syntax OK Apache: Server version: Apache/2.2.3 Server built: Nov 12 2012 08:48:46 Server: CentOS release 5.8 (Final) Booting with debug: /usr/sbin/httpd -e debug -X [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module auth_basic_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module auth_digest_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_file_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_alias_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_anon_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_dbm_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authn_default_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_host_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_user_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_owner_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_groupfile_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_dbm_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authz_default_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ldap_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module authnz_ldap_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module include_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module log_config_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module logio_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module env_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ext_filter_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mime_magic_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module expires_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module deflate_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module headers_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module usertrack_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module setenvif_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mime_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dav_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module status_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module autoindex_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module info_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dav_fs_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module vhost_alias_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module negotiation_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module dir_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module actions_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module speling_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module userdir_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module alias_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module rewrite_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_balancer_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_ftp_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_http_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_connect_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module cache_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module suexec_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module disk_cache_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module file_cache_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module mem_cache_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module cgi_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module version_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module ssl_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module perl_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module php5_module [Sun Dec 16 20:10:16 2012] [debug] mod_so.c(246): loaded module proxy_ajp_module <At this point it exits> /var/log/httpd/error_log [Sun Dec 16 20:10:16 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Sun Dec 16 20:10:16 2012] [info] Init: Seeding PRNG with 256 bytes of entropy [Sun Dec 16 20:10:16 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Sun Dec 16 20:10:16 2012] [info] Init: Generating temporary DH parameters (512/1024 bits) [Sun Dec 16 20:10:16 2012] [info] Init: Initializing (virtual) servers for SSL

    Read the article

  • Generic Http Module

    - by MartinF
    The problem I am trying to make a generic http module in asp.net C# for handling roles defined by an enum which i want to be able to change by a generic parameter. This will make it possible to use the generic module with any kind of enum defined for each project. The module hooks into the Authenticate event of the FormsAuthenticationModule, and is called on each request to the website. The module exposes public events which could be defined in the global.asax. But i cant seem to figure out how to make the generic http module work like a non generic module. There is 3 main problems. I cant register the generic http module in the web.config like any other module as i cant specify the generic parameter, or is possible somehow ? The way to solve that as far as i can figure out is to create a non-generic http module that intializes the generic HttpModule (the generic parameter is defined in a custom section for the module in the web.config). But that introduces the next problem. I cant find out how to make the public events exposed by the generic module available to hook into through the global.asax as you would normally do with a non-generic module by just making a public method with the name like ModuleClassName_PublicEventName. The init() method on the http module gets an reference to the HttpApplication object created in the global.asax. I dont know if it somehow could be possible with reflection to search for the methods and if they are defined in the global.asax (HttpApplication super class) hook them up with the correct event handler ? or if any methods on the HttpApplication object can be used? How would i store and later get a reference to the generic module created in the non-generic module ? I can get the non-generic module with HttpContext.Current.ApplicationInstance.Modules.Get("TheModule"); but is there any way i can store a reference to the generic module in the non-generic module (cant figure out how it should be possible), or store it somewhere else so i can always get it? If I can get a reference to the generic module from the global.asax etc. the events mentioned in nr. 2 can be manually wired to the methods. Thoughts and other possible solutions Instead of registering the module in the web.config it can be manually initialized by overridding the Init method of the HttpApplication and calling the Init method on the module. But that will introduce some new problems. The module will no longer be added to the the ModulesCollection. So I will need to store a reference somewhere else. This could be done with a property in the global.asax, and by implementing an interface, or by creating an generic abstract base type inheriting from HttpApplication, that the global.asax could inherit from. In the generic abstract base type i could also override the init method. It will still not automatically hook up methods in the global.asax with events in the generic module. If it is possible with reflection to search for defined methods in the super type of the HttpApplication it could be automatically done that way. But i can wire the methods in the global.asax with the events in the generic module manually either in the Init method or anywhere else by getting reference to the generic module. It doesnst really need to implement the IHttpModule interface if i choose to manually initalize the generic module. I could just aswell move all the code to the abstract base type inheriting from the HttpApplication. I would prefer to register the module simply by defining it in the web.config as it will be the easiest and most natural / logical solution. Also it would be great if it could be kept as a HttpModule instead of having to define a an abstract base type inheriting from HttpApplication, else it will be more thighed up and not as loose and plugable as i wanted it to be (but maybe it is not possible). Another alternative would be to make it all static. As far as i can figure out i would have to somehow make sure that only one method can be added to the public static events, so it wont add a reference each time a new instance of the global.asax is created. I simply cant find out what is the best solution. I have been messing around with this and thinking about it for days now. Maybe there is an option that i havent thought of ? Hope anyone out there can help me.

    Read the article

  • I have an Errno 13 Permission denied with subprocess in python

    - by wDroter
    The line with the issue is ret=subprocess.call(shlex.split(cmd)) cmd = /usr/share/java -cp pig-hadoop-conf-Simpsons:lib/pig-0.8.1-cdh3u1-core.jar:lib/hadoop-core-0.20.2-cdh3u1.jar org.apache.pig.Main -param func=cat -param from =foo.txt -x mapreduce fsFunc.pig The error is. File "./run_pig.py", line 157, in process ret=subprocess.call(shlex.split(cmd)) File "/usr/lib/python2.7/subprocess.py", line 493, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child raise child_exception OSError: [Errno 13] Permission denied Let me know if any more info is needed. Any help is appreciated. Thanks.

    Read the article

  • python modules difference: .c/.h vs. .py

    - by bijan
    I'm very new to python, as i'm embedding it (in form of a static lib) in an ios project. It's not possible for me to dynamically load python modules, so i would like to compile my modules along with python. For modules shipped with the python source this works (by modifying setup.py or Module/Setup), but when i downloaded a third party module i noticed, i don't fully understand the mechanism. The modules shipped with python come with a .c file in the Modules dir as well as a .py file in the Lib dir. My third party module just comes with .py files. 1.Why do those modules have different file extensions? 2.How to integrate a module coming with .py files in an embedded python version? Obviously pasting them in Modules/Setup does require some .c files. 3.Do these .c files have something to do with the Python C-Api? I guess i'm missing something essential :) Help is much appreciated.

    Read the article

  • How long would it take to learn Python?

    - by Josh
    Hi all I have decided to take the time out after work to learn Python. Python appeals to me because at work (Web and eLearning Company), I have to follow out very repetitive tasks like delete all these tags, rename all these tasks and even more advanced repetive tasks. Additionally it would be good for me to get an understanding of Python first because of its fairly easy to learn syntax. How long would it take to learn the basics and go through these tutorials on Python (+ the Python tutorial)? I will only be spending 1 hour or so on it in the afternoons. http://openbookproject.net/thinkcs/python/english2e/index.html I have told my piano teacher I would like to take a month of learning piano to do this would this be adequate time? After this I may choose to learn PHP, because that is mainly what we use for web development at work. Thanks Josh

    Read the article

  • Python library for scripting (C++ integration)

    - by Edward83
    Please advise me good wrapper/library for python. I need to implement simple scripting in c++ app; Under "good" I mean pretty understandable, well documented, no memory leaking, fast. For creating base interface of GameObject on Python and C++; Your own experience and useful links will be nice!!! I found link about it, but I need more specific within gamedev context. What combinations of libraries you used for python integration into c++? For example about ogre-python it said built using Py++ and Boost.Python library And one more question, maybe someone of you know how Python was integrated into BigWorld engine (it's own port or some library)? Thank you!!!

    Read the article

  • Error trying to run a python program

    - by Ana
    Hello guys I'm actually new to Terminal and Python. Just started following a Python tuturial on my Ubuntu and I've reached a part where it asks me to save a .py file and open it in Terminal. Only when I try to type on Terminal $ python egotrip.py I get $: command not found Then I try to type it in python and I get File "", line 1 python egotrip.py ^ SyntaxError: invalid syntax But I mean all names are correct :( Then I gave also tried /home/anacah/Desktop/python/egotrip.py And I get Traceback (most recent call last): File "", line 1, in NameError: name 'home' is not defined What am I doing wrong? :( can someone please help?

    Read the article

  • Python as a first language?

    - by user64085
    I have just started working in Information Security World. I want to learn the Python language for creating my own automated tool for Fuzzing, SQL-Injection etc. My question is I don't know much about C language (only basic knowledge) but I want to learn directly Python Language so is it good? I have seen there is lots of difference between Python and C (obviously) and for Information Security field Python = GOD so I want to know learning Python need any experience on C language? If not so can I start learning Python directly?

    Read the article

  • Python 2.4 on Ubuntu 12.04

    - by veepsk
    I want to develop a Python application on Ubuntu 12.04 using python 2.4, but since the default version of python on ubuntu is 2.7. I cannot get the libraries and packages to work for python 2.4. I have tried using virtualenv but even with virtualenv I was not successful in installing packages for python2.4. So I would like to know if there is any reliable method to get python 2.4 to work with Ubuntu. I know that I shouldnt mess with the default version of python on ubuntu and hence I am looking for a better alternative. Thanks in advance.

    Read the article

  • How to Determine The Module a Particular Exception Class is Defined In

    - by doug
    Note: i edited my Q (in the title) so that it better reflects what i actually want to know. In the original title and in the text of my Q, i referred to the source of the thrown exception; what i meant, and what i should have referred to, as pointed out in one of the high-strung but otherwise helpful response below, is the module that the exception class is defined in. This is evidenced by the fact that, again, as pointed out in one of the answers below the answer to the original Q is that the exceptions were thrown from calls to cursor.execute and cursor.next, respectively--which of course, isn't the information you need to write the try/except block. For instance (the Q has nothing specifically to do with SQLite or the PySQLite module): from pysqlite2 import dbapi2 as SQ try: cursor.execute('CREATE TABLE pname (id INTEGER PRIMARY KEY, name VARCHARS(50)') except SQ.OperationalError: print("{0}, {1}".format("table already exists", "... 'CREATE' ignored")) # cursor.execute('SELECT * FROM pname') while 1: try: print(cursor.next()) except StopIteration: break # i let both snippets error out to see the exception thrown, then coded the try/finally blocks--but that didn't tell me anything about which module the exception class is defined. In my example, there's only a single imported module, but where there are many more, i am interested to know how an experienced pythonista identifies the exception source (search-the-docs-till-i-happen-to-find-it is my current method). [And yes i am aware there's a nearly identical question on SO--but for C# rather than python, plus if you read the author's edited version, you'll see he's got a different problem in mind.]

    Read the article

  • Runtime unhandled exception while executing facedetect.py in opencv

    - by Rupesh Chavan
    When i tried to execute facedetect.py python script from opencv sample example i got the following runtime exception. Can someone please give me some pointer or some clue about the exception and why it is encountering? Here is the stack trace : 'python.exe': Loaded 'C:\Python26\python.exe' 'python.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\python26.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\user32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\shell32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll' 'python.exe': Loaded 'C:\WINDOWS\WinSxS \x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\msvcr90.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\imm32.dll' 'python.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll' 'python.exe': Loaded 'C:\Python26\Lib\site-packages\opencv_cv.pyd', Binary was not built with debug information. 'python.exe': Loaded 'C:\OpenCV2.0\bin\libcv200.dll', Binary was not built with debug information. 'python.exe': Loaded 'C:\OpenCV2.0\bin\libcxcore200.dll', Binary was not built with debug information. 'python.exe': Loaded 'C:\Python26\Lib\site-packages\opencv_ml.pyd', Binary was not built with debug information. 'python.exe': Loaded 'C:\OpenCV2.0\bin\libml200.dll', Binary was not built with debug information. 'python.exe': Loaded 'C:\Python26\Lib\site-packages\opencv_highgui.pyd', Binary was not built with debug information. 'python.exe': Loaded 'C:\OpenCV2.0\bin\libhighgui200.dll', Binary was not built with debug information. 'python.exe': Loaded 'C:\WINDOWS\system32\ole32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\avicap32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\winmm.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\version.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\msvfw32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\avifil32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\msctf.dll' 'python.exe': Loaded 'C:\OpenCV2.0\bin\libopencv_ffmpeg200.dll', Binary was not built with debug information. 'python.exe': Loaded 'C:\WINDOWS\system32\wsock32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll' 'python.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME' Unhandled exception at 0x00e7e4e4 in python.exe: 0xC0000005: Access violation reading location 0xffffffff. Thanks a lot in advance, Rupesh Chavan

    Read the article

  • Python - problem in importing new module - libgmail

    - by Microkernel
    Hi all, I downloaded Python module libgmail from sourceforge and extracted all the files in the archive. The archive had setup.py, so I went to that directory in command prompt and did setup.py install I am getting the following error message I:\libgmail-0.1.11>setup.py install Traceback (most recent call last): File "I:\libgmail-0.1.11\setup.py", line 7, in ? import libgmail File "I:\libgmail-0.1.11\libgmail.py", line 36, in ? import mechanize as ClientCookie ImportError: No module named mechanize This may be trivial, but I am new to python. So plz guide what to do. please note, I am using python 2.4 and using Windows-XP. Thank you MicroKernel

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >