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

Home Posts Topics Members FAQ

reopen the PyCrust after change the script

7 New Member
(e.g. a file name g.py with class called "test")
evreytime I change the content in test and saved , it will not update my script when I type

>>> from g import test

But it only work when I reopen the PyCrust, is there any other method rather than reload the PyCrust again?
Oct 11 '07 #1
2 1490
bartonc
6,596 Recognized Expert Expert
(e.g. a file name g.py with class called "test")
evreytime I change the content in test and saved , it will not update my script when I type

>>> from g import test

But it only work when I reopen the PyCrust, is there any other method rather than reload the PyCrust again?
Here is an excerpt from the 2.4 docs:
reload( module)

Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited the module source file using an external editor and want to try out the new version without leaving the Python interpreter. The return value is the module object (the same as the module argument).
Oct 11 '07 #2
bartonc
6,596 Recognized Expert Expert
Here is an excerpt from the 2.4 docs:
reload() is also discussed here.
Oct 11 '07 #3

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

Similar topics

0
1289
by: Daniel Joyce | last post by:
When I try and run pycrust, I get... 'import site' failed; use -v for traceback Traceback (most recent call last): File "/usr/bin/pycrust", line 4, in ? from wxPython.lib.PyCrust.PyCrustApp import main File "/usr/lib/python2.2/site-packages/wxPython/lib/PyCrust/PyCrustApp.py", line 8, in ? from crust import CrustFrame
3
6047
by: It's me | last post by:
I am trying out PyCrust and at a lost what to do next. With the previous IDE I tried, the IDE pops up the console and the editor. From the editor, I can set up breakpoints and debug and so forth. Yes, I can even run the script. With PyCrust, the nice looking 3-pane window pops up with lots of tabs...a prompt...and then??? Where is the file I am trying to run? Even the File options are all greyed out... <scratching head....>
3
5881
by: Byron | last post by:
Hi, Javascript confuses me, so I usually limit myself to Dreamweaver's built-in scripts for stuff like imageswaps. But this time I'm trying to write something very simple myself. I do most of my stuff in ASP and PHP so I'm familiar with server-side programming; for some reason JavaScript syntax trips me up. I want to assign a value to a variable according to an onclick event, and then run an if...then on the variable, and according to...
2
2543
by: Samuel Yin | last post by:
Hi, guys, This should be a simple problem, but I just can not resolve it. I just want to use a python script to change my working directory. see my following code: # mycd.py 1) destdir = "xxxxxxxx" 2) command = "cd "+ destdir 3) os.system(command)
0
1070
by: bhchng | last post by:
After I click the submit button on my child window, it successfully navigate the parent window to the indicated URL and close the child. But I dont understand why the child window reopen a new child window. What is happening and how to stop child window from reopening a new window ? childWindow.aspx: <script language="javascript"> <!--
1
1440
by: Timothy Gee | last post by:
Have do a lot of lab work making use of xmlrpclib and am quite dependent on it. I just started working with pycrust under Linux RH9, and wanted to use it as my standard python environment, however, when I import xmlrpclib, I get a segmentation fault. Command line still works fine however. Details for pycrust are: PyCrust 0.9.5 Yet another Python shell, only flakier. Half-baked by Patrick K. O'Brien,
0
1020
by: Rich Shepard | last post by:
To test my code interactively I decided to try PyCrust. However, all the File menu items except Save and Quit are greyed out so I cannot open a saved file. Is there a simple explanation I've overlooked? Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com Voice: 503-667-4517 Fax: 503-667-8863
0
895
by: WolfgangZ | last post by:
Hi, I've tried to add " from __future__ import division" to the startup script of pycrust. It seems to be imported as division is listed in the namespace. But it is somehow not activated. Any suggestions? PyCrust 0.9.5 Python 2.5
6
3585
by: Kanis | last post by:
Hi, I am a Python beginner and using PyCrust to process data for my research work. I found I not able to import a .py file directly. But I have to type in every lines every time. Or I can save the script in function. Then call out the function in PyCrust. But it's not convenient. And it causes global variable problem. The case is even I import the numpy lib in the function file.py, but it shows error: “NameError: global name 'append' is...
0
8609
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
9030
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
8899
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
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2007
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.