# Python script get proxy name

**URL:** https://discourse.paraview.org/t/python-script-get-proxy-name/2614
**Category:** ParaView Support
**Created:** [September 25, 2019, 3:20am UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614 "2019-09-25T03:20:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RisingYoung-Learn](https://discourse.paraview.org/user_avatar/discourse.paraview.org/risingyoung-learn/32/2096_2.png) [@RisingYoung-Learn](https://discourse.paraview.org/u/RisingYoung-Learn)
#### Post date: [September 25, 2019, 3:20am UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614/1 "2019-09-25T03:20:09Z")

</div>

Hello,

In ParaView 5.5.2, I saved the Save State as a py file, but found that the proxy name was not saved. How can I save the name?

Best regards.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 25, 2019, 8:10pm UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614/2 "2019-09-25T20:10:48Z")

</div>

Hmm, that’s an interesting request. The variables that hold references to various sources are based off the names of the sources, but I assume that’s not sufficient. There isn’t a way to write out the proxy names when you save the state in Python, but you can retrieve the source name with

```python
sources = GetSources()
sources.keys()[sources.values().index(s)][0]

```

where `s` is a source of interst.

---

<div class="post-metadata">

### Author: ![RisingYoung-Learn](https://discourse.paraview.org/user_avatar/discourse.paraview.org/risingyoung-learn/32/2096_2.png) [@RisingYoung-Learn](https://discourse.paraview.org/u/RisingYoung-Learn)
#### Post date: [September 26, 2019, 9:14am UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614/3 "2019-09-26T09:14:59Z")

</div>

Thank you very much for your help, thank you!  
If I want to create a Sphere in Python code, can I specify the proxy name when I create sphere? Instead of renaming it after creation is done like this:

Cone = Cone()  
RenameSource(“AAA”, cone)

Thank you!

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 26, 2019, 1:33pm UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614/4 "2019-09-26T13:33:39Z")

</div>

Yes, it is possible.

```python
cone = Cone(registrationName="AAA")

```

---

<div class="post-metadata">

### Author: ![RisingYoung-Learn](https://discourse.paraview.org/user_avatar/discourse.paraview.org/risingyoung-learn/32/2096_2.png) [@RisingYoung-Learn](https://discourse.paraview.org/u/RisingYoung-Learn)
#### Post date: [September 29, 2019, 6:01am UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614/5 "2019-09-29T06:01:14Z")

</div>

Hello! Thank you very much for your reply!

When ParaView was designed, did you consider internationalization to support multiple languages? I need to support Chinese now, but the project can’t generate Qt .ts file; when the Proxy Name is Chinese, save state generates pvsm file without any problem, but the py file will generate an error.  
So, does ParaView have a special handling solution?

thank you very much!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 29, 2019, 4:15pm UTC](https://discourse.paraview.org/t/python-script-get-proxy-name/2614/6 "2019-09-29T16:15:00Z")

</div>

> [@RisingYoung-Learn](#):
>
> When ParaView was designed, did you consider internationalization to support multiple languages?

Sadly, this would require a great amount of work. See here for more info :

> [@ParaView translation discussion](https://discourse.paraview.org/t/paraview-translation-discussion/2223):
>
> Is there interest into improving the support for translation in ParaView ? I’m currently adding a support for translation in a ParaView based app and there is a lot of non tr() visible QString in ParaView. Some doc for these that do not know this : [https://doc.qt.io/qt-5/linguist-manager.html](https://doc.qt.io/qt-5/linguist-manager.html) If we consider that ParaView is “translatable” with some effort, we may need to take a few steps : Do a general pass to add a many tr() as possible in ParaView During the review process, check that vi…
