# Different way of accessing python objects (difference between pyimport("sys").path and pyimport("sys")."path")

**URL:** <https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859>\
**Category:** General Usage\
**Created:** [June 30, 2019, 12:25pm UTC](https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859 "2019-06-30T12:25:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitin-ppnp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitin-ppnp/32/9243_2.png) [@nitin-ppnp](https://discourse.julialang.org/u/nitin-ppnp)\
**Post date:** [June 30, 2019, 12:25pm UTC](https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859/1 "2019-06-30T12:25:50Z")

</div>

When I do  
`pushfirst!(PyVector(pyimport("sys").path),"")`  
and check with  
`pyimport("sys").path`  
it remains unchanged. However, if I do  
`pushfirst!(PyVector(pyimport("sys")."path"),"")`,  
`pyimport("sys").path`  
shows the modified path. Why?

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [June 30, 2019, 1:24pm UTC](https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859/2 "2019-06-30T13:24:03Z")

</div>

The former implicitly converts the python object while the latter (with quotation marks) let’s you access the python object directly, IIRC.

---

<div class="post-metadata">

**Author:** ![nitin-ppnp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nitin-ppnp/32/9243_2.png) [@nitin-ppnp](https://discourse.julialang.org/u/nitin-ppnp)\
**Post date:** [July 1, 2019, 6:45pm UTC](https://discourse.julialang.org/t/different-way-of-accessing-python-objects-difference-between-pyimport-sys-path-and-pyimport-sys-path/25859/3 "2019-07-01T18:45:55Z")

</div>

Thanks, makes sense now
