Search Results

Search found 15187 results on 608 pages for 'boost python'.

Page 12/608 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Pass FORTRAN variable to Python [migrated]

    - by Matthew Bilskie
    I have a FORTRAN program that is called from a Python script (as an ArcGIS tool). I need to pass an array, Raster_Z(i,j), from FORTRAN to python. I have read about the Python subprocess module; however, I have not had much luck in understanding how to do this with FORTRAN. All examples I have found involve simple unix command line calls and not actual programs. Has anyone had any experience in passing a variable from FORTRAN to Python via a memory PIPE? Thank you for your time.

    Read the article

  • Java or Python for internet application?

    - by jpartogi
    In choosing a technology for internet applications where the number of users may scale over time, which one should we consider: Java or Python? What are the considerations in choosing one and not the other? If speed and scalability is our main criteria, which one should we use? We have looked around and it seems that there are more websites that use Python [i.e : Quora, digg, reddit, bitbucket and disqus] than Java. Based on that, can we say that Python is more suitable for internet applications where speed and scalability is the main criteria? However we have browsed around and found some comments saying that Java is actually faster than Python. Thank you for your insights.

    Read the article

  • Python class representation under the hood

    - by decentralised
    OK, here is a simple Python class: class AddSomething(object): __metaclass__ = MyMetaClass x = 10 def __init__(self, a): self.a = a def add(self, a, b): return a + b We have specified a metaclass, and that means we could write something like this: class MyMetaClass(type): def __init__(cls, name, bases, cdict): # do something with the class Now, the cdict holds a representation of AddSomething: AddSomething = type('AddSomething', (object,), {'x' : 10, '__init__': __init__, 'add': add}) So my question is simple, are all Python classes represented in this second format internally? If not, how are they represented? EDIT - Python 2.7

    Read the article

  • Why was Python's popularity so sudden? [closed]

    - by Eric Wilson
    Python first appeared in 1991, but it was somewhat unknown until 2004, if the TIOBE rankings quantify anything meaningful. What happened? What caused the interest in this 13 year old language to go through the roof? Is there a reason that Python wasn't considered a real competitor to Perl in its first decade of existence? Is there a reason that Python didn't continue in relative obscurity for another ten years? I personally think that Python is a very nice language, and I'm glad that I'm not the only one. But it doesn't have corporate backing or a killer feature that would explain a sudden rise to relevance. Does anyone know the story?

    Read the article

  • Django as Python extension?

    - by NoobDev4iPhone
    I come from php community and just started learning Python. I have to create server-side scripts that manipulate databases, files, and send emails. Some of it I found hard to do in python, comparing to php, like sending emails and querying databases. Where in php you have functions like mysql_query(), or email(), in python you have to write whole bunch of code. Recently I found Django, and my question is: is it a good framework for network-oriented scripts, instead of using it as a web-framework?

    Read the article

  • Making Python scripts work on MAMP

    - by Ravi Teja
    Hello All Python Pro's , I'm using mamp server for testing out all my web pages. I'm new to python. I'm able to run a script in python interpreter that will normally print a hello world. print "Hello World!" So i used the same line in a file with name test.py . So how should I run this on web. As am new to python, i tried some normal things, placing test.py in /htdocs/cgi-bin/ and trying to open it. But it says forbidden page. Anyone please help me making this work. Thanks

    Read the article

  • Python: Future as a major programming language?

    - by chrisw
    After reading some Python material and seeing some Python code a few years back I decided to give it a whirl. I decided to start with Python to solve the problems on Project Euler and was throughly impressed with the language. Since then I've went on to learn Django, and now use it primarily for my web applications. I would love to have a career programming in this language, however I fear the future of the language is currently in a state of uncertainness. With Google and other major companies embracing it there may be some hope, what are your thoughts on Python, do you see many job opportunities out there?

    Read the article

  • Python platform

    - by LazyTiberius
    I'm looking for a python platform or environment. I'm looking for something like or similar to easyphp ou xampp for try and learn some cms. i've find mezzanine cms http://mezzanine.jupo.org/ and skeletonz http://orangoo.com/skeletonz/ usually i use and know apache environment. But python is new for me. i'm a noob with this 2 cms (mezzanine and skeletonz). My configuration os is windows 7 and windows 8 i need something easy to simulate a python environment hosting Thank all for your help

    Read the article

  • Python C API return more than one value / object

    - by Grisu
    I got the following problem. I have written a C-Extension to Python to interface a self written software library. Unfortunately I need to return two values from the C function where the last one is optional. In Python the equivalent is def func(x,y): return x+y, x-y test = func(13,4) #only the first value is used In my C extension I use return Py_BuildValue("ii",x+y,x-y); which results in a tuple. If I now try to access the return value from Python via test2 = cfunc(13,4) print(test2) I got a tuple instead of only the first return value. How is possible to build the same behavior as in Python from C Extension?

    Read the article

  • Python: Future as a major programming language?

    - by chrisw
    After reading some Python material and seeing some Python code a few years back I decided to give it a whirl. I decided to start with Python to solve the problems on ProjectEuler.net and was throughly impressed with the language. Since then I've went on to learn Django, and now use it primarily for my web applications. I would love to have a career programming in this language, however I fear the future of the language is currently in a state of uncertainness. With Google and other major companies embracing it there may be some hope, what are your thoughts on Python, do you see many job opportunities out there?

    Read the article

  • dictionary of lists of dictionaries in python

    - by Andy
    I'm a perl scripter working in python and need to know a way to do the following perl in python. $Hash{$key1}[$index_value]{$key2} = $value; I have seen the stackoverflow question here: List of dictionaries, in a dictionary - in Python I still don't understand what self.rules is doing or if it works for my solution. My data will be coming from files, and will I will be using regexes to capture to temporary variables until ready to store in the data structure. If you need to ask, the order related to the $index_value is important and would like to be maintained as an integer. Any suggestions are appreciated or if you think I need to rethink data structures with Python that would be helpful.

    Read the article

  • How do I extend a python module? (python-twitter)

    - by user319045
    What are the best practices for extending a python module -- in this case I want to extend python-twitter by adding new methods to the base API class. I've looked at tweepy, and I like that as well, I just find python-twitter easier to understand and extend with the functionality I want. I have the methods written already, I'm just trying to figure out the best way to add them into the module, without changing the core.

    Read the article

  • boost::spirit (qi) decision between float and double

    - by ChrisInked
    I have a parser which parses different data types from an input file. I already figured out, that spirit can decide between short and int, for example: value %= (shortIntNode | longIntNode); with shortIntNode %= (qi::short_ >> !qi::double_) [qi::_val = phoenix::bind(&CreateShortIntNode, qi::_1)]; longIntNode %= (qi::int_ >> !qi::double_) [qi::_val = phoenix::bind(&CreateLongIntNode, qi::_1)]; I used this type of rules to detect doubles as well (from the answers here and here). The parser was able to decide between int for numbers 65535 and short for numbers <= 65535. But, for float_ and double_ it does not work as expected. It just rounds these values to parse it into a float value, if there is a rule like this: value %= (floatNode | doubleFloatNode); with floatNode %= (qi::float_) [qi::_val = phoenix::bind(&CreateFloatNode, qi::_1)]; doubleFloatNode %= (qi::double_) [qi::_val = phoenix::bind(&CreateDoubleFloatNode, qi::_1)]; Do you know if there is something like an option or some other trick to decide between float_ and double_ depending on the data type range? Thank you very much!

    Read the article

  • python object to native c++ pointer

    - by Lodle
    Im toying around with the idea to use python as an embedded scripting language for a project im working on and have got most things working. However i cant seem to be able to convert a python extended object back into a native c++ pointer. So this is my class: class CGEGameModeBase { public: virtual void FunctionCall()=0; virtual const char* StringReturn()=0; }; class CGEPYGameMode : public CGEGameModeBase, public boost::python::wrapper<CGEPYGameMode> { public: virtual void FunctionCall() { if (override f = this->get_override("FunctionCall")) f(); } virtual const char* StringReturn() { if (override f = this->get_override("StringReturn")) return f(); return "FAILED TO CALL"; } }; Boost wrapping: BOOST_PYTHON_MODULE(GEGameMode) { class_<CGEGameModeBase, boost::noncopyable>("CGEGameModeBase", no_init); class_<CGEPYGameMode, bases<CGEGameModeBase> >("CGEPYGameMode", no_init) .def("FunctionCall", &CGEPYGameMode::FunctionCall) .def("StringReturn", &CGEPYGameMode::StringReturn); } and the python code: import GEGameMode def Ident(): return "Alpha" def NewGamePlay(): return "NewAlpha" def NewAlpha(): import GEGameMode import GEUtil class Alpha(GEGameMode.CGEPYGameMode): def __init__(self): print "Made new Alpha!" def FunctionCall(self): GEUtil.Msg("This is function test Alpha!") def StringReturn(self): return "This is return test Alpha!" return Alpha() Now i can call the first to functions fine by doing this: const char* ident = extract< const char* >( GetLocalDict()["Ident"]() ); const char* newgameplay = extract< const char* >( GetLocalDict()["NewGamePlay"]() ); printf("Loading Script: %s\n", ident); CGEPYGameMode* m_pGameMode = extract< CGEPYGameMode* >( GetLocalDict()[newgameplay]() ); However when i try and convert the Alpha class back to its base class (last line above) i get an boost error: TypeError: No registered converter was able to extract a C++ pointer to type class CGEPYGameMode from this Python object of type Alpha I have done alot of searching on the net but cant work out how to convert the Alpha object into its base class pointer. I could leave it as an object but rather have it as a pointer so some non python aware code can use it. Any ideas?

    Read the article

  • Boost Test dynamically or statically linked?

    - by Halt
    We use Boost statically linked with our app but now I wan't to use Boost Test with an external test runner and that requires the tests themselves to link dynamically with Boost.Test through the use of the required BOOST_TEST_DYN_LINK define. Is this going to be a problem or is the way Boost Test links completely unrelated to the way the other Boost libraries are linked? Thx.

    Read the article

  • boost.asio's socket's recieve/send functions are bad?

    - by the_drow
    Data may be read from or written to a connected TCP socket using the receive(), async_receive(), send() or async_send() member functions. However, as these could result in short writes or reads, an application will typically use the following operations instead: read(), async_read(), write() and async_write(). I don't really understand that remark as read(), async_read(), write() and async_write() can also end up in short writes or reads, right? Why are those functions not the same? Should I use them at all? Can someone clarify that remark for me?

    Read the article

  • upgrading boost version

    - by idimba
    I'm using RHEL 5.3, shipped with gcc 4.1.2 and boost 1.33. So, there's no boost::unorded_map, no make_shared() factory function to create boost::shared_ptr and other features available in newer releases of boost. Is there're a newer version of boost compatible with the version of gcc? If yes, how the upgrade is performed?

    Read the article

  • Handle complex options with Boost's program_options

    - by R S
    I have a program that generates graphs using different multi-level models. Each multi-level model consists of a generation of a smaller seed graph (say, 50 nodes) which can be created from several models (for example - for each possible edge, choose to include it with probability p). After the seed graph generation, the graph is expanded into a larger one (say 1000 nodes), using one of another set of models. In each of the two stages, each model require a different number of parameters. I would like to be have program_options parse the different possible parameters, according to the names of the models. For example, say I have two seed graphs models: SA, which has 1 parameters, and SB, which has two. Also for the expansion part, I have two models: A and B, again with 1 and 2 parameters, respectively. I would like to be able do something like: ./graph_generator --seed=SA 0.1 --expansion=A 0.2 ./graph_generator --seed=SB 0.1 3 --expansion=A 0.2 ./graph_generator --seed=SA 0.1 --expansion=B 10 20 ./graph_generator --seed=SB 0.1 3 --expansion=B 10 20 and have the parameters parsed correctly. Is that even possible?

    Read the article

  • Python in command line runs the wrong version?

    - by Deflect
    I have several versions of Python installed on a Windows 7 computer. I want to run Python 2.7 by default, but for whatever reason, typing python in the command line runs Python version 2.4.5. I've tried adding C:\Python27 to my system path variable as per this question, and manually combed my path variable it to make sure Python 2.4.5 wasn't tossed in there by mistake, but that didn't fix the issue. I have to type in C:\Python27\python.exe every time I want to access the correct version of python I want. What other places can I check? How can I make the command line use the correct version of python? I also found this but it's not for windows. [EDIT] My path (separated by semicolons): C:\Program Files\Common Files\Microsoft Shared\Windows Live; C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files\Dell\DW WLAN Card\Driver; C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\; C:\Program Files (x86)\Windows Live\Shared; c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\; c:\Program Files\Microsoft SQL Server\100\Tools\Binn\; c:\Program Files\Microsoft SQL Server\100\DTS\Binn\; C:\Program Files\TortoiseGit\bin; C:\Program Files\Java\jdk1.6.0_26\bin; C:\Program Files\Java\jdk1.6.0_21 ; C:\Program Files\IVI Foundation\VISA\Win64\Bin\; C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\; C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin; C:\Program Files\WPIJavaCV\OpenCV_2.2.0\bin; C:\Program Files (x86)\LilyPond\usr\bin; C:\Program Files\TortoiseSVN\bin; C:\Program Files (x86)\doxygen\bin; C:\Program Files (x86)\Graphviz 2.28\bin; C:\Users\Michael\bin\Misc\cppcheck\; C:\Program Files (x86)\Git\cmd; C:\Python27\python.exe; C:\Ruby192\bin; C:\Users\Michael\AppData\Roaming\cabal\bin; C:\Python27\; [EDIT 2] Running python spews this out: 'import site' failed; used -v for traceback Python 2.4.5 (#1, Jul 22 2011, 02:01:04) [GCC 4.1.1] on mingw32 Type "help", "copyright", "credits" or "license" for more information. >>> ...and running python --version (as suggested below) seems to be an unrecognized option. (I also tried running python -v, and it appears that Python 2.4 is trying to import libraries from C:\Python27\Lib, and failed due to a syntax error when it encountered a with statement, which was added in later version, I think) Also, I'm not sure if it's significant or not, but the above python version says something about GCC and mingw32, while running C:\python27\python.exe shows this: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>>

    Read the article

  • How to install suggested packages in apt-get

    - by Alaa Ali
    EDIT: I solved my issue. I will answer my own question, but in 5 hours because I don't have permission now. I know the question has been asked before, but please hear me out. So I wanted to install screenlets. I ran sudo apt-get install screenlets, and this is what I got: The following extra packages will be installed: libart-2.0-2 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libgnome2-0 libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libtidy-0.99-0 python-beautifulsoup python-evolution python-feedparser python-gmenu python-gnome2 python-numpy python-pyorbit python-rsvg python-tz python-utidylib screenlets-pack-basic Suggested packages: libbonobo2-bin python-gnome2-doc python-numpy-doc python-numpy-dbg python-nose python-dev gfortran python-pyorbit-dbg screenlets-pack-all python-dcop Recommended packages: python-numeric python-gnome2-extras The following NEW packages will be installed: libart-2.0-2 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libgnome2-0 libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libtidy-0.99-0 python-beautifulsoup python-evolution python-feedparser python-gmenu python-gnome2 python-numpy python-pyorbit python-rsvg python-tz python-utidylib screenlets screenlets-pack-basic 0 upgraded, 23 newly installed, 0 to remove and 2 not upgraded. People say that Recommended packages are installed by default, but they are clearly not included in the NEW packages that will be installed above. I also decided to include the Suggested packages in the installation, so I ran sudo apt-get --install-suggests install screenlets instead, but I got a HUGE list of NEW packages that will be installed; that number is precisely 0 upgraded, 944 newly installed, 0 to remove and 2 not upgraded. Should'nt I be getting only around 10 extra packages?

    Read the article

  • /usr/bin/python (Python 2.4) was deleted on CentOS 5. I compiled from source but yum is still broken. How can I get everything back to the way it was?

    - by Maxwell
    I saw a lot of other questions like this but none of them answered the exact part I am having trouble with (actually installing the Python RPM). Someone on my system deleted /usr/bin/python and /usr/bin/python2.4 on my 64 bit CentOS 5.8 installation. I recompiled Python 2.4 from source, but now whenever I try to yum install anything I get the following error: [root@cerulean-OW1 ~]# yum install httpd There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is installed correctly. It's possible that the above module doesn't match the current version of Python, which is: 2.4 (#1, Dec 16 2012, 09:16:56) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq I checked http://wiki.linux.duke.edu/YumFaq and it said the following: If you are getting a message that yum itself is the missing module then you probably installed it incorreclty (or installed the source rpm using make/make install). If possible, find a prebuilt rpm that will work for your system like one from Fedora or CentOS. Or, you can download the srpm and do a rpmbuild --rebuild yum*.src.rpm I tried going to http://rpm.pbone.net/index.php3/stat/4/idpl/17838875/dir/centos_5/com/python-2.4.3-46.el5.x86_64.rpm.html to install Python, which resulted in the following error: [root@cerulean-OW1 ~]# rpm -Uvh python-2.4.3-46.el5.x86_64.rpm error: Failed dependencies: python-libs-x86_64 = 2.4.3-46.el5 is needed by python-2.4.3-46.el5.x86_64 So I tried installing python-libs-x86_64, which resulted in the following: [root@cerulean-OW1 ~]# rpm -Uvh python-libs-2.4.3-46.el5_8.2.x86_64.rpm warning: python-libs-2.4.3-46.el5_8.2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 192a7d7d Preparing... ########################################### [100%] package python-libs-2.4.3-46.el5_8.2.x86_64 is already installed file /usr/lib64/libpython2.4.so.1.0 from install of python-libs-2.4.3-46.el5_8.2.x86_64 conflicts with file from package python-libs-2.4.3-46.el5_8.2.x86_64

    Read the article

  • mysql-python on Snow Leopard with MySQL 64-bit

    - by Derek Reynolds
    Can't seem to get mysql-python to work on Snow Leopard for the life of me. Currently using the default version of python that ships with Snow Leopard (python 2.6.1). Installed MySQL 5.1.45 x86_64. I download the source for mysql-python http://sourceforge.net/projects/mysql-python/ and compile with the following commands: tar xzf MySQL-python-1.2.3c1.tar.gz cd MySQL-python-1.2.3c1 ARCHFLAGS='-arch x86_64' python setup.py build ARCHFLAGS='-arch x86_64' python setup.py install And am getting the following error when I try to import: Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.6-universal/egg/MySQLdb/__init__.py", line 19, in <module> File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 7, in <module> File "build/bdist.macosx-10.6-universal/egg/_mysql.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/derek/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found. Did find: /Users/derek/.python-eggs/MySQL_python-1.2.3c1-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture Any ideas? Or the best route for starting over.

    Read the article

  • To install Markdown's extensions by Python

    - by Masi
    The installation notes (git://gitorious.org/python-markdown/mainline.git) say in the file using_as_module.txt One of the parameters that you can pass is a list of Extensions. Extensions must be available as python modules either within the markdown.extensions package or on your PYTHONPATH with names starting with mdx_, followed by the name of the extension. Thus, extensions=['footnotes'] will first look for the module markdown.extensions.footnotes, then a module named mdx_footnotes. See the documentation specific to the extension you are using for help in specifying configuration settings for that extension. I put the folder "extensions" to ~/bin/python/ such that my PYTHONPATH is the following export PYTHONPATH=/Users/masi/bin/python/:/opt/local/Library/Frameworks/Python.framework/Versions/2.6/ The instructions say that I need to import the addons such that import markdown import <module-name> However, I cannot see any module in my Python. This suggests me that the extensions are not available as "python modules - - on [my] PYTHONPATH with names starting with mdx_ - -." How can you get Markdown's extensions to work? 2nd attempt I run at ~/bin/markdown git clone git://gitorious.org/python-markdown/mainline.git python-markdown cd python-markdown python setup.py install I put the folder /Users/masi/bin/markdown/python-markdown/build to my PATH because the installation message suggests me that is the new location of the extensions. I have the following in a test markdown -document [TOC] -- headings here with # -format --- However, I do not get the table of contents. This suggests me that we need to somehow activate the extensions when we compile by the markdown.py -script. **The problem returns to my first quoted text which I is rather confusing to me.

    Read the article

  • fatal error 'stdio.h' Python 2.7 on Mc OS X 10.7.5 [closed]

    - by DjangoRocks
    I have this weird issue on my Mac OS X 10.7.5 /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found What caused the above error? This error has been bugging me and i can't install mysql-python as i'm stuck with this step. I'm using Python 2.7.3. Things like Google App Engine ( python ), python script, tornado generally works on my mac. But not mysql-python. I've install MySQL using the dmg image and have copied the mysql folder to /usr/local/ How do i fix this? ======UPDATE====== I've ran the command, and tried to install mysql-python by running sudo python setup.py install. But received the following: running install running bdist_egg running egg_info writing MySQL_python.egg-info/PKG-INFO writing top-level names to MySQL_python.egg-info/top_level.txt writing dependency_links to MySQL_python.egg-info/dependency_links.txt writing MySQL_python.egg-info/PKG-INFO writing top-level names to MySQL_python.egg-info/top_level.txt writing dependency_links to MySQL_python.egg-info/dependency_links.txt reading manifest file 'MySQL_python.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'MySQL_python.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.6-intel/egg running install_lib running build_py copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-2.7/MySQLdb running build_ext gcc-4.2 not found, using clang instead building '_mysql' extension clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,4,'rc',5) -D__version__=1.2.4c1 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64 In file included from _mysql.c:29: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found #include <stdio.h> ^ 1 error generated. error: command 'clang' failed with exit status 1 What other possible ways can i fix it? thanks! Best Regards.

    Read the article

  • Can't seem to get python to work

    - by Justin Johnson
    I'm just starting out in Python. The Python interpreter works from the command line (I have 2.4.3), but I can't seem to get Apache to execute Python scripts. All I end up with is a blank screen and nothing in the Apache error logs. I enabled Python via the Plesk control panel. Here's the snippet that was generated in the httpd.include: <Files ~ (\.py$)> SetHandler python-program PythonHandler mod_python.cgihandler </Files> My test script is one of the examples that comes with the Python downloads at http://python.org/download/ #!/usr/local/bin/python """CGI test 1 - check server setup.""" # Until you get this to work, your web server isn't set up right or # your Python isn't set up right. # If cgi0.sh works but cgi1.py doesn't, check the #! line and the file # permissions. The docs for the cgi.py module have debugging tips. print("Content-type: text/html") print() print("<h1>Hello world</h1>") print("<p>This is cgi1.py") That wasn't working, so I changed #!/usr/local/bin/python to #!/usr/bin/python which is what which python tells me but the results were the same. Like I said, I'm ending up with a blank page. No errors that I know of, unless I'm checking the wrong error log (I'm checking the Apache error log). I'm on a MediaTemple (dv) running CentOS.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >