473,698 Members | 2,051 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't import datetime, random...and other some modules when run script on board

5 New Member
I used environment on Fedora core 6 and tried with python 2.5.2 package on board chip mips and platform 2.6 is ok (although when "make" still have error:

"/bin/sh: line 2: ./python: cannot execute binary file
make: *** [sharedmods] Error 126 "

but I can run it on this board ( GCC 4.0.4, binutils2.17, uClibc0.9.28.3) )."

I don't understand why I can't import modules : time, random, etc,… but I can import os module and some thing are available. Please explain for me about it, and how to set up environment variable, to import modules for using it in running on board :
./python my_script
my_script : in this script I need import and use modules.
Because I'm a newbie about python , so I will have some stunned questions. If it happens, please bypass for me.

Thank you so much
Mar 21 '08 #1
0 1088

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1915
by: Jeff Sykes | last post by:
I have a cgi script that imports modules based on a user config file. I am suffering some performance problems when I import these modules. Some logging revealed that it seems to be taking about 1.3 seconds to import these modules. This is running on a Windows 2000 box with a Pentium II 400 processor, Python 2.1, Apache 1.3.19 as the web server. I don't need screaming performance numbers, but this time is excessive. Is it me, or does that...
3
5718
by: Werner Merkl | last post by:
Hi, Python is really great, for small to big programs. For my colleagues and some circumstances I sometimes need to "compile" a script using py2exe. Cause I use Windows, I like to use the (Windows) ability, to add some version infos, comments, etc to the exe file. If I use explorer to check, these properties are visible and correct.
2
1779
by: DilbertFan | last post by:
Hi, I really thought that I had this importing business down. I recently downloaded and installed mx module for the DateTime class. In IDLE, I go: import mx mx.DateTime.DateTime(2004)
5
2472
by: Steve Holden | last post by:
This is even stranger: it makes it if I import the module a second time: import dbimp as dbimp import sys if __name__ == "__main__": dbimp.install() #k = sys.modules.keys() #k.sort() #for kk in k:
5
1601
by: passion_to_be_free | last post by:
Okay, so in my li'l python script I'm importing a few 3rd party modules that I have installed on my comp. I need to distribute this script to several other people, but I won't have access to install the modules on their comp's. I'm thinking I'll include these modules with my script and deliver them as a bundle. When I write my script, is there a way to declare the import statements and specify a relative path to where the modules are...
3
2609
by: krzychu | last post by:
Hi, I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone 2.0.5, OS Debian 1:3.3.6-2. After import a old Plone site from the following platform Zope-2-7-4, Python 2.3.3, Plone 2.0.3 to the new one, I get error when I visit PuthonScript in the ZMI. "invalid syntax (Script (Python), line 1)"
4
6244
by: shaboo | last post by:
Hi Guys, I have just installed Python2.4.2 on our HP-UX system. But when I try to import datetime modlue I get the following error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> from datetime import datetime Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named datetime
6
4882
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
14
9397
by: DataSmash | last post by:
Hi, When I import the random module at the python interpreter, it works fine: >>> import random >>> x = random.randint(1,55) >>> print x 14 >>> BUT, when I put the same code in a python script:
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.