English 中文(简体)
如何制定一种储蓄方案? a. 避免在 p子档案中发生的变化
原标题:How to create a save option ? to save change that is made in .txt file from python
  • 时间:2011-07-09 21:19:48
  •  标签:
  • python

this is my assignment: Description: We are interested to develop a Costumer Management System for a company, which stores customers and orders information and helps system user to search, edit, and enter data. Each customer has a CustomerNumber (ID), Name, Address, and Phone which can be stored in a list such as [1, “Amin Milani Fard”, “Columbia College”, 778]. Each order has an OrderNumber, CostumerNumber, OrderDate, and OrderedItemsList such as [5,1,”20/06/2011”, [“XYZ”, “ABC”, “LMNOP”]].

将向您提供两份投入文件,即客户。 载有成本计数和订单的吨位。 载有命令清单的txt。 首先,你们需要阅读投入文件,然后根据用户选择适用搜索、编辑、添加或删除客户和(或)订单清单。 您的方案应当重复显示一个菜单,因为用户没有进入9台,所以:

**** Welcome to My Customer Management System ****
Please select an option
1.  Load the input files
2.  Search a customer
3.  Search an order
4.  Add a new customer
5.  Add a new order
6.  Delete a customer
7.  Delete an order
8.  Save data in files 
9.  Quit

在档案中保存数据有问题,即只想获取数据。 我想到的是,在选择4时,将自动节省费用。 是否有办法从猪肉中拯救一只 t子?

问题回答

读到:http://docs.python.org/tutorial/inputoutput.html“rel=“nofollow”>Python tutorial,载于I/O文档中,确实很好。 妥善解决你的任务。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签