朱莉娅v0.6:加载的JLD文件未显示完整内容

时间:2018-11-02 22:43:52

标签: julia

(还是)Julia的新手,所以请多多包涵。我有一个文件Pkg.jld,它与julia v0.6安装中的软件包版本一起保存。我安装了正确的JLD,但是当我执行load("<path>/Pkgs.jld")["data"]时,输出将被切断。它打印

Dict{String,VersionNumber} with 139 entries:
  "FFTW"                 => v"0.0.4"
  "Gtk"                  => v"0.14.0"
  ... (more packages)
  :                      => :

,但显示少于要求的139个条目。如何查看编码字典中的所有条目?

1 个答案:

答案 0 :(得分:2)

您应该通过以下方式获取所有条目

show(stdout, "text/plain", yourdict)

示例:

julia> using Pkg; somedict = Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 61 entries:
  "FFTW"                 => v"0.2.4"
  "ForwardDiff"          => v"0.10.0"
  "Arpack"               => v"0.3.0"
  "Measurements"         => v"1.0.2"
  "Juno"                 => v"0.5.3"
  "EllipsisNotation"     => v"0.3.0"
  "HTTP"                 => v"0.7.1"
  "NPZ"                  => v"0.3.0"
  "DataStructures"       => v"0.14.0"
  "Latexify"             => v"0.5.1"
  "SimpleWeightedGraphs" => v"1.1.0"
  "PeriodicTable"        => v"0.1.2"
  "JLD2"                 => v"0.1.2"
  "Knet"                 => v"1.1.1"
  "DataFrames"           => v"0.14.1"
  "Distributions"        => v"0.16.4"
  "Helpers"              => v"0.0.0"
  "TimerOutputs"         => v"0.4.0"
  "IterativeSolvers"     => v"0.7.1"
  "HDF5"                 => v"0.10.2"
  "Humanize"             => v"1.0.0"
  "LsqFit"               => v"0.6.0"
  ⋮                      => ⋮

julia> show(stdout, "text/plain", somedict)
Dict{String,Union{Nothing, VersionNumber}} with 61 entries:
  "FFTW" => v"0.2.4"
  "ForwardDiff" => v"0.10.0"
  "Arpack" => v"0.3.0"
  "Measurements" => v"1.0.2"
  "Juno" => v"0.5.3"
  "EllipsisNotation" => v"0.3.0"
  "HTTP" => v"0.7.1"
  "NPZ" => v"0.3.0"
  "DataStructures" => v"0.14.0"
  "Latexify" => v"0.5.1"
  "SimpleWeightedGraphs" => v"1.1.0"
  "PeriodicTable" => v"0.1.2"
  "JLD2" => v"0.1.2"
  "Knet" => v"1.1.1"
  "DataFrames" => v"0.14.1"
  "Distributions" => v"0.16.4"
  "Helpers" => v"0.0.0"
  "TimerOutputs" => v"0.4.0"
  "IterativeSolvers" => v"0.7.1"
  "HDF5" => v"0.10.2"
  "Humanize" => v"1.0.0"
  "LsqFit" => v"0.6.0"
  "Polynomials" => v"0.5.1"
  "ProgressMeter" => v"0.6.1"
  "GPUArrays" => v"0.5.0"
  "ApproxFun" => v"0.9.0"
  "DistributedArrays" => v"0.5.1"
  "CSV" => v"0.4.2"
  "Revise" => v"0.7.12"
  "Atom" => v"0.7.6"
  "BenchmarkTools" => v"0.4.1"
  "Optim" => v"0.17.1"
  "ReverseDiff" => v"0.3.1"
  "LinearOperators" => v"0.5.1"
  "PyCall" => v"1.18.5"
  "Traceur" => v"0.2.0"
  "BandedMatrices" => v"0.5.2"
  "DataFramesMeta" => v"0.4.0"
  "JSON" => v"0.19.0"
  "StatsBase" => v"0.25.0"
  "IJulia" => v"1.13.0"
  "Flux" => v"0.6.8"
  "PyPlot" => v"2.6.3"
  "Unitful" => v"0.12.0"
  "StaticArrays" => v"0.9.2"
  "DifferentialEquations" => v"5.3.1"
  "Parameters" => v"0.10.1"
  "UnicodePlots" => v"0.3.1"
  "OnlineStats" => v"0.19.2"
  "BlockBandedMatrices" => v"0.1.1"
  "LightGraphs" => v"1.2.0"
  "LinearMaps" => v"2.2.1"
  "Query" => v"0.10.1"
  "LaTeXStrings" => v"1.0.3"
  "Rebugger" => v"0.1.4"
  "OhMyREPL" => v"0.3.0"
  "ProfileView" => v"0.4.0"
  "AbstractTrees" => v"0.2.0"
  "BlockArrays" => v"0.4.1"
  "QuantumOptics" => v"0.6.1"
  "Gtk" => v"0.16.4"

此功能适用于Julia v1.0.1,但基本上也应适用于v0.6(删除using Pkg并替换为stdout-> STDOUT)。